Function Overview
2026-07-24
ZEGO ZIM SDKs provide rich APIs for you to quickly build in app chat capabilities into your applications.
ZEGO ZIM SDKs are available for all major platforms, including Android, iOS, Mac, Windows, and Web.
SDK Initialization Related Functions
| Method | Description |
|---|---|
| getVersion | Gets the SDK's version number. |
| createWithAppConfig: | Create a ZIM instance. |
| getInstance | Get the ZIM singleton object. |
| setAdvancedConfigWithKey:value: | Set ZIM advanced configuration. |
| setGeofencingConfigWithAreaList:type: | Set geofence-related configurations. |
| setLogConfig: | Set log related configuration. |
| setCacheConfig: | Set cache related configuration. |
| setCustomDispatchQueue | Set a custom GCD dispatch queue. |
| destroy | Destroy the ZIM instance. |
| setEventHandler: | Set the event notification callbacks that need to be handled. If the eventHandler is set to [null], all the callbacks set previously will be cleared. |
| uploadLog: | Upload log and call after setting up log path. |
| loginWithUserID:config:callback: | Login, you must log in before using all functions. |
| logout | Log out of ZIM service. |
| renewToken:callback: | Update the authentication token. |
| callExperimentalAPIWithParams:callback: | Call the experimental API. |
| updateUserName:callback: | Update user's user name. |
| updateUserAvatarUrl:callback: | Update user's avatar URL. |
| updateUserExtendedData:callback: | Update user's user extended data. |
| updateUserOfflinePushRule:callback: | Update user's custom rule of offline push. |
| updateUserCustomStatus:callback: | It is used to update the user-defined status. |
| updateUserCustomStatus:config:callback: | Update user's custom status. |
| updateUserBadge:callback: | Update the number of iOS offline notification badges. |
| queryUsersInfo:config:callback: | Query user information. |
| queryUsersStatusByUserIDs:callback: | Query the user statuses of other users. |
| querySelfUserInfo: | Query user information and user rules. |
| subscribeUsersStatus:config:callback: | Subscribe to the user status of other users |
| unsubscribeUsersStatus:callback: | This command is used to batch unsubscribe the target users in the current user subscription list. |
| querySubscribedUserStatusListWithConfig:callback: | This command is used to query the user status subscription list of the current user. |
| zim:errorInfo: | The callback for error information. |
| zim:experimentalEventReceived: | Experimental API callback. |
| zim:tokenWillExpire: | A reminder callback that the token is about to expire. |
| zim:connectionStateChanged:event:extendedData: | The event callback when the connection state changes. |
| zim:userInfoUpdated: | In the multi-terminal login scenario, after the user modifies their information on device A, other online multi-terminal devices will receive this callback. For offline devices, after the user goes online, they need to call the [queryUsersInfo] interface to actively query user information. |
| zim:userRuleUpdated: | Triggered when the user rule changes. |
| zim:userStatusUpdated: | User online status change notification. |
Conversation functions
| Method | Description |
|---|---|
| queryConversationListWithConfig:callback: | Query the conversation list. |
| queryConversationListWithConfig:option:callback: | Query the conversation list. |
| queryConversation:conversationType:callback: | Query a conversation by conversation ID and conversation type. |
| queryConversationPinnedListWithConfig:callback: | Query the conversation pinned list. |
| updateConversationPinnedState:conversationID:conversationType:callback: | Modify the conversation pinned state. |
| deleteConversation:conversationType:config:callback: | delete the conversation. |
| deleteAllConversationsWithConfig:callback: | delete all conversations. |
| clearConversationUnreadMessageCount:conversationType:callback: | clear session unreads. |
| clearConversationTotalUnreadMessageCount: | clear all conversations unreads. |
| queryConversationTotalUnreadMessageCountWithConfig:callback: | Query the conversations total unread message count by config. |
| setConversationNotificationStatus:conversationID:conversationType:callback: | Set the conversation notification state. |
| sendConversationMessageReceiptRead:conversationType:callback: | Sets all received receipts for the conversation as read. |
| setConversationDraft:conversationID:conversationType:callback: | Set a conversation draft. |
| setConversationMark:enable:conversationInfos:callback: | Set the conversation marked status. |
| setConversationMessageDestructDuration:conversationID:conversationType:callback: | Set the timed message self-destruction duration for a conversation. |
| searchLocalConversationsWithConfig:callback: | Search local conversations on local messages. |
| zim:conversationChanged: | Received notification callback for session update. |
| zim:conversationTotalUnreadMessageCountUpdated: | Received notification callback for session update. |
| zim:conversationMessageReceiptChanged: | Received notification callback when the message receiver has read this receipt message. |
| zim:conversationsAllDeleted: | When multiple login ends delete all sessions, the local end triggers the callback to notify the local end that all sessions are deleted. |
| zim:conversationSyncStateChanged: | Notification of synchronization status change events between the conversation list and the server |
Message functions
Room functions
| Method | Description |
|---|---|
| createRoom:callback: | Create and join a room. |
| createRoom:config:callback: | Create a room with advanced settings |
| joinRoom:callback: | Join a room. |
| enterRoom:config:callback: | Enter the room. If the room does not exist, it will be created automatically. |
| switchRoomFromRoomID:toRoomInfo:isCreateWhenRoomNotExisted:config:callback: | Switch from one room to another. If the room does not exist, it will decide whether to create the corresponding room based on the passed parameters. |
| leaveRoom:callback: | Leave a room. |
| leaveAllRoom: | Leave all rooms entered. |
| queryRoomMemberListByRoomID:config:callback: | Query the list of members in the room. |
| queryRoomMembersByUserIDs:roomID:callback: | Query the information of the specified userID in the specified room. |
| queryRoomOnlineMemberCountByRoomID:callback: | Query the number of online members in the room. |
| setRoomAttributes:roomID:config:callback: | Set room attributes (use this for all additions and changes). |
| deleteRoomAttributesByKeys:roomID:config:callback: | Delete room attributes. |
| beginRoomAttributesBatchOperationWithRoomID:config: | Open combination room attribute operation. |
| endRoomAttributesBatchOperationWithRoomID:callback: | Complete the property operation of the combined room. |
| queryRoomAllAttributesByRoomID:callback: | Query all properties of the room. |
| setRoomMembersAttributes:userIDs:roomID:config:callback: | Set room member attributes (use this for all additions and changes). |
| queryRoomMembersAttributesByUserIDs:roomID:callback: | Batch query the room user attributes of the members in the room. |
| queryRoomMemberAttributesListByRoomID:config:callback: | paginate the room user properties that have room property members in the room. |
| zim:roomStateChanged:event:extendedData:roomID: | The event callback when the room connection status changes. |
| zim:roomMemberJoined:roomID: | Callback when other members join the room. |
| zim:roomMemberLeft:roomID: | Callback when other members leave the room. |
| zim:roomAttributesUpdated:roomID: | Event callback when the room attributes changes. |
| zim:roomAttributesBatchUpdated:roomID: | Event callback when the room attributes batch changes. |
| zim:roomMemberAttributesUpdated:operatedInfo:roomID: | Event callback when the room member attributes changes. |
Group functions
Call Invitation functions
| Method | Description |
|---|---|
| callInviteWithInvitees:config:callback: | Initiate a call invitation. |
| callCancelWithInvitees:callID:config:callback: | Cancel the call invitation. |
| callAcceptWithCallID:config:callback: | Accept the call invitation. |
| callRejectWithCallID:config:callback: | Reject the call invitation. |
| callingInviteWithInvitees:callID:config:callback: | Invite other users to join the call invitation. |
| callJoin:config:callback: | Join an advanced mode call, or switch the main device for the advanced mode call (multi-terminal login only). |
| callQuit:config:callback: | Quit the current call invitation. |
| callEnd:config:callback: | End the call invitation. |
| queryCallInvitationListWithConfig:callback: | Query the call invitation list. |
| zim:callInvitationCreated:callID: | Event callback when the call invitation is created. |
| zim:callInvitationReceived:callID: | Event callback when the call invitation is received. |
| zim:callInvitationCancelled:callID: | Event callback when the call invitation is cancelled. |
| zim:callInvitationEnded:callID: | Event callback when the call invitation is ended. |
| zim:callInvitationTimeout:callID: | Event callback when the call invitation times out. |
| zim:callUserStateChanged:callID: | Event callback when the call invitation user status changes. |
Friend functions
Blacklist functions
| Method | Description |
|---|---|
| addUsersToBlacklistWithUserIDs:callback: | Add users to the blacklist. |
| removeUsersFromBlacklistWithUserIDs:callback: | Remove the user from the blacklist. |
| queryBlacklistWithConfig:callback: | Query the blacklist. |
| checkUserIsInBlacklistByUserID:callback: | Check if the user is on the blacklist. |
| zim:blacklistChanged:action: | Event callback when the blacklist changes. |
