In-app Chat
SDK Error Codes
On this page

ZIM upgrade Guide

2026-07-24

This article introduces some instructions and precautions when upgrading the In-app Chat macOS SDK.

3.1.0 Upgrade Guide

Note

ZIM SDK 3.1.0 has added deprecation tags to some APIs. Please refer to the following instructions to complete the migration.

Newly deprecated APIs

queryGroupMessageReceiptReadMemberListByMessage and queryGroupMessageReceiptUnreadMemberListByMessage have been deprecated since version 3.1.0. To query the member list of group messages with read, unread (undelivered), or delivered status, use queryGroupMessageReceiptMemberListByMessage instead.

queryGroupMessageReceiptMemberListByMessage usage example

Parameter description:

ParameterDescription
messageThe message with receipt to query.
groupIDThe group ID of the corresponding group conversation.
countThe number of users to query, up to 100 per query.
configQuery configuration: ZIMGroupMessageReceiptMemberListQueryConfig, which can configure the query start marker nextFlag and the query item (read, unread [undelivered], delivered).
callbackQuery result callback: ZIMGroupMessageReceiptMemberListQueriedCallback, where userList is the group member list matching the query conditions, and nextFlag is the start marker for the next query (when nextFlag is 0, the query is complete).

Code example:

ZIMGroupMessageReceiptMemberQueryConfig *config = [[ZIMGroupMessageReceiptMemberQueryConfig alloc] init];
config.nextFlag = 0;    // Query start marker, initially set to 0, then set to the nextFlag returned from the callback.
config.count = 10;      // The number of users to query, up to 100 per query.

[zim queryGroupMessageReceiptMemberListByMessage:message
                                         groupID:groupID
                                           count:count
                                          config:config
                                        callback:^(NSString *_Nonnull groupID, NSArray<ZIMGroupMemberInfo *> *_Nonnull userList,
                                                   unsigned int nextFlag, ZIMError *_Nonnull errorInfo) {
    if (errorInfo.code == 0) {
        // Query successful, userList is the group member list matching the query conditions
        // nextFlag is the start marker for the next query, when nextFlag is 0, the query is complete
    } else {
        // Query failed
    }
}];

Upgrade Guide for 3.0.0

Warning

This version (3.0.0) removes APIs that have been deprecated for over 1 year, along with related enum values and fields, and adds deprecation markers to some APIs. Please refer to the following instructions to complete the migration.

Removed deprecated APIs

ZIM initialization API (create)

The deprecated old createWithAppID: API has been removed. Please use the createWithAppConfig: API that accepts ZIMAppConfig instead.

ZIMAppConfig *appConfig = [[ZIMAppConfig alloc] init];
appConfig.appID = 12345678;
appConfig.appSign = @"appSign";
ZIM *zim = [ZIM createWithAppConfig:appConfig];

ZIM login API (login)

The deprecated old loginWithUserInfo:callback: and loginWithUserInfo:token:callback: APIs have been removed. Please use the loginWithUserID:config:callback: API that accepts userID and ZIMLoginConfig instead.

ZIMLoginConfig *loginConfig = [[ZIMLoginConfig alloc] init];
loginConfig.userName = @"userName";
loginConfig.token = @""; // Fill in the token if using token authentication
loginConfig.isOfflineLogin = NO;
[[ZIM getInstance] loginWithUserID:@"userID"
                            config:loginConfig
                          callback:^(ZIMError * _Nonnull errorInfo) {
    // Login result
}];

ZIM message sending API (sendMessage)

The deprecated sendPeerMessage:toUserID:config:callback:, sendRoomMessage:toRoomID:config:callback:, sendGroupMesage:toGroupID:config:callback:, and old sendMediaMessage APIs have been removed. Please use the sendMessage:toConversationID:conversationType:config:notification:callback: API with the notification parameter instead.

ZIMTextMessage *textMessage = [[ZIMTextMessage alloc] initWithMessage:@"Hello"];
ZIMMessageSendConfig *config = [[ZIMMessageSendConfig alloc] init];
ZIMMessageSendNotification *notification = [[ZIMMessageSendNotification alloc] init];
notification.onMessageAttached = ^(ZIMMessage * _Nonnull message) {
    // Business logic before message is sent
};
[[ZIM getInstance] sendMessage:textMessage
              toConversationID:@"toConversationID"
              conversationType:ZIMConversationTypePeer
                        config:config
                  notification:notification
                      callback:^(ZIMMessage * _Nonnull message,
                                 ZIMError * _Nonnull errorInfo) {
    // Message sent result
}];

ZIM media file download API (downloadMediaFile)

The deprecated old downloadMediaFileWithMessage:fileType:progress:callback: (without config parameter) API has been removed. Please use the new downloadMediaFileWithMessage:fileType:config:progress:callback: API with the ZIMMediaDownloadConfig parameter instead.

ZIMImageMessage *imageMessage = (ZIMImageMessage *)message;
ZIMMediaDownloadConfig *config = [[ZIMMediaDownloadConfig alloc] init];
[[ZIM getInstance] downloadMediaFileWithMessage:imageMessage
                                       fileType:ZIMMediaFileTypeOriginalFile
                                         config:config
                                       progress:^(ZIMMessage * _Nonnull message,
                                                  unsigned long long currentFileSize,
                                                  unsigned long long totalFileSize) {
    // Download progress
}
                                       callback:^(ZIMMessage * _Nonnull message,
                                                  ZIMError * _Nonnull errorInfo) {
    // Download complete
}];

ZIM message receive callback APIs

The zim:receivePeerMessage:fromUserID:, zim:receiveRoomMessage:fromRoomID:, and zim:receiveGroupMessage:fromGroupID: callbacks deprecated in 2.18.0 have been officially removed in this version. It is recommended to migrate to zim:messageReceivedWithResult:.

- (void)zim:(ZIM *)zim
    messageReceivedWithResult:(ZIMMessageReceivedEventResult *)result {
    NSArray<ZIMMessage *> *messageList = result.messageList;
    ZIMMessageReceivedInfo *info = result.info;
    NSString *conversationID = result.conversationID;
    ZIMConversationType conversationType = result.conversationType;
    // Handle messages for different conversation types based on conversationType
}

ZIM call invitation callback APIs

The old zim:callInvitationTimeout: (with only callID parameter), zim:callInvitationRejected:callID:, zim:callInvitationAccepted:callID:, and zim:callInviteesAnsweredTimeout:callID: callbacks have been removed. Please use the new callInvitationTimeout:callID: and callUserStateChanged:callID: instead.

- (void)zim:(ZIM *)zim
    callInvitationTimeout:(ZIMCallInvitationTimeoutInfo *)info
                   callID:(NSString *)callID {
    // info.mode can distinguish between normal mode and advanced mode
}

- (void)zim:(ZIM *)zim
    callUserStateChanged:(ZIMCallUserStateChangeInfo *)info
                  callID:(NSString *)callID {
    // info.callUserList contains the list of users whose status changed
    // You can uniformly handle accept, reject, timeout, and other status changes
}

importLocalMessages / exportLocalMessages APIs removed

The importLocalMessages and exportLocalMessages APIs have been temporarily removed in version 3.0.0, and there is no replacement API at this time. This functionality will be re-enabled in future versions. Please follow the SDK release notes for updates.

ZIM message receive callback APIs

The zim:peerMessageReceived:info:fromUserID:, zim:roomMessageReceived:info:fromRoomID:, and zim:groupMessageReceived:info:fromGroupID: callbacks have been marked as deprecated in this version. They can still be used normally at present, but it is recommended to migrate to zim:messageReceivedWithResult: as soon as possible.

- (void)zim:(ZIM *)zim
    messageReceivedWithResult:(ZIMMessageReceivedEventResult *)result {
    NSArray<ZIMMessage *> *messageList = result.messageList;
    ZIMMessageReceivedInfo *info = result.info;
    NSString *conversationID = result.conversationID;
    ZIMConversationType conversationType = result.conversationType;
    // Handle messages for different conversation types based on conversationType
}

ZIMGroupConversation deprecated

The ZIMGroupConversation class has been deprecated in 3.0.0. The isDisabled and mutedExpiredTime properties should be replaced with the corresponding properties of the base class ZIMConversation:

ZIMGroupConversation (deprecated)ZIMConversation (replacement property)
isDisabledisConversationDisabled
mutedExpiredTimeselfMutedExpiredTime
BOOL isDisabled = conversation.isConversationDisabled;
long long mutedExpiredTime = conversation.selfMutedExpiredTime;

Enum value removals

ZIMMessageType enum value removed

ZIMMessageTypeSystem (value 30) has been removed from the ZIMMessageType enum, and the ZIMSystemMessage class has also been removed. If you need to send system-level commands, please use ZIMCommandMessage instead.

// Use ZIMCommandMessage instead of ZIMSystemMessage
ZIMCommandMessage *commandMessage = [[ZIMCommandMessage alloc] init];
commandMessage.message = [@"payload" dataUsingEncoding:NSUTF8StringEncoding];
[[ZIM getInstance] sendMessage:commandMessage
              toConversationID:@"toConversationID"
              conversationType:ZIMConversationTypePeer
                        config:[[ZIMMessageSendConfig alloc] init]
                  notification:nil
                      callback:^(ZIMMessage * _Nonnull message,
                                 ZIMError * _Nonnull errorInfo) {}];

ZIMCallUserState enum value removed

ZIMCallUserStateOffline (value 4) has been removed from the ZIMCallUserState enum. Please check your code for any references to this enum value and remove them.

// The following enum value has been removed, please check and remove references to this value in your code
// ZIMCallUserStateOffline  (value 4)

Field changes

ZIMUserFullInfo.userAvatarUrl deprecated

ZIMUserFullInfo.userAvatarUrl has been deprecated. Please use ZIMUserFullInfo.baseInfo.userAvatarUrl instead.

NSString *avatarUrl = userFullInfo.baseInfo.userAvatarUrl;

ZIMMessage.conversationSeq replaced with messageSeq

ZIMMessage.conversationSeq has been removed. Please use ZIMMessage.messageSeq instead.

long long seq = message.messageSeq;

ZIMMessageDeletedInfo.isDeleteConversationAllMessage removed

ZIMMessageDeletedInfo.isDeleteConversationAllMessage has been removed. Please use ZIMMessageDeletedInfo.messageDeleteType instead.

ZIMMessageDeleteType deleteType = deletedInfo.messageDeleteType;
// Determine whether it is a single deletion or a full deletion through deleteType

ZIMGroupMemberInfo.memberAvatarUrl removed

ZIMGroupMemberInfo.memberAvatarUrl has been removed. Please use ZIMGroupMemberInfo.userAvatarUrl instead.

NSString *avatarUrl = groupMemberInfo.userAvatarUrl;

ZIMGroupOperatedInfo structure change

The ZIMGroupOperatedInfo.operatedUserInfo field has been removed. Its internal fields have been flattened into ZIMGroupOperatedInfo, and can be accessed directly from ZIMGroupOperatedInfo.

// Get fields directly from ZIMGroupOperatedInfo
NSString *operatorUserID = groupOperatedInfo.userID;
NSString *operatorUserName = groupOperatedInfo.userName;
NSString *operatorAvatarUrl = groupOperatedInfo.userAvatarUrl;

ZIMCallInvitationSentInfo.errorInvitees replaced

ZIMCallInvitationSentInfo.errorInvitees has been removed. Please use ZIMCallInvitationSentInfo.errorUserList instead. The type has changed from NSArray<ZIMCallUserInfo *> to NSArray<ZIMErrorUserInfo *>.

[[ZIM getInstance] callInviteWithInvitees:invitees
                                   config:config
                                 callback:^(NSString * _Nonnull callID,
                                            ZIMCallInvitationSentInfo * _Nonnull info,
                                            ZIMError * _Nonnull errorInfo) {
    for (ZIMErrorUserInfo *errorUser in info.errorUserList) {
        // errorUser.userID, errorUser.reason
    }
}];

ZIMConversationChangeInfo field change

The event property (type ZIMConversationEvent) in ZIMConversationChangeInfo has been removed. Please use the action property (type ZIMConversationChangeAction) in the same structure instead.

- (void)zim:(ZIM *)zim
    conversationChanged:(ZIMConversationChangeEventResult *)result {
    for (ZIMConversationChangeInfo *changeInfo in result.infoList) {
        ZIMConversationChangeAction action = changeInfo.action;
        // Handle conversation changes based on action
    }
}

Enum value renames

The following enum values have been renamed in 3.0.0. After upgrading, please check and replace all related references in your code.

ZIMGroupEvent

ZIMGroupEventKickout has been renamed to ZIMGroupEventKickOut.

if (event == ZIMGroupEventKickOut) {
    // Group member was kicked out
}

ZIMGroupMemberEvent

ZIMGroupMemberEventKickedout has been renamed to ZIMGroupMemberEventKickedOut.

if (event == ZIMGroupMemberEventKickedOut) {
    // Group member was kicked out
}

ZIMMessage property changes

Some properties of ZIMMessage and its subclasses have had the readonly modifier removed and now support read and write operations. If your code depends on the read-only nature of these properties (for example, if subclasses explicitly synthesize read-only properties), please check whether the related logic needs to be adjusted.

setRoomMembersAttributes behavior change

Starting from version 3.0.0, when setting room member attributes via setRoomMembersAttributes, if isDeleteAfterOwnerLeft is false, the room member attributes will not be deleted when the user leaves the room. In versions 2.x.x, attributes were first deleted when the user left the room and then restored when the user returned.


2.28.0 Upgrade Guide

Warning

ZIM SDK 2.28.0 has adjusted the return parameters of some interfaces and the timing of event callback triggers. When upgrading from an older version to 2.28.0, please read the following guide.

Interface return parameter changes

The callback ZIMMessageReactionUserListQueriedCallback has changed the type of the returned user reaction details list from ZIMMessageReactionUserInfo to ZIMMessageReactionUserFullInfo, which can be used for more detailed business UI display.

[zim queryMessageReactionUserListByMessage:message
                                    config:config
                                  callback:^(ZIMMessage *_Nonnull message,
// !mark
                                                NSArray<ZIMMessageReactionUserFullInfo *> *_Nonnull userInfoList,
                                                NSString *_Nonnull reactionType, long long nextFlag,
                                                int totalCount, ZIMError *_Nonnull errorInfo) {
    // Do business logic
}];

Event callback timing changes

Warning

The following callbacks have changes in their trigger timing starting from version 2.28.0. Developers are advised to check the corresponding business logic to determine whether it is affected after upgrading the SDK.

1

messageReactionsChanged

The messageReactionsChanged callback will be triggered after the client successfully calls addMessageReaction, deleteMessageReaction, or deleteMessageAllReactions.

2

conversationChanged

The conversationChanged callback will be triggered after the client successfully calls deleteConversation.

3

conversationsAllDeleted

The conversationsAllDeleted callback will be triggered after the client successfully calls deleteAllConversationsWithConfig.

2.27.0 Upgrade Guide

Warning

Starting from version 2.27.0, the following interfaces have undergone significant changes. Therefore, when upgrading from an older version to 2.27.0, please read the following guidelines.

The original queryGroupList interface now has an overloaded replacement interface, queryGroupListWithCount. In the new version, queryGroupListWithCount adds count and config parameters, which can be used to query the list of groups joined in common.

The callback ZIMGroupListQueriedCallback adds the nextFlag parameter, which can be used as an anchor for paging queries.

[zim queryGroupList:^(NSArray<ZIMGroupInfo *> * _Nonnull groupList, long long nextFlag, ZIMError * _Nonnull errorInfo) {
    // Write the business code after calling the query group list interface here.
}];

2.19.0 upgrade guide

Warning

Starting from version 2.19.0, the following interfaces have undergone significant changes. Therefore, when upgrading from an older version to version 2.19.0, please read the following guidelines.

The original downloadMediaFile API is deprecated. Please use the new downloadMediaFileWithMessage instead. The updated downloadMediaFileWithMessage introduces a new config parameter, which can be used to specify the download of individual media content in multi-item messages.

In ZIMMediaDownloadingProgress and ZIMMediaDownloadedCallback, the message parameter type has changed from ZIMMediaMessage * to ZIMMessage * to support multi-item messages. You need to fix the calls according to the compile error hints from the IDE.

// Assume multipleMessage.messageInfoList[0] is a text message, and multipleMessage.messageInfoList[1] is an image message
ZIMMultipleMessage *multipleMessage = (ZIMMultipleMessage *)message;
// !mark(1:3)
ZIMMediaDownloadConfig *config = [[ZIMMediaDownloadConfig alloc] init];
// Specify to download the image message
config.messageInfoIndex = 1;

[[ZIM getInstance] downloadMediaFileWithMessage:multipleMessage 
                                       fileType:ZIMMediaFileTypeOriginalFile
// !mark(1:2)
                                       config:config
                                       progress:^(ZIMMessage * _Nonnull message, unsigned long long currentFileSize, unsigned long long totalFileSize) {
                                            // Download progress
                                            // Developers need to check the type of the message and cast it to the corresponding message type
                                            if ([message isKindOfClass:[ZIMMultipleMessage class]]) {
                                                ZIMMultipleMessage *multipleMessage = (ZIMMultipleMessage *)message;
                                                // Handle multi-item messages
                                            }
                                            // Handle Other Message
                                            ......
                                       } 
// !mark
                                       callback:^(ZIMMessage * _Nonnull message, ZIMError * _Nonnull errorInfo) {
                                            // Download complete
                                            // Developers need to check the type of the message and cast it to the corresponding message type
                                            if ([message isKindOfClass:[ZIMMultipleMessage class]]) {
                                                ZIMMultipleMessage *multipleMessage = (ZIMMultipleMessage *)message;
                                                // Handle multi-item messages
                                            }
                                            // Handle Other Messages
                                            ......
                                       }];

sendMediaMessage

Since version 2.19.0, multimedia messages must be sent using the sendMessage interface. The sendMediaMessage interface is deprecated to unify message sending and facilitate future general extensions.

ZIMImageMessage *imageMessage = (ZIMImageMessage *)message;

ZIMMessageSendConfig *config = [[ZIMMessageSendConfig alloc] init];
config.priority = ZIMMessagePriorityMedium;

// !mark
ZIMMessageSendNotification *notification = [[ZIMMessageSendNotification alloc] init];
notification.onMessageAttached = ^(ZIMMessage * _Nonnull message) {
    // Developers can listen to this callback to execute business logic before sending the message
};

notification.onMediaUploadingProgress = ^(ZIMMediaMessage * _Nonnull message, unsigned long long currentFileSize, unsigned long long totalFileSize) {
    // Developers can listen to this callback to get the multimedia upload progress
};


// !mark
[[ZIM getInstance] sendMessage:imageMessage 
                       toConversationID:@"TO_CONVERSATION_ID" 
                       conversationType:ZIMConversationTypePeer
                                 config:config 
                           notification:notification 
                               callback:^(ZIMMessage * _Nonnull message, ZIMError * _Nonnull errorInfo){
                                        // Message Send Result
                                    }];

2.18.0 upgrade guide

Warning

Starting from version 2.18.0, the following interfaces have undergone significant changes. Therefore, when upgrading from an older version to version 2.16.0, please read the following guidelines.

Callback on receiving one-to-one messages

The deprecated callback receivePeerMessage for receiving one-to-one messages has been replaced by peerMessageReceived.

The new callback supports the following features:

  • When a user is online, they can receive one-to-one messages through this callback.
  • When a user logs back into the ZIM SDK, they can receive all one-to-one messages received during their offline period (up to 7 days).
// New callback
- (void)zim:(ZIM *)zim
    peerMessageReceived:(NSArray<ZIMMessage *> *)messageList
                   info:(ZIMMessageReceivedInfo *)info
             fromUserID:(NSString *)fromUserID;

// Old callback
- (void)zim:(ZIM *)zim
    receivePeerMessage:(NSArray<ZIMMessage *> *)messageList
            fromUserID:(NSString *)fromUserID;

Callback on receiving room messages

The deprecated callback receiveRoomMessage for receiving room messages has been replaced by roomMessageReceived.

The new callback supports the following features:

  • When a user is online, they can receive online room messages through this callback.
  • When a user goes from offline to online and is still in the room, they can receive all room messages that were sent during their offline period through this callback.
// New callback
- (void)zim:(ZIM *)zim
    roomMessageReceived:(NSArray<ZIMMessage *> *)messageList
                   info:(ZIMMessageReceivedInfo *)info
             fromRoomID:(NSString *)fromRoomID;

// Old callback
- (void)zim:(ZIM *)zim
    receiveRoomMessage:(NSArray<ZIMMessage *> *)messageList
            fromRoomID:(NSString *)fromRoomID;

Callback on receiving group messages

The deprecated callback receiveGroupMessage for receiving group messages has been replaced by groupMessageReceived.

The new callback supports the following features:

  • When the user is online, they can receive online group messages through this callback.
  • When the user logs back into the ZIM SDK, they can receive all group chat messages received during the offline period (up to 7 days) through this callback.
// New callback
- (void)zim:(ZIM *)zim
    groupMessageReceived:(NSArray<ZIMMessage *> *)messageList
                    info:(ZIMMessageReceivedInfo *)info
             fromGroupID:(NSString *)fromGroupID;

// Old callback
- (void)zim:(ZIM *)zim
    receiveGroupMessage:(NSArray<ZIMMessage *> *)messageList
            fromGroupID:(NSString *)fromGroupID;

2.16.0 upgrade guide

Warning

Starting from version 2.16.0, the following interfaces have undergone significant changes. Therefore, when upgrading from an older version to version 2.16.0, please read the following guidelines.

callCancel

Note

The following changes only apply to Advanced Mode call invitations.

In the new version of callCancelWithInvitees, if the parameter userIDs contains a userID, the interface will only cancel the invitation for that callee. If the userIDs parameter is empty, the interface will cancel the invitation for all callees.

For the old version of the callCancelWithInvitees interface, regardless of whether the userIDs parameter is empty or not, it is considered as canceling the invitation for all callees.

Since the old version of the ZIM SDK is not compatible with individual cancellation logic, if you need to retain the cancellation logic implemented using the old version of ZIM while also using the new version's individual cancellation feature, please isolate the call functionality between the old and new versions of ZIM.

ZIMCallCancelConfig *cancelConfig = [[ZIMCallCancelConfig alloc] init];
// Cancel userIdA and userIdB individually
[[ZIM getInstance] callCancelWithInvitees:@[@"userIdA",@"userIdB"] callID:@"callId" config:cancelConfig callback:^(NSString * _Nonnull callID, NSArray<NSString *> * _Nonnull errorInvitees, ZIMError * _Nonnull errorInfo) {
    
}];

// Cancel the entire call invitation, can be called successfully when none of the callees in the call have accepted    
[[ZIM getInstance] callCancelWithInvitees:@[] callID:@"callId" config:cancelConfig callback:^(NSString * _Nonnull callID, NSArray<NSString *> * _Nonnull errorInvitees, ZIMError * _Nonnull errorInfo) {
    
}];

2.5.0 upgrade guide

Warning

In-app Chat SDK has optimized the naming of Swift Language API methods in version 2.5.0, so when upgrading from an older version to version 2.5.0, you will need to read the changes listed below.

getInstance

// old interface
open class func getInstance() -> ZIM

// new interface
open class func shared() -> ZIM?

create

// old interface
open class func create(with config: ZIMAppConfig) -> ZIM

// new interface
open class func create(with config: ZIMAppConfig) -> ZIM?

setAdvancedConfigWithKey

// old interface
open class func setAdvancedConfigWithKey(_ key: String, value: String)

// new interface
open class func setAdvancedConfig(key: String, value: String)

uploadLog

// old interface
open func uploadLog(_ callback: @escaping ZIMLogUploadedCallback)

// new interface
open func uploadLog(with callback: @escaping ZIMLogUploadedCallback)

queryUsersInfo

// old interface
open func queryUsersInfo(_ userIDs: [String], config: ZIMUsersInfoQueryConfig, callback: @escaping ZIMUsersInfoQueriedCallback)

// new interface
open func queryUsersInfo(by userIDs: [String], config: ZIMUsersInfoQueryConfig, callback: @escaping ZIMUsersInfoQueriedCallback)

deleteConversation

// old interface
open func deleteConversation(_ conversationID: String, conversationType: ZIMConversationType, config: ZIMConversationDeleteConfig, callback: @escaping ZIMConversationDeletedCallback)

// new interface
open func deleteConversation(by conversationID: String, conversationType: ZIMConversationType, config: ZIMConversationDeleteConfig, callback: @escaping ZIMConversationDeletedCallback)

clearConversationUnreadMessageCount

// old interface
open func clearConversationUnreadMessageCount(_ conversationID: String, conversationType: ZIMConversationType, callback: @escaping ZIMConversationUnreadMessageCountClearedCallback)

// new interface
open func clearConversationUnreadMessageCount(for conversationID: String, conversationType: ZIMConversationType, callback: @escaping ZIMConversationUnreadMessageCountClearedCallback)

send (send normal message)

// old interface
open func send(_ message: ZIMMessage, toConversationID: String, conversationType: ZIMConversationType, config: ZIMMessageSendConfig, notification: ZIMMessageSendNotification?, callback: @escaping ZIMMessageSentCallback)

// new interface
open func sendMessage(_ message: ZIMMessage, toConversationID: String, conversationType: ZIMConversationType, config: ZIMMessageSendConfig, notification: ZIMMessageSendNotification?, callback: @escaping ZIMMessageSentCallback)

send (the interface for sending rich media messages in the old version, which has been deprecated since version 2.4.0)

// old interface
@available(*, deprecated, message: "Deprecated since ZIM 2.4.0, please use another [sendMediaMessage] instead")
open func send(_ message: ZIMMediaMessage, toConversationID: String, conversationType: ZIMConversationType, config: ZIMMessageSendConfig, progress: @escaping ZIMMediaUploadingProgress, callback: @escaping ZIMMessageSentCallback)

// new interface
@available(*, deprecated, message: "Deprecated since ZIM 2.4.0, please use another [sendMediaMessage] instead")
open func sendMediaMessage(_ message: ZIMMediaMessage, toConversationID: String, conversationType: ZIMConversationType, config: ZIMMessageSendConfig, progress: @escaping ZIMMediaUploadingProgress, callback: @escaping ZIMMessageSentCallback)

send (new version sends rich media message interface, version 2.4.0 or above is available)

// old interface
open func send(_ message: ZIMMediaMessage, toConversationID: String, conversationType: ZIMConversationType, config: ZIMMessageSendConfig, notification: ZIMMediaMessageSendNotification?, callback: @escaping ZIMMessageSentCallback)

// new interface
open func sendMediaMessage(_ message: ZIMMediaMessage, toConversationID: String, conversationType: ZIMConversationType, config: ZIMMessageSendConfig, notification: ZIMMediaMessageSendNotification?, callback: @escaping ZIMMessageSentCallback)

queryHistoryMessage

// old interface
open func queryHistoryMessage(byConversationID conversationID: String, conversationType: ZIMConversationType, config: ZIMMessageQueryConfig, callback: @escaping ZIMMessageQueriedCallback)

// new interface
open func queryHistoryMessage(by conversationID: String, conversationType: ZIMConversationType, config: ZIMMessageQueryConfig, callback: @escaping ZIMMessageQueriedCallback)

deleteAllMessage

// old interface
open func deleteAllMessage(byConversationID conversationID: String, conversationType: ZIMConversationType, config: ZIMMessageDeleteConfig, callback: @escaping ZIMMessageDeletedCallback)

// new interface
open func deleteAllMessage(by conversationID: String, conversationType: ZIMConversationType, config: ZIMMessageDeleteConfig, callback: @escaping ZIMMessageDeletedCallback)

delete

// old interface
open func delete(_ messageList: [ZIMMessage], conversationID: String, conversationType: ZIMConversationType, config: ZIMMessageDeleteConfig, callback: @escaping ZIMMessageDeletedCallback)

// new interface
open func deleteMessages(_ messageList: [ZIMMessage], conversationID: String, conversationType: ZIMConversationType, config: ZIMMessageDeleteConfig, callback: @escaping ZIMMessageDeletedCallback)

insertMessage

// old interface
open func insertMessage(toLocalDB message: ZIMMessage, conversationID: String, conversationType: ZIMConversationType, senderUserID: String, callback: @escaping ZIMMessageInsertedCallback)

// new interface
open func insertMessageToLocalDB(_ message: ZIMMessage, conversationID: String, conversationType: ZIMConversationType, senderUserID: String, callback: @escaping ZIMMessageInsertedCallback)

createRoom (create and join a room)

// old interface
open func createRoom(_ roomInfo: ZIMRoomInfo, callback: @escaping ZIMRoomCreatedCallback)

// new interface
open func createRoom(with roomInfo: ZIMRoomInfo, callback: @escaping ZIMRoomCreatedCallback)

createRoom (create a room with advanced settings)

// old interface
open func createRoom(_ roomInfo: ZIMRoomInfo, config: ZIMRoomAdvancedConfig, callback: @escaping ZIMRoomCreatedCallback)

// new interface
open func createRoom(with roomInfo: ZIMRoomInfo, config: ZIMRoomAdvancedConfig, callback: @escaping ZIMRoomCreatedCallback)

joinRoom

// old interface
open func joinRoom(_ roomID: String, callback: @escaping ZIMRoomJoinedCallback)

// new interface
open func joinRoom(by roomID: String, callback: @escaping ZIMRoomJoinedCallback)

enterRoom

// old interface
open func enterRoom(_ roomInfo: ZIMRoomInfo, config: ZIMRoomAdvancedConfig?, callback: @escaping ZIMRoomEnteredCallback)

// new interface
open func enterRoom(with roomInfo: ZIMRoomInfo, config: ZIMRoomAdvancedConfig?, callback: @escaping ZIMRoomEnteredCallback)

leaveRoom

// old interface
open func leaveRoom(_ roomID: String, callback: @escaping ZIMRoomLeftCallback)

// new interface
open func leaveRoom(by roomID: String, callback: @escaping ZIMRoomLeftCallback)

queryRoomMemberList

// old interface
open func queryRoomMemberList(byRoomID roomID: String, config: ZIMRoomMemberQueryConfig, callback: @escaping ZIMRoomMemberQueriedCallback)

// new interface
open func queryRoomMemberList(by roomID: String, config: ZIMRoomMemberQueryConfig, callback: @escaping ZIMRoomMemberQueriedCallback)

queryRoomOnlineMemberCount

// old interface
open func queryRoomOnlineMemberCount(byRoomID roomID: String, callback: @escaping ZIMRoomOnlineMemberCountQueriedCallback)

// new interface
open func queryRoomOnlineMemberCount(by roomID: String, callback: @escaping ZIMRoomOnlineMemberCountQueriedCallback)

beginRoomAttributesBatchOperation

// old interface
open func beginRoomAttributesBatchOperation(withRoomID roomID: String, config: ZIMRoomAttributesBatchOperationConfig?)

// new interface
open func beginRoomAttributesBatchOperation(with roomID: String, config: ZIMRoomAttributesBatchOperationConfig?)

endRoomAttributesBatchOperation

// old interface
open func endRoomAttributesBatchOperation(withRoomID roomID: String, callback: @escaping ZIMRoomAttributesBatchOperatedCallback)

// new interface
open func endRoomAttributesBatchOperation(with roomID: String, callback: @escaping ZIMRoomAttributesBatchOperatedCallback)

queryRoomAllAttributes

// old interface
open func queryRoomAllAttributes(byRoomID roomID: String, callback: @escaping ZIMRoomAttributesQueriedCallback)

// new interface
open func queryRoomAllAttributes(by roomID: String, callback: @escaping ZIMRoomAttributesQueriedCallback)

queryRoomMembersAttributes

// old interface
open func queryRoomMembersAttributes(byUserIDs userIDs: [String], roomID: String, callback: @escaping ZIMRoomMembersAttributesQueriedCallback)

// new interface
open func queryRoomMembersAttributes(by userIDs: [String], roomID: String, callback: @escaping ZIMRoomMembersAttributesQueriedCallback)

queryRoomMemberAttributesList

// old interface
open func queryRoomMemberAttributesList(byRoomID roomID: String, config: ZIMRoomMemberAttributesQueryConfig, callback: @escaping ZIMRoomMemberAttributesListQueriedCallback)

// new interface
open func queryRoomMemberAttributesList(by roomID: String, config: ZIMRoomMemberAttributesQueryConfig, callback: @escaping ZIMRoomMemberAttributesListQueriedCallback)

createGroup (create and join a group)

// old interface
open func createGroup(_ groupInfo: ZIMGroupInfo, userIDs: [String], callback: @escaping ZIMGroupCreatedCallback)

// new interface
open func createGroup(with groupInfo: ZIMGroupInfo, userIDs: [String], callback: @escaping ZIMGroupCreatedCallback)

createGroup (create and join a group with group attributes)

// old interface
open func createGroup(_ groupInfo: ZIMGroupInfo, userIDs: [String], config: ZIMGroupAdvancedConfig, callback: @escaping ZIMGroupCreatedCallback)

// new interface
open func createGroup(with groupInfo: ZIMGroupInfo, userIDs: [String], config: ZIMGroupAdvancedConfig, callback: @escaping ZIMGroupCreatedCallback)

dismissGroup

// old interface
open func dismissGroup(_ groupID: String, callback: @escaping ZIMGroupDismissedCallback)

// new interface
open func dismissGroup(by groupID: String, callback: @escaping ZIMGroupDismissedCallback)

joinGroup

// old interface
open func joinGroup(_ groupID: String, callback: @escaping ZIMGroupJoinedCallback)

// new interface
open func joinGroup(by groupID: String, callback: @escaping ZIMGroupJoinedCallback)

leaveGroup

// old interface
open func leaveGroup(_ groupID: String, callback: @escaping ZIMGroupLeftCallback)

// new interface
open func leaveGroup(by groupID: String, callback: @escaping ZIMGroupLeftCallback)

inviteUsers

// old interface
open func inviteUsers(intoGroup userIDs: [String], groupID: String, callback: @escaping ZIMGroupUsersInvitedCallback)

// new interface
open func inviteUsersIntoGroup(with userIDs: [String], groupID: String, callback: @escaping ZIMGroupUsersInvitedCallback)

kickGroupMembers

// old interface
open func kickGroupMembers(_ userIDs: [String], groupID: String, callback: @escaping ZIMGroupMemberKickedCallback)

// new interface
open func kickGroupMembers(by userIDs: [String], groupID: String, callback: @escaping ZIMGroupMemberKickedCallback)

transferGroupOwner

// old interface
open func transferGroupOwner(toUserID: String, groupID: String, callback: @escaping ZIMGroupOwnerTransferredCallback)
// new interface
open func transferGroupOwner(to toUserID: String, groupID: String, callback: @escaping ZIMGroupOwnerTransferredCallback)

queryGroupInfo

// old interface
open func queryGroupInfo(byGroupID groupID: String, callback: @escaping ZIMGroupInfoQueriedCallback)
// new interface
open func queryGroupInfo(by groupID: String, callback: @escaping ZIMGroupInfoQueriedCallback)

deleteGroupAttributes

// old interface
open func deleteGroupAttributes(byKeys keys: [String], groupID: String, callback: @escaping ZIMGroupAttributesOperatedCallback)
// new interface
open func deleteGroupAttributes(by keys: [String], groupID: String, callback: @escaping ZIMGroupAttributesOperatedCallback)

queryGroupAttributes

// old interface
open func queryGroupAttributes(byKeys keys: [String], groupID: String, callback: @escaping ZIMGroupAttributesQueriedCallback)
// new interface
open func queryGroupAttributes(by keys: [String], groupID: String, callback: @escaping ZIMGroupAttributesQueriedCallback)

queryGroupAllAttributes

// old interface
open func queryGroupAllAttributes(byGroupID groupID: String, callback: @escaping ZIMGroupAttributesQueriedCallback)
// new interface
open func queryGroupAllAttributes(by groupID: String, callback: @escaping ZIMGroupAttributesQueriedCallback)

queryGroupMemberInfo

// old interface
open func queryGroupMemberInfo(byUserID userID: String, groupID: String, callback: @escaping ZIMGroupMemberInfoQueriedCallback)
// new interface
open func queryGroupMemberInfo(by userID: String, groupID: String, callback: @escaping ZIMGroupMemberInfoQueriedCallback)

queryGroupMemberList

// old interface
open func queryGroupMemberList(byGroupID groupID: String, config: ZIMGroupMemberQueryConfig, callback: @escaping ZIMGroupMemberListQueriedCallback)
// new interface
open func queryGroupMemberList(by groupID: String, config: ZIMGroupMemberQueryConfig, callback: @escaping ZIMGroupMemberListQueriedCallback)

queryGroupMemberCount

// old interface
open func queryGroupMemberCount(byGroupID groupID: String, callback: @escaping ZIMGroupMemberCountQueriedCallback)
// new interface
open func queryGroupMemberCount(by groupID: String, callback: @escaping ZIMGroupMemberCountQueriedCallback)

callInvite

// old interface
open func callInvite(withInvitees invitees: [String], config: ZIMCallInviteConfig, callback: @escaping ZIMCallInvitationSentCallback)
// new interface
open func callInvite(with invitees: [String], config: ZIMCallInviteConfig, callback: @escaping ZIMCallInvitationSentCallback)

callCancel

// old interface
open func callCancel(withInvitees invitees: [String], callID: String, config: ZIMCallCancelConfig, callback: @escaping ZIMCallCancelSentCallback)
// new interface
open func callCancel(with invitees: [String], callID: String, config: ZIMCallCancelConfig, callback: @escaping ZIMCallCancelSentCallback)

callAccept

// old interface
open func callAccept(withCallID callID: String, config: ZIMCallAcceptConfig, callback: @escaping ZIMCallAcceptanceSentCallback)
// new interface
open func callAccept(with callID: String, config: ZIMCallAcceptConfig, callback: @escaping ZIMCallAcceptanceSentCallback)

callReject

// old interface
open func callReject(withCallID callID: String, config: ZIMCallRejectConfig, callback: @escaping ZIMCallRejectionSentCallback)
// new interface
open func callReject(with callID: String, config: ZIMCallRejectConfig, callback: @escaping ZIMCallRejectionSentCallback)

Previous

ZIM release notes

Next

Authentication

On this page

Back to top