diff --git a/App.vue b/App.vue index 03c439c..339fbc7 100644 --- a/App.vue +++ b/App.vue @@ -1,18 +1,20 @@ - diff --git a/manifest.json b/manifest.json index 5c24411..49906af 100644 --- a/manifest.json +++ b/manifest.json @@ -43,7 +43,8 @@ "", "", "" - ] + ], + "autoSdkPermissions" : true }, /* ios打包配置 */ "ios" : {}, diff --git a/nativeplugins/android/RCUniIM.aar b/nativeplugins/android/RCUniIM.aar new file mode 100644 index 0000000..69643ed Binary files /dev/null and b/nativeplugins/android/RCUniIM.aar differ diff --git a/nativeplugins/android/libs/RongIMWrapper.jar b/nativeplugins/android/libs/RongIMWrapper.jar new file mode 100644 index 0000000..2a1b18e Binary files /dev/null and b/nativeplugins/android/libs/RongIMWrapper.jar differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/Info.plist b/nativeplugins/ios/RCUniIM.xcframework/Info.plist new file mode 100644 index 0000000..59ddd70 --- /dev/null +++ b/nativeplugins/ios/RCUniIM.xcframework/Info.plist @@ -0,0 +1,41 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + RCUniIM.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-i386_x86_64-simulator + LibraryPath + RCUniIM.framework + SupportedArchitectures + + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/Info.plist b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/Info.plist new file mode 100644 index 0000000..6bb8778 Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/Info.plist differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/Modules/module.modulemap b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/Modules/module.modulemap new file mode 100644 index 0000000..8e4a63f --- /dev/null +++ b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RCUniIM { + umbrella header "RCUniIM.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/RCUniIM b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/RCUniIM new file mode 100644 index 0000000..93c7a8d Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/RCUniIM differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeDirectory b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..e443eb1 Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeDirectory differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeRequirements b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..0ea5364 Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeRequirements differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeRequirements-1 b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..759ddbc Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..e953896 --- /dev/null +++ b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeResources @@ -0,0 +1,117 @@ + + + + + files + + Info.plist + + ZKi4BLBW63/du2J2c5nWLN6cx5s= + + Modules/module.modulemap + + EY+qdINUus6MXwr3v10xmPeDZPY= + + + files2 + + Modules/module.modulemap + + hash + + EY+qdINUus6MXwr3v10xmPeDZPY= + + hash2 + + rZTK4x62e4Sp6DkEjZ6UZS67FPB7cT+nFHnsfn57EL8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeSignature b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..1261320 Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-arm64_armv7/RCUniIM.framework/_CodeSignature/CodeSignature differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/Info.plist b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/Info.plist new file mode 100644 index 0000000..3252826 Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/Info.plist differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/Modules/module.modulemap b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/Modules/module.modulemap new file mode 100644 index 0000000..8e4a63f --- /dev/null +++ b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RCUniIM { + umbrella header "RCUniIM.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/RCUniIM b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/RCUniIM new file mode 100644 index 0000000..b6d6cae Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/RCUniIM differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeDirectory b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..9178c4a Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeDirectory differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeRequirements b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..dbf9d61 Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeRequirements differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeRequirements-1 b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..f8b35a7 Binary files /dev/null and b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..c2c3d61 --- /dev/null +++ b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeResources @@ -0,0 +1,117 @@ + + + + + files + + Info.plist + + oSjvcmxXGqLnGfyBIwlFI+peXFA= + + Modules/module.modulemap + + EY+qdINUus6MXwr3v10xmPeDZPY= + + + files2 + + Modules/module.modulemap + + hash + + EY+qdINUus6MXwr3v10xmPeDZPY= + + hash2 + + rZTK4x62e4Sp6DkEjZ6UZS67FPB7cT+nFHnsfn57EL8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeSignature b/nativeplugins/ios/RCUniIM.xcframework/ios-i386_x86_64-simulator/RCUniIM.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..e69de29 diff --git a/nativeplugins/ios/RongChatRoom.xcframework/Info.plist b/nativeplugins/ios/RongChatRoom.xcframework/Info.plist new file mode 100644 index 0000000..c011915 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/Info.plist @@ -0,0 +1,41 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-i386_x86_64-simulator + LibraryPath + RongChatRoom.framework + SupportedArchitectures + + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + RongChatRoom.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomClient.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomClient.h new file mode 100644 index 0000000..812e603 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomClient.h @@ -0,0 +1,493 @@ +// +// RCChatRoomClient.h +// RongIMLib +// +// Created by RongCloud on 2020/7/28. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +#import +#import "RCChatRoomInfo.h" +#import "RCChatRoomProtocol.h" +NS_ASSUME_NONNULL_BEGIN + +@interface RCChatRoomClient : NSObject + ++ (instancetype)sharedChatRoomClient; + +#pragma mark - Chatroom Operation + +/*! + * \~chinese + 加入聊天室(如果聊天室不存在则会创建) + + @param targetId 聊天室 ID + @param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50 + @param successBlock 加入聊天室成功的回调 + @param errorBlock 加入聊天室失败的回调 + [status: 加入聊天室失败的错误码] + + @discussion + 可以通过传入的 messageCount 设置加入聊天室成功之后需要获取的历史消息数量。 + -1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50 + 为具体获取的消息数量,最大值为 50。注:如果是 7.x 系统获取历史消息数量不要大于 30 + + @remarks 聊天室 + * + * \~english + * + Join a chatroom (it will be created if the chatroom does not exist). + + @param targetId Chatroom ID. + @param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50. + @param successBlock Callback for successful joining of the chatroom + @param errorBlock Callback for failing to join chatroom. + [status: Error code for failure to join chatroom]. + + @ discussion + You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully. + -1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50. + For the number of messages specifically obtained, the maximum value is 50. Note: if it is a 7.x system, the number of historical messages should not be greater than 30. + + @ remarks chatroom. + */ +- (void)joinChatRoom:(NSString *)targetId + messageCount:(int)messageCount + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 加入已经存在的聊天室(如果聊天室不存在返回错误 23410,人数超限返回错误 23411) + + @param targetId 聊天室 ID + @param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50 + @param successBlock 加入聊天室成功的回调 + @param errorBlock 加入聊天室失败的回调 + [status: 加入聊天室失败的错误码] + + @warning + 注意:使用 IMKit 库的会话页面,viewDidLoad 会自动调用 joinChatRoom 加入聊天室(聊天室不存在会自动创建)。 + 如果您只想加入已存在的聊天室,需要在 push 到会话页面之前调用这个方法并且 messageCount 传 -1,成功之后 push + 到会话页面,失败需要您做相应提示处理。 + + @discussion + 可以通过传入的 messageCount 设置加入聊天室成功之后,需要获取的历史消息数量。 + -1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50 + 为具体获取的消息数量,最大值为 50。 + + @remarks 聊天室 + + * \~english + * + Join an existing chatroom (return error 23410 if there is no chatroom, and return error 23411 if the number exceeds the limit). + + @param targetId Chatroom ID. + @param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50. + @param successBlock Callback for successful joining of the chatroom + @param errorBlock Callback for failing to join chatroom. + [status: Error code for failing to join chatroom]. + + @ warning + Note: using the conversation page of the IMKit library, viewDidLoad will automatically call joinChatRoom to join the chatroom (if the chatroom does not exist, it will be created automatically). + If you only want to join an existing chatroom, you shall call this method before push to the conversation page and messageCount-1, and push after success. + When you go to the conversation page, you shall be prompted to deal with the failure. + + @ discussion + You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully. + -1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50. + For the number of messages specifically obtained, the maximum value is 50. + + @ remarks chatroom + */ +- (void)joinExistChatRoom:(NSString *)targetId + messageCount:(int)messageCount + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 退出聊天室 + + @param targetId 聊天室 ID + @param successBlock 退出聊天室成功的回调 + @param errorBlock 退出聊天室失败的回调 + [status:退出聊天室失败的错误码] + + @remarks 聊天室 + * + * \~english + + Quit the chatroom. + + @param targetId Chatroom ID. + @param successBlock Callback for successful exit from the chatroom. + @param errorBlock Callback for failing to exit chatroom. + [error code for status: 's failure to exit the chatroom]. + + @ remarks chatroom. + */ +- (void)quitChatRoom:(NSString *)targetId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取聊天室的信息(包含部分成员信息和当前聊天室中的成员总数) + + @param targetId 聊天室 ID + @param count 需要获取的成员信息的数量(目前获取到的聊天室信息中仅包含不多于 20 人的成员信息,即 0 <= count <= + 20,传入 0 获取到的聊天室信息将或仅包含成员总数,不包含具体的成员列表) + @param order 需要获取的成员列表的顺序(最早加入或是最晚加入的部分成员) + @param successBlock 获取成功的回调 [chatRoomInfo:聊天室信息] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 因为聊天室一般成员数量巨大,权衡效率和用户体验,目前返回的聊天室信息仅包含不多于 20 + 人的成员信息和当前成员总数。如果您使用 RC_ChatRoom_Member_Asc + 升序方式查询,将返回最早加入的成员信息列表,按加入时间从旧到新排列;如果您使用 RC_ChatRoom_Member_Desc + 降序方式查询,将返回最晚加入的成员信息列表,按加入时间从新到旧排列。 + + @remarks 聊天室 + * + * \~english + * + Get the information of the chatroom (including some member information and the total number of members in the current chatroom). + + @param targetId chatroom ID. + @param count The number of member information that shall be obtained (at present, the chatroom information obtained contains only the member information of no more than 20 people, that is, 0 < = count < =. + 20. The chatroom information obtained by passing 0 will contain only the total number of members, not a specific list of members). + @param order The order of the list of members to be obtained (the earliest or the latest to join). + @param successBlock Callback for successful getting [chatRoomInfo: chatroom information]. + @param errorBlock Callback for failed getting [status: error code for failed getting]. + + @ discussion + Because of the large number of chatroom members and the tradeoff between efficiency and user experience, the chatroom information returned so far contains no more than 20%. + The member information of the person and the total number of current members. If you use RC_ChatRoom_Member_Asc. + Query in ascending order will return a list of the earliest member information, sorted from old to new by join time; if you use RC_ChatRoom_Member_Desc. + The query in descending order will return a list of the latest member information, sorted from new to old according to the time of joining. + + @ remarks chatroom + * + */ +- (void)getChatRoomInfo:(NSString *)targetId + count:(int)count + order:(RCChatRoomMemberOrder)order + success:(void (^)(RCChatRoomInfo *chatRoomInfo))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 设置 IMLib 的聊天室状态监听器 + + @param delegate IMLib 聊天室状态监听器 + + @remarks 聊天室 + * + * \~english + + Set the chatroom status listener for IMLib. + + @param delegate IMLib chatroom status listener. + + @ remarks chatroom + */ +- (void)setChatRoomStatusDelegate:(id)delegate; + +/*! + * \~chinese + 从服务器端获取聊天室的历史消息 + @param targetId 聊天室ID + @param recordTime 起始的消息发送时间戳,毫秒 + @param count 需要获取的消息数量, 0 < count <= 200 + @param order 拉取顺序,RC_Timestamp_Desc:倒序,RC_Timestamp_ASC:正序 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, syncTime:下次拉取消息的时间戳] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取聊天室的历史消息,但是必须先开通聊天室消息云存储功能。 + 指定开始时间,比如20169月1日10点(1472695200000), + 默认是0(正序:从存储的第一条消息开始拉取,倒序:从存储的最后一条消息开始拉取) + + * \~english + + Get the historical message of the chatroom from the server side. + @param targetId Chatroom ID. + @param recordTime Initial message sending timestamp, millisecond. + @param count The number of messages to be obtained. 0 < count < = 200. + @param order Pull order, RC_Timestamp_Desc: reverse order, RC_Timestamp_ASC: positive order. + @param successBlock Callback for successful getting [the array of historical messages obtained by messages:, and the timestamp of the next message pulled by syncTime:]. + @param errorBlock Callback for getting failure [status: Get failed error code]. + + @ discussion + This method obtains the historical messages of chatrooms from the server, but must first activate the chatroom message cloud storage feature. + Specify a start time, such as 10:00 on September 1, 2016 (1472695200000). + The default value is 0 (positive order: pull from the first message stored, reverse order: pull from the last message stored). + */ +- (void)getRemoteChatroomHistoryMessages:(NSString *)targetId + recordTime:(long long)recordTime + count:(int)count + order:(RCTimestampOrder)order + success:(void (^)(NSArray *messages, long long syncTime))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +#pragma mark - chatroom state storage function (It must first activate the chatroom state storage function) +/*! + * \~chinese +设置聊天室 KV 状态变化监听器 + +@param delegate 聊天室 KV 状态变化的监听器 + +@discussion 可以设置并实现此 delegate 来进行聊天室状态变化的监听 。SDK 会在回调中通知您聊天室状态的改变。 + +@remarks 功能设置 + + * \~english + + Set chatroom KV status change listener. + + @param delegate Listeners for KV status changes in chatrooms. + + @ discussion It can set and implement this delegate to listen to chatroom state changes. SDK will notify you of the change in the status of the chatroom in the callback. + + @ remarks function setting +*/ +- (void)setRCChatRoomKVStatusChangeDelegate:(id)delegate; + + +/** + * \~chinese + 设置聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符 + @param value 聊天室属性对应的值,最大长度 4096 个字符 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知 + @param notificationExtra 通知的自定义字段,RC:chrmKVNotiMsg 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值,且只有 key + 的创建者可以更新属性的值。 + + @remarks 聊天室 + + * \~english + + Set chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters. + @param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted. + @param notificationExtra The custom field of the notification, which will be included in the RC:chrmKVNotiMsg notification message with a maximum length of 2 kb. + @ param successBlock callback for success. + @ param errorBlock callback for failure + + @ discussion It must first activate the chatroom state storage function. + Set the custom attribute of the chatroom. When key does not exist, it means to add the attribute; when key already exists, it represents the value of the updated attribute, and only key. + Can update the value of the property. + + @ remarks chatroom + */ +- (void)setChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + value:(NSString *)value + sendNotification:(BOOL)sendNotification + autoDelete:(BOOL)autoDelete + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 强制设置聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符 + @param value 聊天室属性对应的值,最大长度 4096 个字符 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知 + @param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 强制设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值。 + + @remarks 聊天室 + + * \~english + Force the setting of chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters. + @param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted. + @param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb. + @param successBlock callback for success. + @param errorBlock callback for failure + + @discussion It must first activate the chatroom state storage function. + Force the chatroom custom property to be set, which means to add the property when the key does not exist, or to update the value of the property when the key already exists. + + @remarks chatroom + */ +- (void)forceSetChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + value:(NSString *)value + sendNotification:(BOOL)sendNotification + autoDelete:(BOOL)autoDelete + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 获取聊天室单个属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称 + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + + @remarks 聊天室 + + * \~english + Get a single attribute of a chatroom. + + @param chatroomId chatroom ID. + @param key chatroom attribute name. + @param successBlock Callback for success. + @param errorBlock Callback for failure + + @ discussion It must first activate the chatroom state storage function. + + @ remarks chatroom. + */ +- (void)getChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + success:(void (^)(NSDictionary *entry))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 获取聊天室所有自定义属性 + + @param chatroomId 聊天室 ID + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + + @remarks 聊天室 + + * \~english + + Get all attributes of a chatroom. + + @param chatroomId chatroom ID. + @param successBlock Callback for success. + @param errorBlock Callback for failure + + @ discussion It must first activate the chatroom state storage function. + + @ remarks chatroom. + */ +- (void)getAllChatRoomEntries:(NSString *)chatroomId + success:(void (^)(NSDictionary *entry))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 删除聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 删除聊天室自定义属性,只有自己设置的属性可以被删除。 + + @remarks 聊天室 + + * \~english + Delete chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb. + @ param successBlock Callback for success + @ param errorBlock Callback for failure + + @ discussion It must first activate the chatroom state storage function. + The custom properties of the chatroom are deleted and only the properties set by yourself can be deleted. + + @ remarks chatroom + */ +- (void)removeChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + sendNotification:(BOOL)sendNotification + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 强制删除聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 强制删除聊天室自定义属性。 + + @remarks 聊天室 + + * \~english + Force deletion of chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb. + @ param successBlock callback successfully. + @ param errorBlock failed callback. + + @ discussion It must first activate the chatroom state storage function. + Force the deletion of chatroom custom properties. + + @ remarks chatroom + */ +- (void)forceRemoveChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + sendNotification:(BOOL)sendNotification + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomEnumDefine.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomEnumDefine.h new file mode 100644 index 0000000..13e5f01 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomEnumDefine.h @@ -0,0 +1,95 @@ +// +// RCChatRoomEnumDefine.h +// RongChatRoom +// +// Created by RongCloud on 2020/8/12. +// Copyright © 2020 RongCloud. All rights reserved. +// +#import +#ifndef RCChatRoomEnumDefine_h +#define RCChatRoomEnumDefine_h + +#pragma mark RCChatRoomStatus +/*! + * \~chinese + 聊天室状态码 + * + * \~english + * Chatroom status code + */ +typedef NS_ENUM(NSInteger, RCChatRoomStatus) { + /*! + * \~chinese + 正在加入聊天室中 + * \~english + Joining the chatroom + */ + RCChatRoomStatus_Joining = 1, + + /*! + * \~chinese + 加入聊天室成功 + * \~english + Join the chatroom successfully + */ + RCChatRoomStatus_Joined = 2, + /*! + * \~chinese + 加入聊天室失败 + * \~english + Failed to join chatroom + */ + RCChatRoomStatus_JoinFailed = 3, + + /*! + * \~chinese + 退出了聊天室 + * \~english + Quit the chatroom + */ + RCChatRoomStatus_Quited = 4, + + /*! + * \~chinese + 聊天室被销毁 + * \~english + The chatroom is destroyed + */ + RCChatRoomStatus_Destroyed = 5, + /*! + * \~chinese + 聊天室被重置 + 由于聊天室长时间不活跃,已经被系统回收。聊天室 KV 已经被清空,请开发者刷新界面。 + * \~english + The chatroom is reset. + As the chatroom has been inactive for a long time, it has been recycled by the system. The chatroom KV has been emptied, please refresh the interface. + */ + RCChatRoomStatus_Reset = 6, + +}; + +#pragma mark RCChatRoomMemberOrder +/*! + * \~chinese + 聊天室成员的排列顺序 + * \~english + The order of chatroom members + */ +typedef NS_ENUM(NSUInteger, RCChatRoomMemberOrder) { + /*! + * \~chinese + 升序,返回最早加入的成员列表 + * \~english + Ascending order, return the list of the earliest members + */ + RC_ChatRoom_Member_Asc = 1, + + /*! + * \~chinese + 降序,返回最晚加入的成员列表 + * \~english + Descending order, return the list of the latest members + */ + RC_ChatRoom_Member_Desc = 2, +}; +#endif /* RCChatRoomEnumDefine_h */ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomInfo.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomInfo.h new file mode 100644 index 0000000..1a284b2 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomInfo.h @@ -0,0 +1,61 @@ +// +// RCChatRoomInfo.h +// RongIMLib +// +// Created by RongCloud on 16/1/11. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import +#import "RCChatRoomMemberInfo.h" +#import "RCChatRoomEnumDefine.h" +/*! + * \~chinese + 聊天室信息类 + * \~english + Chatroom information class + */ +@interface RCChatRoomInfo : NSObject + +/*! + * \~chinese + 聊天室 ID + * \~english + Chatroom ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 包含的成员信息类型 + * \~english + Type of member information included + */ +@property (nonatomic, assign) RCChatRoomMemberOrder memberOrder; + +/*! + * \~chinese + 聊天室中的部分成员信息 RCChatRoomMemberInfo 列表 + + @discussion + 如果成员类型为 RC_ChatRoom_Member_Asc,则为最早加入的成员列表,按成员加入时间升序排列; + 如果成员类型为 RC_ChatRoom_Member_Desc,则为最晚加入的成员列表,按成员加入时间降序排列。 + + * \~english + RCChatRoomMemberInfo list of some member information in the chatroom. + + @ discussion + If the member type is RC_ChatRoom_Member_Asc, it is the list of the earliest members, sorted in ascending order by the time they are added. + If the member type is RC_ChatRoom_Member_Desc, it is the list of the latest members, sorted in descending order by the time they are added. + */ +@property (nonatomic, strong) NSArray *memberInfoArray; + +/*! + * \~chinese + 当前聊天室的成员总数 + * \~english + Total number of members of the current chatroom. + */ +@property (nonatomic, assign) int totalMemberCount; + +@end diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomMemberInfo.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomMemberInfo.h new file mode 100644 index 0000000..7a9b3c9 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomMemberInfo.h @@ -0,0 +1,35 @@ +// +// RCChatRoomMemberInfo.h +// RongIMLib +// +// Created by RongCloud on 16/1/10. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 聊天室成员信息类 + * \~english + Chatroom member information class + */ +@interface RCChatRoomMemberInfo : NSObject + +/*! + * \~chinese + 用户 ID + * \~english + User ID + */ +@property (nonatomic, copy) NSString *userId; + +/*! + * \~chinese + 用户加入聊天室时间(Unix 时间戳,毫秒) + * \~english + Time when the user joins the chatroom (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long joinTime; + +@end diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomProtocol.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomProtocol.h new file mode 100644 index 0000000..fed3aab --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatRoomProtocol.h @@ -0,0 +1,194 @@ +// +// RCChatRoomProtocol.h +// RongChatRoom +// +// Created by RongCloud on 2020/8/12. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#ifndef RCChatRoomProtocol_h +#define RCChatRoomProtocol_h + +typedef NS_ENUM(NSUInteger, RCChatRoomDestroyType) { + /*! + * \~chinese + 开发者主动销毁 + * \~english + Developers take the initiative to destroy + */ + RCChatRoomDestroyTypeManual = 0, + + /*! + * \~chinese + 聊天室长时间不活跃,被系统自动回收 + * \~english + The chatroom is inactive for a long time and is automatically recycled by the system. + */ + RCChatRoomDestroyTypeAuto = 3 +}; + +#pragma mark - RCChatRoomStatusDelegate + +/*! + * \~chinese + 聊天室状态的的监听器 + + @discussion + 设置IMLib的聊天室状态监听器,请参考 RCChatRoomClient 的 setChatRoomStatusDelegate: 方法。 + + * \~english + Listeners for the status of chatrooms. + + @ discussion + To set the chatroom status listener of chatroom, please refer to the setChatRoomStatusDelegate: method of RCChatRoomClient. + */ +@protocol RCChatRoomStatusDelegate + +/*! + * \~chinese + 开始加入聊天室的回调 + + @param chatroomId 聊天室ID + + * \~english + Callback for joining the chatroom. + +@param chatroomId Chatroom ID. + */ +- (void)onChatRoomJoining:(NSString *)chatroomId; + +/*! + * \~chinese + 加入聊天室成功的回调 + + @param chatroomId 聊天室ID + + * \~english + Callback for successful joining of the chatroom + + @param chatroomId Chatroom ID. + */ +- (void)onChatRoomJoined:(NSString *)chatroomId; + +/*! + * \~chinese + 加入聊天室失败的回调 + + @param chatroomId 聊天室ID + @param errorCode 加入失败的错误码 + + @discussion + 如果错误码是 KICKED_FROM_CHATROOM 或 RC_CHATROOM_NOT_EXIST ,则不会自动重新加入聊天室,App需要按照自己的逻辑处理。 + + * \~english + Callback for failed to join chatroom. + + @param chatroomId Chatroom ID. + @param errorCode Add a failed error code. + + @ discussion + If the error code is KICKED_FROM_CHATROOM or RC_CHATROOM_NOT_EXIST, it will not automatically rejoin the chatroom, App shall follow its own logic. + */ +- (void)onChatRoomJoinFailed:(NSString *)chatroomId errorCode:(RCErrorCode)errorCode; + +/*! + * \~chinese + 加入聊天室成功,但是聊天室被重置。接收到此回调后,还会收到 onChatRoomJoined:回调。 + + @param chatroomId 聊天室ID + + * \~english + The chatroom is jointed successfully, but the chatroom is reset. After receiving this callback, you will also receive an onChatRoomJoined: callback. + + + @param chatroomId Chatroom ID. + */ +- (void)onChatRoomReset:(NSString *)chatroomId; + +/*! + * \~chinese + 退出聊天室成功的回调 + + @param chatroomId 聊天室ID + + * \~english + Callback for successful exit from the chatroom + @param chatroomId Chatroom ID. + */ +- (void)onChatRoomQuited:(NSString *)chatroomId; + +/*! + * \~chinese + 聊天室被销毁的回调,用户在线的时候房间被销毁才会收到此回调。 + + @param chatroomId 聊天室ID + @param type 聊天室销毁原因 + + * \~english + The callback in which the chatroom is destructed. The callback will only be received when the room is destructed when the user is online. + + @param chatroomId Chatroom ID. + @param type Reasons for the destruction of chatrooms. + */ +- (void)onChatRoomDestroyed:(NSString *)chatroomId type:(RCChatRoomDestroyType)type; + +@end + + +#pragma mark - RCChatRoomKVStatusChangeDelegate + +/** + * \~chinese + ChatRoom 聊天室 KV 状态变化监听器 + @discussion 设置代理请参考 RCIMClient 的 setRCChatRoomKVStatusChangeDelegate: 方法。 + + * \~english + ChatRoom ChatRoom KV Status ChangeDelegate + @discussion Please refer to the setRCChatRoomKVStatusChangeDelegate: method of RCChatRoomClient。 + */ +@protocol RCChatRoomKVStatusChangeDelegate + + +/** + * \~chinese + ChatRoom 刚加入聊天室时 KV 同步完成的回调 + + @param roomId 聊天室 Id + + * \~english + Callback of ChatRoom kv did sync + @param roomId ChatRoom Id + */ +- (void)chatRoomKVDidSync:(NSString *)roomId; + +/** + * \~chinese + ChatRoom 聊天室 KV 变化的回调 + + @param roomId 聊天室 Id + @param entry KV 字典,如果刚进入聊天室时存在 KV,会通过此回调将所有 KV 返回,再次回调时为其他人设置或者修改 KV + + * \~english + Callback of Chatroom kv update + @param roomId ChatRoom Id + @param entry KV map,If there are KVs when you first enter the chat room, all KVs will be returned through this callback. When you call back again, you can set or modify the KVs for others + */ +- (void)chatRoomKVDidUpdate:(NSString *)roomId entry:(NSDictionary *)entry; + +/** + * \~chinese + ChatRoom 聊天室 KV 被删除的回调 + + @param roomId 聊天室 Id + @param entry KV 字典 + + * \~english + Callback when chat room KV is deleted + @param roomId Chatroom Id + @param entry KV dictionary + */ +- (void)chatRoomKVDidRemove:(NSString *)roomId entry:(NSDictionary *)entry; + +@end + +#endif /* RCChatRoomProtocol_h */ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatroomKVNotificationMessage.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatroomKVNotificationMessage.h new file mode 100644 index 0000000..99c7902 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RCChatroomKVNotificationMessage.h @@ -0,0 +1,113 @@ +// +// RCChatroomKVNotificationMessage.h +// RongIMLib +// +// Created by RongCloud on 2019/10/14. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + * \~chinese + 聊天室自定义属性通知消息的类型名 + * \~english + The type name of the custom property notification message of chatroom + */ +#define RCChatroomKVNotificationMessageTypeIdentifier @"RC:chrmKVNotiMsg" + +typedef NS_ENUM(NSInteger, RCChatroomKVNotificationType) { + /*! + * \~chinese + 设置 KV 的操作 + * \~english + Set the operation of KV. + */ + RCChatroomKVNotificationTypeSet = 1, + /*! + * \~chinese + 删除 KV 的操作 + * \~english + Delete KV operation. + */ + RCChatroomKVNotificationTypeRemove = 2 +}; + +/** + * \~chinese +聊天室自定义属性通知消息 + +@discussion 不要随意构造此类消息发送,调用设置或者删除接口时会自动构建。 +@discussion 此消息不存储不计入未读消息数。 + +@remarks 通知类消息 + + * \~english + Custom attribute notification message of chatroom + + @ discussion do not construct this kind of message for sending at will, which will be built automatically when you call the interface to set or delete. + @ discussion This message is not stored and does not count as unread messages. + + @ remarks notification message +*/ +@interface RCChatroomKVNotificationMessage : RCMessageContent + +/*! + * \~chinese + 聊天室操作的类型 + * \~english + Types of chatroom operations +*/ +@property (nonatomic, assign) RCChatroomKVNotificationType type; + +/*! + * \~chinese + 聊天室属性名称 + * \~english + Chatroom attribute name + */ +@property (nonatomic, copy) NSString *key; + +/*! + * \~chinese + 聊天室属性对应的值 + * \~english + The value corresponding to the chatroom attribute + */ +@property (nonatomic, copy) NSString *value; + +/*! + * \~chinese + 通知消息的自定义字段,最大长度 2 kb + * \~english + Custom field of notification message with a maximum length of 2 kb. + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese +初始化聊天室自定义属性通知消息 + +@param key 聊天室属性名称 +@param value 聊天室属性对应的值(删除 key 时不用传) +@param extra 通知消息的自定义字段 +@return 聊天室自定义属性通知消息的对象 + + * \~english + Initialize chatroom custom property notification message. + + @param key Chatroom attribute name. + @param value The value corresponding to the chatroom attribute (you need not pass it when deleting key). + @param extra Custom fields for notification messages. + @ return chatroom custom attribute notification message object. +*/ ++ (instancetype)notificationWithType:(RCChatroomKVNotificationType)type + key:(NSString *)key + value:(NSString *_Nullable)value + extra:(NSString *)extra; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RongChatRoom.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RongChatRoom.h new file mode 100644 index 0000000..91aeee1 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Headers/RongChatRoom.h @@ -0,0 +1,24 @@ +// +// RongChatRoom.h +// RongChatRoom +// +// Created by RongCloud on 2020/8/12. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +//! Project version number for RongChatRoom. +FOUNDATION_EXPORT double RongChatRoomVersionNumber; + +//! Project version string for RongChatRoom. +FOUNDATION_EXPORT const unsigned char RongChatRoomVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import +#import + +#import +#import +#import diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Info.plist b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Info.plist new file mode 100644 index 0000000..f82f6f2 Binary files /dev/null and b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Info.plist differ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Modules/module.modulemap b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Modules/module.modulemap new file mode 100644 index 0000000..e6751a8 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RongChatRoom { + umbrella header "RongChatRoom.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/RongChatRoom b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/RongChatRoom new file mode 100644 index 0000000..f1f2926 Binary files /dev/null and b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/RongChatRoom differ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..4b74b9d --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-arm64_armv7/RongChatRoom.framework/_CodeSignature/CodeResources @@ -0,0 +1,222 @@ + + + + + files + + Headers/RCChatRoomClient.h + + bHxBhPeOLXuFASnXldyeV74YCWk= + + Headers/RCChatRoomEnumDefine.h + + zv7mAsrXxtmdM/b8sHgXZr+DLWc= + + Headers/RCChatRoomInfo.h + + 1K8y8REFfhdvDjJFhzgNfjVN5sg= + + Headers/RCChatRoomMemberInfo.h + + JNhNMYGwCqxCgS5Vj9cYeD/G7nA= + + Headers/RCChatRoomProtocol.h + + NDf0pCQxJTn/x946UJFvBXuaXWU= + + Headers/RCChatroomKVNotificationMessage.h + + Dm+9WpeVGhsqtwWpIhMv3KH+/f4= + + Headers/RongChatRoom.h + + sjzv/jDEnB3IJ+CLA/NTTK5qVQo= + + Info.plist + + ybf+p1Ql7FQghQgCVUBZ3xvVv4A= + + Modules/module.modulemap + + ii0hqjTTGnemjpGIXXGYCaoB99o= + + + files2 + + Headers/RCChatRoomClient.h + + hash + + bHxBhPeOLXuFASnXldyeV74YCWk= + + hash2 + + le0FCKXdsYuhyP/972BrG0UVEw8dfFPqPG176nlwMDs= + + + Headers/RCChatRoomEnumDefine.h + + hash + + zv7mAsrXxtmdM/b8sHgXZr+DLWc= + + hash2 + + vOcMDTC0WmSYFq5KODZv+d9IDCyugugAGP+cqs9Y9gU= + + + Headers/RCChatRoomInfo.h + + hash + + 1K8y8REFfhdvDjJFhzgNfjVN5sg= + + hash2 + + bhnKJoKVwRtOUdXzi83mWkE8+HIsbQexj+gFh7P4vYo= + + + Headers/RCChatRoomMemberInfo.h + + hash + + JNhNMYGwCqxCgS5Vj9cYeD/G7nA= + + hash2 + + VC37urijk9NrXd4w+mPAB7nWZXr6E3/HcCp3neA4Wnw= + + + Headers/RCChatRoomProtocol.h + + hash + + NDf0pCQxJTn/x946UJFvBXuaXWU= + + hash2 + + pJY+fGmISI50210cnPmVwzidjkw6YxrIuus/tCcvXXA= + + + Headers/RCChatroomKVNotificationMessage.h + + hash + + Dm+9WpeVGhsqtwWpIhMv3KH+/f4= + + hash2 + + aoprHJOrSa8R1D3TeScNxk4wH35GXRjU+HSN+1vLzG0= + + + Headers/RongChatRoom.h + + hash + + sjzv/jDEnB3IJ+CLA/NTTK5qVQo= + + hash2 + + bQ1x/StpqaAd5J3zYWInTmyaOH/yzA5WdSnG6vrkbC4= + + + Modules/module.modulemap + + hash + + ii0hqjTTGnemjpGIXXGYCaoB99o= + + hash2 + + wJMy+vWcBIzIHUTDDqJsgKqxiJI3RYxErBRoeokdByQ= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomClient.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomClient.h new file mode 100644 index 0000000..812e603 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomClient.h @@ -0,0 +1,493 @@ +// +// RCChatRoomClient.h +// RongIMLib +// +// Created by RongCloud on 2020/7/28. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +#import +#import "RCChatRoomInfo.h" +#import "RCChatRoomProtocol.h" +NS_ASSUME_NONNULL_BEGIN + +@interface RCChatRoomClient : NSObject + ++ (instancetype)sharedChatRoomClient; + +#pragma mark - Chatroom Operation + +/*! + * \~chinese + 加入聊天室(如果聊天室不存在则会创建) + + @param targetId 聊天室 ID + @param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50 + @param successBlock 加入聊天室成功的回调 + @param errorBlock 加入聊天室失败的回调 + [status: 加入聊天室失败的错误码] + + @discussion + 可以通过传入的 messageCount 设置加入聊天室成功之后需要获取的历史消息数量。 + -1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50 + 为具体获取的消息数量,最大值为 50。注:如果是 7.x 系统获取历史消息数量不要大于 30 + + @remarks 聊天室 + * + * \~english + * + Join a chatroom (it will be created if the chatroom does not exist). + + @param targetId Chatroom ID. + @param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50. + @param successBlock Callback for successful joining of the chatroom + @param errorBlock Callback for failing to join chatroom. + [status: Error code for failure to join chatroom]. + + @ discussion + You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully. + -1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50. + For the number of messages specifically obtained, the maximum value is 50. Note: if it is a 7.x system, the number of historical messages should not be greater than 30. + + @ remarks chatroom. + */ +- (void)joinChatRoom:(NSString *)targetId + messageCount:(int)messageCount + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 加入已经存在的聊天室(如果聊天室不存在返回错误 23410,人数超限返回错误 23411) + + @param targetId 聊天室 ID + @param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50 + @param successBlock 加入聊天室成功的回调 + @param errorBlock 加入聊天室失败的回调 + [status: 加入聊天室失败的错误码] + + @warning + 注意:使用 IMKit 库的会话页面,viewDidLoad 会自动调用 joinChatRoom 加入聊天室(聊天室不存在会自动创建)。 + 如果您只想加入已存在的聊天室,需要在 push 到会话页面之前调用这个方法并且 messageCount 传 -1,成功之后 push + 到会话页面,失败需要您做相应提示处理。 + + @discussion + 可以通过传入的 messageCount 设置加入聊天室成功之后,需要获取的历史消息数量。 + -1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50 + 为具体获取的消息数量,最大值为 50。 + + @remarks 聊天室 + + * \~english + * + Join an existing chatroom (return error 23410 if there is no chatroom, and return error 23411 if the number exceeds the limit). + + @param targetId Chatroom ID. + @param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50. + @param successBlock Callback for successful joining of the chatroom + @param errorBlock Callback for failing to join chatroom. + [status: Error code for failing to join chatroom]. + + @ warning + Note: using the conversation page of the IMKit library, viewDidLoad will automatically call joinChatRoom to join the chatroom (if the chatroom does not exist, it will be created automatically). + If you only want to join an existing chatroom, you shall call this method before push to the conversation page and messageCount-1, and push after success. + When you go to the conversation page, you shall be prompted to deal with the failure. + + @ discussion + You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully. + -1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50. + For the number of messages specifically obtained, the maximum value is 50. + + @ remarks chatroom + */ +- (void)joinExistChatRoom:(NSString *)targetId + messageCount:(int)messageCount + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 退出聊天室 + + @param targetId 聊天室 ID + @param successBlock 退出聊天室成功的回调 + @param errorBlock 退出聊天室失败的回调 + [status:退出聊天室失败的错误码] + + @remarks 聊天室 + * + * \~english + + Quit the chatroom. + + @param targetId Chatroom ID. + @param successBlock Callback for successful exit from the chatroom. + @param errorBlock Callback for failing to exit chatroom. + [error code for status: 's failure to exit the chatroom]. + + @ remarks chatroom. + */ +- (void)quitChatRoom:(NSString *)targetId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取聊天室的信息(包含部分成员信息和当前聊天室中的成员总数) + + @param targetId 聊天室 ID + @param count 需要获取的成员信息的数量(目前获取到的聊天室信息中仅包含不多于 20 人的成员信息,即 0 <= count <= + 20,传入 0 获取到的聊天室信息将或仅包含成员总数,不包含具体的成员列表) + @param order 需要获取的成员列表的顺序(最早加入或是最晚加入的部分成员) + @param successBlock 获取成功的回调 [chatRoomInfo:聊天室信息] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 因为聊天室一般成员数量巨大,权衡效率和用户体验,目前返回的聊天室信息仅包含不多于 20 + 人的成员信息和当前成员总数。如果您使用 RC_ChatRoom_Member_Asc + 升序方式查询,将返回最早加入的成员信息列表,按加入时间从旧到新排列;如果您使用 RC_ChatRoom_Member_Desc + 降序方式查询,将返回最晚加入的成员信息列表,按加入时间从新到旧排列。 + + @remarks 聊天室 + * + * \~english + * + Get the information of the chatroom (including some member information and the total number of members in the current chatroom). + + @param targetId chatroom ID. + @param count The number of member information that shall be obtained (at present, the chatroom information obtained contains only the member information of no more than 20 people, that is, 0 < = count < =. + 20. The chatroom information obtained by passing 0 will contain only the total number of members, not a specific list of members). + @param order The order of the list of members to be obtained (the earliest or the latest to join). + @param successBlock Callback for successful getting [chatRoomInfo: chatroom information]. + @param errorBlock Callback for failed getting [status: error code for failed getting]. + + @ discussion + Because of the large number of chatroom members and the tradeoff between efficiency and user experience, the chatroom information returned so far contains no more than 20%. + The member information of the person and the total number of current members. If you use RC_ChatRoom_Member_Asc. + Query in ascending order will return a list of the earliest member information, sorted from old to new by join time; if you use RC_ChatRoom_Member_Desc. + The query in descending order will return a list of the latest member information, sorted from new to old according to the time of joining. + + @ remarks chatroom + * + */ +- (void)getChatRoomInfo:(NSString *)targetId + count:(int)count + order:(RCChatRoomMemberOrder)order + success:(void (^)(RCChatRoomInfo *chatRoomInfo))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 设置 IMLib 的聊天室状态监听器 + + @param delegate IMLib 聊天室状态监听器 + + @remarks 聊天室 + * + * \~english + + Set the chatroom status listener for IMLib. + + @param delegate IMLib chatroom status listener. + + @ remarks chatroom + */ +- (void)setChatRoomStatusDelegate:(id)delegate; + +/*! + * \~chinese + 从服务器端获取聊天室的历史消息 + @param targetId 聊天室ID + @param recordTime 起始的消息发送时间戳,毫秒 + @param count 需要获取的消息数量, 0 < count <= 200 + @param order 拉取顺序,RC_Timestamp_Desc:倒序,RC_Timestamp_ASC:正序 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, syncTime:下次拉取消息的时间戳] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取聊天室的历史消息,但是必须先开通聊天室消息云存储功能。 + 指定开始时间,比如20169月1日10点(1472695200000), + 默认是0(正序:从存储的第一条消息开始拉取,倒序:从存储的最后一条消息开始拉取) + + * \~english + + Get the historical message of the chatroom from the server side. + @param targetId Chatroom ID. + @param recordTime Initial message sending timestamp, millisecond. + @param count The number of messages to be obtained. 0 < count < = 200. + @param order Pull order, RC_Timestamp_Desc: reverse order, RC_Timestamp_ASC: positive order. + @param successBlock Callback for successful getting [the array of historical messages obtained by messages:, and the timestamp of the next message pulled by syncTime:]. + @param errorBlock Callback for getting failure [status: Get failed error code]. + + @ discussion + This method obtains the historical messages of chatrooms from the server, but must first activate the chatroom message cloud storage feature. + Specify a start time, such as 10:00 on September 1, 2016 (1472695200000). + The default value is 0 (positive order: pull from the first message stored, reverse order: pull from the last message stored). + */ +- (void)getRemoteChatroomHistoryMessages:(NSString *)targetId + recordTime:(long long)recordTime + count:(int)count + order:(RCTimestampOrder)order + success:(void (^)(NSArray *messages, long long syncTime))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +#pragma mark - chatroom state storage function (It must first activate the chatroom state storage function) +/*! + * \~chinese +设置聊天室 KV 状态变化监听器 + +@param delegate 聊天室 KV 状态变化的监听器 + +@discussion 可以设置并实现此 delegate 来进行聊天室状态变化的监听 。SDK 会在回调中通知您聊天室状态的改变。 + +@remarks 功能设置 + + * \~english + + Set chatroom KV status change listener. + + @param delegate Listeners for KV status changes in chatrooms. + + @ discussion It can set and implement this delegate to listen to chatroom state changes. SDK will notify you of the change in the status of the chatroom in the callback. + + @ remarks function setting +*/ +- (void)setRCChatRoomKVStatusChangeDelegate:(id)delegate; + + +/** + * \~chinese + 设置聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符 + @param value 聊天室属性对应的值,最大长度 4096 个字符 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知 + @param notificationExtra 通知的自定义字段,RC:chrmKVNotiMsg 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值,且只有 key + 的创建者可以更新属性的值。 + + @remarks 聊天室 + + * \~english + + Set chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters. + @param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted. + @param notificationExtra The custom field of the notification, which will be included in the RC:chrmKVNotiMsg notification message with a maximum length of 2 kb. + @ param successBlock callback for success. + @ param errorBlock callback for failure + + @ discussion It must first activate the chatroom state storage function. + Set the custom attribute of the chatroom. When key does not exist, it means to add the attribute; when key already exists, it represents the value of the updated attribute, and only key. + Can update the value of the property. + + @ remarks chatroom + */ +- (void)setChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + value:(NSString *)value + sendNotification:(BOOL)sendNotification + autoDelete:(BOOL)autoDelete + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 强制设置聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符 + @param value 聊天室属性对应的值,最大长度 4096 个字符 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知 + @param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 强制设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值。 + + @remarks 聊天室 + + * \~english + Force the setting of chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters. + @param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted. + @param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb. + @param successBlock callback for success. + @param errorBlock callback for failure + + @discussion It must first activate the chatroom state storage function. + Force the chatroom custom property to be set, which means to add the property when the key does not exist, or to update the value of the property when the key already exists. + + @remarks chatroom + */ +- (void)forceSetChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + value:(NSString *)value + sendNotification:(BOOL)sendNotification + autoDelete:(BOOL)autoDelete + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 获取聊天室单个属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称 + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + + @remarks 聊天室 + + * \~english + Get a single attribute of a chatroom. + + @param chatroomId chatroom ID. + @param key chatroom attribute name. + @param successBlock Callback for success. + @param errorBlock Callback for failure + + @ discussion It must first activate the chatroom state storage function. + + @ remarks chatroom. + */ +- (void)getChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + success:(void (^)(NSDictionary *entry))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 获取聊天室所有自定义属性 + + @param chatroomId 聊天室 ID + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + + @remarks 聊天室 + + * \~english + + Get all attributes of a chatroom. + + @param chatroomId chatroom ID. + @param successBlock Callback for success. + @param errorBlock Callback for failure + + @ discussion It must first activate the chatroom state storage function. + + @ remarks chatroom. + */ +- (void)getAllChatRoomEntries:(NSString *)chatroomId + success:(void (^)(NSDictionary *entry))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 删除聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 删除聊天室自定义属性,只有自己设置的属性可以被删除。 + + @remarks 聊天室 + + * \~english + Delete chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb. + @ param successBlock Callback for success + @ param errorBlock Callback for failure + + @ discussion It must first activate the chatroom state storage function. + The custom properties of the chatroom are deleted and only the properties set by yourself can be deleted. + + @ remarks chatroom + */ +- (void)removeChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + sendNotification:(BOOL)sendNotification + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 强制删除聊天室自定义属性 + + @param chatroomId 聊天室 ID + @param key 聊天室属性名称 + @param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage + 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra) + @param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @discussion 必须先开通聊天室状态存储功能 + 强制删除聊天室自定义属性。 + + @remarks 聊天室 + + * \~english + Force deletion of chatroom custom properties. + + @param chatroomId Chatroom ID. + @param key Chatroom attribute name. + @param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage. + Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra). + @param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb. + @ param successBlock callback successfully. + @ param errorBlock failed callback. + + @ discussion It must first activate the chatroom state storage function. + Force the deletion of chatroom custom properties. + + @ remarks chatroom + */ +- (void)forceRemoveChatRoomEntry:(NSString *)chatroomId + key:(NSString *)key + sendNotification:(BOOL)sendNotification + notificationExtra:(NSString *)notificationExtra + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomEnumDefine.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomEnumDefine.h new file mode 100644 index 0000000..13e5f01 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomEnumDefine.h @@ -0,0 +1,95 @@ +// +// RCChatRoomEnumDefine.h +// RongChatRoom +// +// Created by RongCloud on 2020/8/12. +// Copyright © 2020 RongCloud. All rights reserved. +// +#import +#ifndef RCChatRoomEnumDefine_h +#define RCChatRoomEnumDefine_h + +#pragma mark RCChatRoomStatus +/*! + * \~chinese + 聊天室状态码 + * + * \~english + * Chatroom status code + */ +typedef NS_ENUM(NSInteger, RCChatRoomStatus) { + /*! + * \~chinese + 正在加入聊天室中 + * \~english + Joining the chatroom + */ + RCChatRoomStatus_Joining = 1, + + /*! + * \~chinese + 加入聊天室成功 + * \~english + Join the chatroom successfully + */ + RCChatRoomStatus_Joined = 2, + /*! + * \~chinese + 加入聊天室失败 + * \~english + Failed to join chatroom + */ + RCChatRoomStatus_JoinFailed = 3, + + /*! + * \~chinese + 退出了聊天室 + * \~english + Quit the chatroom + */ + RCChatRoomStatus_Quited = 4, + + /*! + * \~chinese + 聊天室被销毁 + * \~english + The chatroom is destroyed + */ + RCChatRoomStatus_Destroyed = 5, + /*! + * \~chinese + 聊天室被重置 + 由于聊天室长时间不活跃,已经被系统回收。聊天室 KV 已经被清空,请开发者刷新界面。 + * \~english + The chatroom is reset. + As the chatroom has been inactive for a long time, it has been recycled by the system. The chatroom KV has been emptied, please refresh the interface. + */ + RCChatRoomStatus_Reset = 6, + +}; + +#pragma mark RCChatRoomMemberOrder +/*! + * \~chinese + 聊天室成员的排列顺序 + * \~english + The order of chatroom members + */ +typedef NS_ENUM(NSUInteger, RCChatRoomMemberOrder) { + /*! + * \~chinese + 升序,返回最早加入的成员列表 + * \~english + Ascending order, return the list of the earliest members + */ + RC_ChatRoom_Member_Asc = 1, + + /*! + * \~chinese + 降序,返回最晚加入的成员列表 + * \~english + Descending order, return the list of the latest members + */ + RC_ChatRoom_Member_Desc = 2, +}; +#endif /* RCChatRoomEnumDefine_h */ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomInfo.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomInfo.h new file mode 100644 index 0000000..1a284b2 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomInfo.h @@ -0,0 +1,61 @@ +// +// RCChatRoomInfo.h +// RongIMLib +// +// Created by RongCloud on 16/1/11. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import +#import "RCChatRoomMemberInfo.h" +#import "RCChatRoomEnumDefine.h" +/*! + * \~chinese + 聊天室信息类 + * \~english + Chatroom information class + */ +@interface RCChatRoomInfo : NSObject + +/*! + * \~chinese + 聊天室 ID + * \~english + Chatroom ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 包含的成员信息类型 + * \~english + Type of member information included + */ +@property (nonatomic, assign) RCChatRoomMemberOrder memberOrder; + +/*! + * \~chinese + 聊天室中的部分成员信息 RCChatRoomMemberInfo 列表 + + @discussion + 如果成员类型为 RC_ChatRoom_Member_Asc,则为最早加入的成员列表,按成员加入时间升序排列; + 如果成员类型为 RC_ChatRoom_Member_Desc,则为最晚加入的成员列表,按成员加入时间降序排列。 + + * \~english + RCChatRoomMemberInfo list of some member information in the chatroom. + + @ discussion + If the member type is RC_ChatRoom_Member_Asc, it is the list of the earliest members, sorted in ascending order by the time they are added. + If the member type is RC_ChatRoom_Member_Desc, it is the list of the latest members, sorted in descending order by the time they are added. + */ +@property (nonatomic, strong) NSArray *memberInfoArray; + +/*! + * \~chinese + 当前聊天室的成员总数 + * \~english + Total number of members of the current chatroom. + */ +@property (nonatomic, assign) int totalMemberCount; + +@end diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomMemberInfo.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomMemberInfo.h new file mode 100644 index 0000000..7a9b3c9 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomMemberInfo.h @@ -0,0 +1,35 @@ +// +// RCChatRoomMemberInfo.h +// RongIMLib +// +// Created by RongCloud on 16/1/10. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 聊天室成员信息类 + * \~english + Chatroom member information class + */ +@interface RCChatRoomMemberInfo : NSObject + +/*! + * \~chinese + 用户 ID + * \~english + User ID + */ +@property (nonatomic, copy) NSString *userId; + +/*! + * \~chinese + 用户加入聊天室时间(Unix 时间戳,毫秒) + * \~english + Time when the user joins the chatroom (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long joinTime; + +@end diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomProtocol.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomProtocol.h new file mode 100644 index 0000000..fed3aab --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatRoomProtocol.h @@ -0,0 +1,194 @@ +// +// RCChatRoomProtocol.h +// RongChatRoom +// +// Created by RongCloud on 2020/8/12. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#ifndef RCChatRoomProtocol_h +#define RCChatRoomProtocol_h + +typedef NS_ENUM(NSUInteger, RCChatRoomDestroyType) { + /*! + * \~chinese + 开发者主动销毁 + * \~english + Developers take the initiative to destroy + */ + RCChatRoomDestroyTypeManual = 0, + + /*! + * \~chinese + 聊天室长时间不活跃,被系统自动回收 + * \~english + The chatroom is inactive for a long time and is automatically recycled by the system. + */ + RCChatRoomDestroyTypeAuto = 3 +}; + +#pragma mark - RCChatRoomStatusDelegate + +/*! + * \~chinese + 聊天室状态的的监听器 + + @discussion + 设置IMLib的聊天室状态监听器,请参考 RCChatRoomClient 的 setChatRoomStatusDelegate: 方法。 + + * \~english + Listeners for the status of chatrooms. + + @ discussion + To set the chatroom status listener of chatroom, please refer to the setChatRoomStatusDelegate: method of RCChatRoomClient. + */ +@protocol RCChatRoomStatusDelegate + +/*! + * \~chinese + 开始加入聊天室的回调 + + @param chatroomId 聊天室ID + + * \~english + Callback for joining the chatroom. + +@param chatroomId Chatroom ID. + */ +- (void)onChatRoomJoining:(NSString *)chatroomId; + +/*! + * \~chinese + 加入聊天室成功的回调 + + @param chatroomId 聊天室ID + + * \~english + Callback for successful joining of the chatroom + + @param chatroomId Chatroom ID. + */ +- (void)onChatRoomJoined:(NSString *)chatroomId; + +/*! + * \~chinese + 加入聊天室失败的回调 + + @param chatroomId 聊天室ID + @param errorCode 加入失败的错误码 + + @discussion + 如果错误码是 KICKED_FROM_CHATROOM 或 RC_CHATROOM_NOT_EXIST ,则不会自动重新加入聊天室,App需要按照自己的逻辑处理。 + + * \~english + Callback for failed to join chatroom. + + @param chatroomId Chatroom ID. + @param errorCode Add a failed error code. + + @ discussion + If the error code is KICKED_FROM_CHATROOM or RC_CHATROOM_NOT_EXIST, it will not automatically rejoin the chatroom, App shall follow its own logic. + */ +- (void)onChatRoomJoinFailed:(NSString *)chatroomId errorCode:(RCErrorCode)errorCode; + +/*! + * \~chinese + 加入聊天室成功,但是聊天室被重置。接收到此回调后,还会收到 onChatRoomJoined:回调。 + + @param chatroomId 聊天室ID + + * \~english + The chatroom is jointed successfully, but the chatroom is reset. After receiving this callback, you will also receive an onChatRoomJoined: callback. + + + @param chatroomId Chatroom ID. + */ +- (void)onChatRoomReset:(NSString *)chatroomId; + +/*! + * \~chinese + 退出聊天室成功的回调 + + @param chatroomId 聊天室ID + + * \~english + Callback for successful exit from the chatroom + @param chatroomId Chatroom ID. + */ +- (void)onChatRoomQuited:(NSString *)chatroomId; + +/*! + * \~chinese + 聊天室被销毁的回调,用户在线的时候房间被销毁才会收到此回调。 + + @param chatroomId 聊天室ID + @param type 聊天室销毁原因 + + * \~english + The callback in which the chatroom is destructed. The callback will only be received when the room is destructed when the user is online. + + @param chatroomId Chatroom ID. + @param type Reasons for the destruction of chatrooms. + */ +- (void)onChatRoomDestroyed:(NSString *)chatroomId type:(RCChatRoomDestroyType)type; + +@end + + +#pragma mark - RCChatRoomKVStatusChangeDelegate + +/** + * \~chinese + ChatRoom 聊天室 KV 状态变化监听器 + @discussion 设置代理请参考 RCIMClient 的 setRCChatRoomKVStatusChangeDelegate: 方法。 + + * \~english + ChatRoom ChatRoom KV Status ChangeDelegate + @discussion Please refer to the setRCChatRoomKVStatusChangeDelegate: method of RCChatRoomClient。 + */ +@protocol RCChatRoomKVStatusChangeDelegate + + +/** + * \~chinese + ChatRoom 刚加入聊天室时 KV 同步完成的回调 + + @param roomId 聊天室 Id + + * \~english + Callback of ChatRoom kv did sync + @param roomId ChatRoom Id + */ +- (void)chatRoomKVDidSync:(NSString *)roomId; + +/** + * \~chinese + ChatRoom 聊天室 KV 变化的回调 + + @param roomId 聊天室 Id + @param entry KV 字典,如果刚进入聊天室时存在 KV,会通过此回调将所有 KV 返回,再次回调时为其他人设置或者修改 KV + + * \~english + Callback of Chatroom kv update + @param roomId ChatRoom Id + @param entry KV map,If there are KVs when you first enter the chat room, all KVs will be returned through this callback. When you call back again, you can set or modify the KVs for others + */ +- (void)chatRoomKVDidUpdate:(NSString *)roomId entry:(NSDictionary *)entry; + +/** + * \~chinese + ChatRoom 聊天室 KV 被删除的回调 + + @param roomId 聊天室 Id + @param entry KV 字典 + + * \~english + Callback when chat room KV is deleted + @param roomId Chatroom Id + @param entry KV dictionary + */ +- (void)chatRoomKVDidRemove:(NSString *)roomId entry:(NSDictionary *)entry; + +@end + +#endif /* RCChatRoomProtocol_h */ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatroomKVNotificationMessage.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatroomKVNotificationMessage.h new file mode 100644 index 0000000..99c7902 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RCChatroomKVNotificationMessage.h @@ -0,0 +1,113 @@ +// +// RCChatroomKVNotificationMessage.h +// RongIMLib +// +// Created by RongCloud on 2019/10/14. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + * \~chinese + 聊天室自定义属性通知消息的类型名 + * \~english + The type name of the custom property notification message of chatroom + */ +#define RCChatroomKVNotificationMessageTypeIdentifier @"RC:chrmKVNotiMsg" + +typedef NS_ENUM(NSInteger, RCChatroomKVNotificationType) { + /*! + * \~chinese + 设置 KV 的操作 + * \~english + Set the operation of KV. + */ + RCChatroomKVNotificationTypeSet = 1, + /*! + * \~chinese + 删除 KV 的操作 + * \~english + Delete KV operation. + */ + RCChatroomKVNotificationTypeRemove = 2 +}; + +/** + * \~chinese +聊天室自定义属性通知消息 + +@discussion 不要随意构造此类消息发送,调用设置或者删除接口时会自动构建。 +@discussion 此消息不存储不计入未读消息数。 + +@remarks 通知类消息 + + * \~english + Custom attribute notification message of chatroom + + @ discussion do not construct this kind of message for sending at will, which will be built automatically when you call the interface to set or delete. + @ discussion This message is not stored and does not count as unread messages. + + @ remarks notification message +*/ +@interface RCChatroomKVNotificationMessage : RCMessageContent + +/*! + * \~chinese + 聊天室操作的类型 + * \~english + Types of chatroom operations +*/ +@property (nonatomic, assign) RCChatroomKVNotificationType type; + +/*! + * \~chinese + 聊天室属性名称 + * \~english + Chatroom attribute name + */ +@property (nonatomic, copy) NSString *key; + +/*! + * \~chinese + 聊天室属性对应的值 + * \~english + The value corresponding to the chatroom attribute + */ +@property (nonatomic, copy) NSString *value; + +/*! + * \~chinese + 通知消息的自定义字段,最大长度 2 kb + * \~english + Custom field of notification message with a maximum length of 2 kb. + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese +初始化聊天室自定义属性通知消息 + +@param key 聊天室属性名称 +@param value 聊天室属性对应的值(删除 key 时不用传) +@param extra 通知消息的自定义字段 +@return 聊天室自定义属性通知消息的对象 + + * \~english + Initialize chatroom custom property notification message. + + @param key Chatroom attribute name. + @param value The value corresponding to the chatroom attribute (you need not pass it when deleting key). + @param extra Custom fields for notification messages. + @ return chatroom custom attribute notification message object. +*/ ++ (instancetype)notificationWithType:(RCChatroomKVNotificationType)type + key:(NSString *)key + value:(NSString *_Nullable)value + extra:(NSString *)extra; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RongChatRoom.h b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RongChatRoom.h new file mode 100644 index 0000000..91aeee1 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Headers/RongChatRoom.h @@ -0,0 +1,24 @@ +// +// RongChatRoom.h +// RongChatRoom +// +// Created by RongCloud on 2020/8/12. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +//! Project version number for RongChatRoom. +FOUNDATION_EXPORT double RongChatRoomVersionNumber; + +//! Project version string for RongChatRoom. +FOUNDATION_EXPORT const unsigned char RongChatRoomVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import +#import + +#import +#import +#import diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Info.plist b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Info.plist new file mode 100644 index 0000000..517716f Binary files /dev/null and b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Info.plist differ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Modules/module.modulemap b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Modules/module.modulemap new file mode 100644 index 0000000..e6751a8 --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RongChatRoom { + umbrella header "RongChatRoom.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/RongChatRoom b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/RongChatRoom new file mode 100644 index 0000000..a1324e6 Binary files /dev/null and b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/RongChatRoom differ diff --git a/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..2909eda --- /dev/null +++ b/nativeplugins/ios/RongChatRoom.xcframework/ios-i386_x86_64-simulator/RongChatRoom.framework/_CodeSignature/CodeResources @@ -0,0 +1,222 @@ + + + + + files + + Headers/RCChatRoomClient.h + + bHxBhPeOLXuFASnXldyeV74YCWk= + + Headers/RCChatRoomEnumDefine.h + + zv7mAsrXxtmdM/b8sHgXZr+DLWc= + + Headers/RCChatRoomInfo.h + + 1K8y8REFfhdvDjJFhzgNfjVN5sg= + + Headers/RCChatRoomMemberInfo.h + + JNhNMYGwCqxCgS5Vj9cYeD/G7nA= + + Headers/RCChatRoomProtocol.h + + NDf0pCQxJTn/x946UJFvBXuaXWU= + + Headers/RCChatroomKVNotificationMessage.h + + Dm+9WpeVGhsqtwWpIhMv3KH+/f4= + + Headers/RongChatRoom.h + + sjzv/jDEnB3IJ+CLA/NTTK5qVQo= + + Info.plist + + xKJYVFCG2/025LTd2FGcL2hfYK0= + + Modules/module.modulemap + + ii0hqjTTGnemjpGIXXGYCaoB99o= + + + files2 + + Headers/RCChatRoomClient.h + + hash + + bHxBhPeOLXuFASnXldyeV74YCWk= + + hash2 + + le0FCKXdsYuhyP/972BrG0UVEw8dfFPqPG176nlwMDs= + + + Headers/RCChatRoomEnumDefine.h + + hash + + zv7mAsrXxtmdM/b8sHgXZr+DLWc= + + hash2 + + vOcMDTC0WmSYFq5KODZv+d9IDCyugugAGP+cqs9Y9gU= + + + Headers/RCChatRoomInfo.h + + hash + + 1K8y8REFfhdvDjJFhzgNfjVN5sg= + + hash2 + + bhnKJoKVwRtOUdXzi83mWkE8+HIsbQexj+gFh7P4vYo= + + + Headers/RCChatRoomMemberInfo.h + + hash + + JNhNMYGwCqxCgS5Vj9cYeD/G7nA= + + hash2 + + VC37urijk9NrXd4w+mPAB7nWZXr6E3/HcCp3neA4Wnw= + + + Headers/RCChatRoomProtocol.h + + hash + + NDf0pCQxJTn/x946UJFvBXuaXWU= + + hash2 + + pJY+fGmISI50210cnPmVwzidjkw6YxrIuus/tCcvXXA= + + + Headers/RCChatroomKVNotificationMessage.h + + hash + + Dm+9WpeVGhsqtwWpIhMv3KH+/f4= + + hash2 + + aoprHJOrSa8R1D3TeScNxk4wH35GXRjU+HSN+1vLzG0= + + + Headers/RongChatRoom.h + + hash + + sjzv/jDEnB3IJ+CLA/NTTK5qVQo= + + hash2 + + bQ1x/StpqaAd5J3zYWInTmyaOH/yzA5WdSnG6vrkbC4= + + + Modules/module.modulemap + + hash + + ii0hqjTTGnemjpGIXXGYCaoB99o= + + hash2 + + wJMy+vWcBIzIHUTDDqJsgKqxiJI3RYxErBRoeokdByQ= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/Info.plist b/nativeplugins/ios/RongIMLibCore.xcframework/Info.plist new file mode 100644 index 0000000..6ffc96c --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/Info.plist @@ -0,0 +1,41 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-i386_x86_64-simulator + LibraryPath + RongIMLibCore.framework + SupportedArchitectures + + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + RongIMLibCore.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCAMRDataConverter.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCAMRDataConverter.h new file mode 100644 index 0000000..e247fe7 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCAMRDataConverter.h @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCAMRDataConverter.h +// Created by Heq.Shinoda on 14-6-17. + +#ifndef __RCAMRDataConverter +#define __RCAMRDataConverter + +#include "interf_dec.h" +#include "interf_enc.h" +#import +#include +#include +#include + +/*! + * \~chinese + AMR 格式与 WAV 格式音频转换工具类 + * \~english + AMR format and WAV format audio conversion tool class + */ +@interface RCAMRDataConverter : NSObject + +/*! + * \~chinese + 获取 AMR 格式与 WAV 格式音频转换工具类单例 + + @return AMR 格式与 WAV 格式音频转换工具类单例 + + * \~english + Get a single example of the audio conversion tool class between AMR format and WAV format. + + @ return Single example of AMR format and WAV format Audio conversion tool class. + */ ++ (RCAMRDataConverter *)sharedAMRDataConverter; + +/*! + * \~chinese + 将 AMR 格式的音频数据转化为 WAV 格式的音频数据 + + @param data AMR 格式的音频数据,可以是 AMR-NB 或者 AMR-WB 格式 + @return WAV 格式的音频数据 + + * \~english + Convert audio data in AMR format to audio data in WAV format. + + @param data Audio data in AMR format, which can be AMR-NB or AMR-WB format. + @ return WAV format audio data. + */ +- (NSData *)decodeAMRToWAVE:(NSData *)data; + +/*! + * \~chinese + 将 AMR 格式的音频数据转化为 WAV 格式的音频数据 + + @param data AMR格式的音频数据,必须是 AMR-NB 的格式 + @return WAV格式的音频数据 + + * \~english + Convert audio data in AMR format to audio data in WAV format. + + @param data Audio data in AMR format, must be in AMR-NB format. + @ return WAV format audio data. + */ +- (NSData *)decodeAMRToWAVEWithoutHeader:(NSData *)data; + +/*! + * \~chinese + 将 WAV 格式的音频数据转化为 AMR 格式的音频数据(8KHz/16KHz 采样) + + @param data WAV 格式的音频数据 + @return AMR-NB/AMR-WB 格式的音频数据 + @discussion 如果采样率为 8KHz 则返回 AMR-NB 格式数据,如果采样率为 16KHz 则返回 AMR-WB 格式数据。 + + * \~english + Convert audio data in WAV format to audio data in AMR format (8KHz/16KHz sampling). + + @param data Audio data in WAV format. + @ return AMR-NB/AMR-WB format audio data. + @ discussion Return data in AMR-NB format if the sampling rate is 8KHz and AMR-WB format if the sampling rate is 16KHz. + */ +- (NSData *)encodeWAVEToAMR:(NSData *)data; + +@end + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCAndroidConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCAndroidConfig.h new file mode 100644 index 0000000..ce18892 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCAndroidConfig.h @@ -0,0 +1,124 @@ +// +// RCAndroidConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/9/17. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + * \~chinese + 华为推送消息级别 + * \~english + Huawei push level + */ +typedef NSString *RCImportanceHw NS_STRING_ENUM; + +/*! + * \~chinese + 华为推送消息级别 NORMAL + * \~english + Huawei push level : NORMAL + */ +FOUNDATION_EXPORT RCImportanceHw const RCImportanceHwNormal; + +/*! + * \~chinese + 华为推送消息级别 LOW + * \~english + Huawei push level : LOW + */ +FOUNDATION_EXPORT RCImportanceHw const RCImportanceHwLow; + + + +@interface RCAndroidConfig : NSObject + +/*! + * \~chinese + Android 平台 Push 唯一标识 + 目前支持小米、华为推送平台,默认开发者不需要进行设置,当消息产生推送时,消息的 messageUId 作为 notificationId 使用。 + + * \~english + Unique identification of Android platform Push. + Currently, Xiaomi and Huawei push platforms are supported. Developers need not set them by default. When a message generates a push, the messageUId of the message is used as a notificationId. + */ +@property (nonatomic, copy) NSString *notificationId; + +/*! + * \~chinese + 小米的渠道 ID + 该条消息针对小米使用的推送渠道,如开发者集成了小米推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。 + + * \~english + Xiaomi's channel ID. + This message is aimed at the push channel used by Xiaomi. If the developer integrates Xiaomi push and shall specify a channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer. + */ +@property (nonatomic, copy) NSString *channelIdMi; + +/*! + * \~chinese + 华为的渠道 ID + 该条消息针对华为使用的推送渠道,如开发者集成了华为推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。 + + * \~english + Huawei's channel ID. + This message is aimed at the push channel used by Huawei. If the developer integrates Huawei push and shall specify a channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer. + */ +@property (nonatomic, copy) NSString *channelIdHW; + +/*! + * \~chinese + OPPO 的渠道 ID + 该条消息针对 OPPO 使用的推送渠道,如开发者集成了 OPPO 推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。 + + * \~english + OPPO Channel ID. + This message is aimed at the push channel used by OPPO. For example, if the developer integrates OPPO push and shall specify the channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer. + */ +@property (nonatomic, copy) NSString *channelIdOPPO; + +/*! + * \~chinese + VIVO 推送通道类型 + 开发者集成了 VIVO 推送,需要指定推送类型时,可进行设置。 + 目前可选值 "0"(运营消息) 和 "1"(系统消息) + + * \~english + VIVO push channel type. + Developers have integrated VIVO push, which can be set when you shall specify the push type. + Currently available values "0" (operation message) and "1" (system message) + */ +@property (nonatomic, copy) NSString *typeVivo; + +/*! + * \~chinese + FCM 通知类型推送时所使用的分组 id + * \~english + Packet id used in FCM notification type push + */ +@property (nonatomic, copy) NSString *fcmCollapseKey; + +/*! + * \~chinese + FCM 通知类型的推送所使用的通知图片 url + * \~english + Notification image url used for push of FCM notification type + */ +@property (nonatomic, copy) NSString *fcmImageUrl; + +/*! + * \~chinese + 华为推送消息级别 + * \~english + Huawei push level + */ +@property (nonatomic, copy) RCImportanceHw importanceHW; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCChannelClient.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCChannelClient.h new file mode 100644 index 0000000..dae1ddf --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCChannelClient.h @@ -0,0 +1,2047 @@ +// +// RCConversationChannelManager.h +// RongIMLibCore +// +// Created by RongCloud on 2021/1/29. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCConversation.h" +#import "RCMessage.h" +#import "RCSearchConversationResult.h" +#import "RCStatusDefine.h" +#import "RCUploadImageStatusListener.h" +#import "RCUploadMediaStatusListener.h" +#import "RCUserInfo.h" +#import "RCSendMessageOption.h" +#import "RCRemoteHistoryMsgOption.h" +#import "RCConversationChannelProtocol.h" +#import "RCHistoryMessageOption.h" +/*! + * \~chinese + 融云 ConversationChannel 核心类 + + @discussion 您需要通过 sharedChannelManager 方法,获取单例对象。 + + * \~english + ConversationChannel core class + + @discussion You shall get the single instance object through the sharedChannelManager method. + */ +@interface RCChannelClient : NSObject + +/*! + * \~chinese + 获取核心类单例 + + @return 核心单例类 + + * \~english + Get a single instance of the core class + + @return single instance of the core class + */ ++ (instancetype)sharedChannelManager; + +#pragma mark Delegate +/*! + * \~chinese + 设置消息接收监听器 + + @param delegate RCChannelClient 消息已读回执监听器 + + @discussion + 设置 IMLibCore 的消息接收监听器请参考 RCChannelClient 的 setChannelMessageReceiptDelegate:object:方法。 + + @remarks 功能设置 + * \~english + */ +- (void)setChannelMessageReceiptDelegate:(id)delegate; + + +/*! + * \~chinese + 设置输入状态的监听器 + + @param delegate RCChannelClient 输入状态的的监听器 + + @warning 目前仅支持单聊。 + + @remarks 功能设置 + + * \~english + Set the listener for the input status for channel client + + @param delegate Listeners for IMLibCore channel client input status + + @ warning currently only support single chat + + @ remarks function setting + */ +- (void)setRCConversationChannelTypingStatusDelegate:(id)delegate; + +#pragma mark Message Send + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId:消息的ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent ,用于显示;二是 pushData ,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil ,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for failed message sending [nErrorCode: Error code for sending failure. + MessageId: message ID] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom message, you shall set pushContent and pushData to define the push content yourself, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it by using this method. + + If you use this method to send a file message, you should upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it by using this method. + + @ warning If you use IMLibCore, you can use this method to send messages; + If you use IMKit, please use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId: 消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message. + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param option Related configuration of messages. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for message sending failure [nErrorCode: Error code for sending failure, + messageId: ID of the message] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it using this method. + + If you use this method to send a file message, you shall upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it using this method. + + @ warning you can use this method to send messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送媒体消息(图片消息或文件消息) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的 ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您需要上传图片到自己的服务器,需要构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送媒体消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送媒体消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send media messages (image messages or file messages) + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation in which the message is sent + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID] + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock callback for failed message sending [errorCode: error code for sending failure. messageId: message ID] + @param cancelBlock Callback for the user canceling message sending [messageId: message ID] + @ return message entity sent . + + @ discussion A remote push can be received when the receiver is offline and allows remote push. + The remote push consists of two parts, one is pushContent for display and the other is pushData for carrying data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format will be used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you need to upload images to your own server, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful uploading, and then use the RCCoreClient's + sendMessage:targetId:content:pushContent:pushData:success:error: method or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload files to your own server, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method. + or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ warning If you use IMLibCore, you can use this method to send meida messages; + If you use IMKit, please use the method of the same name in RCIM to send a media message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 发送媒体消息(上传图片或文件等媒体信息到指定的服务器) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param uploadPrepareBlock 媒体文件上传进度更新的 IMKit 监听 + [uploadListener:当前的发送进度监听,SDK 通过此监听更新 IMKit UI] + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 此方法仅用于 IMKit。 + 如果您需要上传图片到自己的服务器并使用 IMLibCore,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器并使用 IMLibCore,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @remarks 消息操作 + * + * \~english + Send media messages (upload media information such as images or files to the specified server) + + @param conversationType Type of conversation in which the message is sent. + @param targetId ID of conversation in which the message is sent + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param uploadPrepareBlock IMKit listening of media file uploading progress updates. + [uploadListener: current sending progress listening, which is used by SDK to update IMKit UI] + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID]. + @param successBlock Callback for successful message sending [ messageId: message ID]. + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure + messageId: message ID]. + @param cancelBlock Callback for the user canceling message sending [messageId: message ID]. + @ return message entity sent. + + @ discussion This method is for IMKit only. + If you need to upload pictures to your own server and use IMLibCore, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload a file to your own server and use IMLibCore, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + uploadPrepare:(void (^)(RCUploadMediaStatusListener *uploadListener))uploadPrepareBlock + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 插入向外发送的、指定时间的消息(此方法如果 sentTime 有问题会影响消息排序,慎用!!) +(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param sentStatus 发送状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒(传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。如果 sentTime<=0,则被忽略,会以插入时的时间为准。 + + @remarks 消息操作 + + * \~english + Insert a message sent outward at a specified time (this method will affect message sorting if there is a problem with sentTime and shall be used with caution!!) + (The message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID. + @param channelId Business ID of the session to which it belongs + @param sentStatus Sending status. + @param content Content of the message. + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. If sentTime < = 0, it will be ignored and the time at which it is inserted shall prevail. + + @ remarks message operation + */ +- (RCMessage *)insertOutgoingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + +/*! + * \~chinese + 插入接收的消息(此方法如果 sentTime + 有问题会影响消息排序,慎用!!)(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param senderUserId 发送者 ID + @param receivedStatus 接收状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒 (传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + * \~english + Insert the received message (the message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param senderUserId Sender ID + @param receivedStatus Receiving status + @param content Content of the message + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertIncomingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + senderUserId:(NSString *)senderUserId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + +/*! + * \~chinese + 发送定向消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param userIdList 接收消息的用户 ID 列表 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + 如果您使用 IMLibCore,可以使用此方法发送定向消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送定向消息,否则不会自动更新 UI。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param conversationType Type of conversation in which the message is sent + @param targetId Conversation ID that sends the message + @param channelId Business ID of the session to which it belongs + @param userIdList List of user ID receiving messages + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure, + messageId: message ID] + + @ return Message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + If you use IMLibCore, you can use this method to send directed messages. + If you use IMKit, please use the method of the same name in RCIM to send a directed message, otherwise the UI will not be updated automatically. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + toUserIdList:(NSArray *)userIdList + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送定向消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param userIdList 接收消息的用户 ID 列表 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + 如果您使用 IMLibCore,可以使用此方法发送定向消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送定向消息,否则不会自动更新 UI。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param conversationType Type of conversation in which the message is sent + @param targetId Conversation ID that sends the message + @param channelId Business ID of the session to which it belongs + @param userIdList List of user ID receiving messages + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure, + messageId: message ID] + + @ return Message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + If you use IMLibCore, you can use this method to send directed messages. + If you use IMKit, please use the method of the same name in RCIM to send a directed message, otherwise the UI will not be updated automatically. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + toUserIdList:(NSArray *)userIdList + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; +#pragma mark Message Read Receipt + +/*! + * \~chinese + 发送某个会话中消息阅读的回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param timestamp 该会话中已阅读的最后一条消息的发送时间戳 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 此接口只支持单聊, 如果使用 IMLibCore 可以注册监听 + RCLibDispatchReadReceiptNotification 通知,使用 IMKit 直接设置RCIM.h + 中的 enabledReadReceiptConversationTypeList。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send a message reading receipt in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param timestamp The sending timestamp of the last message read by the conversation. + @param successBlock Callback for successful sending + @param errorBlock Callback for sending failure [nErrorCode: error code for failure] + + @ discussion This interface only supports single chat. If you use IMLibCore, you can register to listen to + RCLibDispatchReadReceiptNotification notification, and use IMKit to set directly + enabledReadReceiptConversationTypeList in RCIM.h. + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendReadReceiptMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 发送阅读回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param messageList 已经阅读了的消息列表 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 当用户阅读了需要阅读回执的消息,可以通过此接口发送阅读回执,消息的发送方即可直接知道那些人已经阅读。 + + @remarks 高级功能 + + * \~english + Send a reading receipt + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param messageList List of messages that have been read + @param successBlock Callback for successful sending + @param errorBlock Callback for failed sending [nErrorCode: Error code of failure] + + @ discussion When a user reads a message that needs to be read, a reading receipt cane be sent through this interface, and the sender of the message can directly know who has read the message. + + @ remarks advanced functions + */ +- (void)sendReadReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageList:(NSArray *)messageList + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 同步会话阅读状态(把指定会话里所有发送时间早于 timestamp 的消息置为已读) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param timestamp 已经阅读的最后一条消息的 Unix 时间戳(毫秒) + @param successBlock 同步成功的回调 + @param errorBlock 同步失败的回调[nErrorCode: 失败的错误码] + + @remarks 高级功能 + + * \~english + Synchronize conversation reading status (set all messages sent before timestamp in a specified conversation to be read) + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param timestamp Unix timestamp of the last message read (in milliseconds) + @param successBlock Callback for successful synchronization + @param errorBlock Callback for failed synchronization [nErrorCode: Error code for failure]. + + @ remarks advanced functions + */ +- (void)syncConversationReadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +#pragma mark - Message Operation + +/*! + * \~chinese + 获取某个会话中指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get the specified number of latest message entities in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param count Number of messages to be obtained + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getLatestMessages:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + 如: + oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param oldestMessageId ID of due message. + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + E.g. + If the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的、指定消息类型的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量和消息类型的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应的那条消息,如果会话中的消息数量小于参数 count + 的值,会将该会话中的所有消息返回。 + 如:oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number and specified message types before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil + @param oldestMessageId ID of due message + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + For example, if the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + objectName:(NSString *)objectName + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定消息、指定数量、指定消息类型、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param baseMessageId 当前的消息 ID + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,baseMessageId + 之前或之后的、指定数量、消息类型和查询方向的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 baseMessageId 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with specified messages, specified number and specified message type in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil. + @param baseMessageId Current message ID. + @param isForward Query direction: true indicates forward and false indicates backward. + @param count Number of messages to be obtained + @ return object list of message entity RCMessage + + @ discussion + This method gets the latest message entities before or after baseMessageId with the specified number, message type, and query direction, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to baseMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + objectName:(NSString *)objectName + baseMessageId:(long)baseMessageId + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定时间、指定数量、指定消息类型(多个)、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param objectNames 消息内容的类型名称列表 + @param sentTime 当前的消息时间戳 + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,sentTime + 之前或之后的、指定数量、指定消息类型(多个)的消息实体列表,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 sentTime 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with a specified time, a specified number and a specified message type (multiple) in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param objectNames List of type names for message content + @param sentTime Current message timestamp + @param isForward Query direction: true indicates forward and false indicates backward + @param count Number of messages to be obtained. + @ return object list of message entity RCMessage + + @ discussion + This method gets a list of message entities before and after the sentTime with a specified number and a specified message type (multiple) in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to sentTime. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + objectNames:(NSArray *)objectNames + sentTime:(long long)sentTime + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 在会话中搜索指定消息的前 beforeCount 数量和后 afterCount + 数量的消息。返回的消息列表中会包含指定的消息。消息列表时间顺序从新到旧。 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param sentTime 消息的发送时间 + @param beforeCount 指定消息的前部分消息数量 + @param afterCount 指定消息的后部分消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 获取该会话的这条消息及这条消息前 beforeCount 条和后 afterCount 条消息,如前后消息不够则返回实际数量的消息。 + + @remarks 消息操作 + + * \~english + Searches the the number of beforeCount and afterCount messages for the specified message in the conversation. The list of returned messages contains the specified message. The message in the list are in chronological order from earliest to most recent. + + @param conversationType Conversation type + @param targetId Conversation ID + @param sentTime Time when the message is sent + @param beforeCount Specify the number of messages in the first part of the message. + @param afterCount Specify the number of messages in the latter part of the message. + @ return object list of message entity RCMessage + + @ discussion + Get this message, beforeCount messages ahead of this message and afterCount messages after this message in the conversation. If there are not enough messages before and after the message, the actual number of messages will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + sentTime:(long long)sentTime + beforeCount:(int)beforeCount + afterCount:(int)afterCount; + +/*! + * \~chinese + 从服务器端清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [status:清除失败的错误码] + + @discussion + 此方法从服务器端清除历史消息,但是必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 清除成功后只能获取该时间戳之后的历史消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation, 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param successBlock Callback for successful acquisition + @param errorBlock Callback for failed acquisition [status: error code for clearing failure ] + + @ discussion + This method clears historical messages from the server, bu the historical message cloud storage function must be activated first. + For example, if you don't want to get more history messages from the server, you can only get the history messages after the timestamp after the recordTime has been cleared successfully. + + @ remarks message operation + */ +- (void)clearRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + recordTime:(long long)recordTime + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param clearRemote 是否同时删除服务端消息 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [ status:清除失败的错误码] + + @discussion + 此方法可以清除服务器端历史消息和本地消息,如果清除服务器端消息必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 并设置 clearRemote 为 YES + 清除消息,成功后只能获取该时间戳之后的历史消息。如果 clearRemote 传 NO, + 只会清除本地消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages. + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation. 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param clearRemote Whether to delete server messages at the same time. + @param successBlock Callback for successful acquisition. + @param errorBlock Callback for failed acquisition [status: error code for clearing failure]. + + @ discussion + This method can clear server-side historical messages and local messages. If you clear messages on the server, you must first activate the historical message cloud storage functions. + For example, if you don't want to get more historical messages from the server, you can specify the recordTime and set clearRemote to YES to clear the messages, and then you can only get the historical message after the timestamp. If clearRemote passes NO, only local messages are cleared. + + @ remarks message operation + */ +- (void)clearHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + recordTime:(long long)recordTime + clearRemote:(BOOL)clearRemote + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param recordTime 截止的消息发送时间戳,毫秒 + @param count 需要获取的消息数量, 0 < count <= 20 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有10条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @discussion 本地数据库可以查到的消息,该接口不会再返回,所以建议先用 getHistoryMessages + 相关接口取本地历史消息,本地消息取完之后再通过该接口获取远端历史消息 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param recordTime Due message sending timestamp, in milliseconds. + @param count Number of messages to be obtained, 0 < count < = 20. + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES indicates that there is still any remaining messages; NO indicates that there is no remaining messages] + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure] + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ discussion Messages that can be found in the local database will not be returned by this interface, so it is recommended to first take the local historical messages by using the related interfaces of the getHistoryMessages. + After the local message is taken, the remote historical messages are obtained through this interface + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + recordTime:(long long)recordTime + count:(int)count + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param option 可配置的参数 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有 10 条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param option Configurable parameters + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES: + Indicates that there is still any remaining messages; NO: indicates that there is no remaining messages]. + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure]. + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + option:(RCRemoteHistoryMsgOption *)option + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + + +/*! + * \~chinese + 获取历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param option 可配置的参数 + @param complete 获取成功的回调 [messages:获取到的历史消息数组; code : 获取是否成功,0表示成功,非 0 表示失败,此时 messages 数组可能存在断档] + + @discussion 必须开通历史消息云存储功能。 + @discussion count 传入 1~20 之间的数值。 + @discussion 此方法先从本地获取历史消息,本地有缺失的情况下会从服务端同步缺失的部分。 + @discussion 从服务端同步失败的时候会返回非 0 的 errorCode,同时把本地能取到的消息回调上去。 + + @remarks 消息操作 + + * \~english + Get historical messages + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param option Configurable parameters + @param complete Callback for successful acquisition [messages: array of obtained historical messages; Code: succeeded or not; 0: successful; non-0: failed. In this case, there may be a message break in the messages array] + + @ discussion The historical message cloud storage function must be activated. + @ discussion The count passes a value between 1 and 20. + @ discussion This method first obtains historical messages locally, and synchronizes the missing parts from the server if it is missing locally; + @ discussion If synchronization fails on the server, a non-0 errorCode will be returned, and the messages that can be accessed locally will be called back. + + @ remarks message operation + */ +- (void)getMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + option:(RCHistoryMessageOption *)option + complete:(void (^)(NSArray *messages, RCErrorCode code))complete; + +/*! + * \~chinese + 获取会话中@提醒自己的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + + @discussion + 此方法从本地获取被@提醒的消息(最多返回 10 条信息) + @warning 使用 IMKit 注意在进入会话页面前调用,否则在进入会话清除未读数的接口 clearMessagesUnreadStatus: targetId: + 以及 设置消息接收状态接口 setMessageReceivedStatus:receivedStatus:会同步清除被提示信息状态。 + + @remarks 高级功能 + + * \~english + Get the @ reminder messages in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID. + @param channelId Business ID of the session to which it belongs + + @ discussion + This method gets the @ reminder messages locally (a maximum of 10 messages are returned). + @ warning When the IMKit is used, note that it is called before the conversation page is entered, otherwise the unread interface clearMessagesUnreadStatus: is cleared when the conversation is entered. targetId: + When the message receiving status interface setMessageReceivedStatus:receivedStatus: is set, it will synchronously clear the prompted information status. + + @ remarks advanced functions + */ +- (NSArray *)getUnreadMentionedMessages:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/** + * \~chinese + * 获取会话里第一条未读消息。 + * + * @param conversationType 会话类型 + * @param targetId 会话 ID + * @param channelId 所属会话的业务标识 + * @return 第一条未读消息的实体。 + * @remarks 消息操作 + * + * \~english + * Get the first unread message in the conversation. + * + * @param conversationType Conversation type + * @param targetId Conversation ID + * @param channelId Business ID of the session to which it belongs + * @ return Entity of the first unread message. + * @ remarks Message operation + */ +- (RCMessage *)getFirstUnreadMessage:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法删除数据库中该会话的消息记录,同时会整理压缩数据库,减少占用空间 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes the message record of the conversation in the database. At the same time, the compressed database is sorted to reduce the footprint. + + @ remarks Message operation + */ +- (void)deleteMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 批量删除某个会话中的指定远端消息(同时删除对应的本地消息) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 目标会话ID + @param channelId 所属会话的业务标识 + @param messages 将被删除的消息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法会同时删除远端和本地消息。 + 一次批量操作仅支持删除属于同一个会话的消息,请确保消息列表中的所有消息来自同一会话 + 一次最多删除 100 条消息。 + + @remarks 消息操作 + + * \~english + Delete specified remote messages in a conversation in batches (while deleting corresponding local messages) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Target conversation ID + @param channelId Business ID of the session to which it belongs + @param messages List of messages to be deleted + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes both remote and local messages. + One batch operation only supports to delete messages belonging to the same conversation, please make sure that all messages in the message list come from the same conversation and delete at most 100 messages at a time. + + @ remarks message operation + */ +- (void)deleteRemoteMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messages:(NSArray *)messages + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully. + + @ remarks Message operation + */ +- (BOOL)clearMessages:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +#pragma mark - Conversation List +/*! + * \~chinese + 获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + @discussion 当您的会话较多且没有清理机制的时候,强烈建议您使用 getConversationList: count: startTime: + 分页拉取会话列表,否则有可能造成内存过大。 + + @remarks 会话列表 + + * \~english + Get conversation list + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray) + @param channelId Business ID of the session to which it belongs + @ return List of conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + @ discussion When you have a large number of conversations and do not have a cleaning mechanism, it is strongly recommended that you use getConversationList: count: startTime: + Pull the list of the conversation page by page, otherwise the memory may be too large. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +/*! + * \~chinese + 分页获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @param count 获取的数量(当实际取回的会话数量小于 count 值时,表明已取完数据) + @param startTime 会话的时间戳(获取这个时间戳之前的会话列表,0表示从最新开始获取) + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + + @remarks 会话列表 + + * \~english + Get a list of conversations page by page + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @param count Number of conversations obtained (when the actual number of conversations retrieved is less than the count value, the data has been fetched). + @param startTime Timestamp of the conversation (get the list of conversation before this timestamp, 0 indicates obtaining from the latest one). + @ return List of the conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId count:(int)count startTime:(long long)startTime; + +/*! + * \~chinese + 获取单个会话数据 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 会话的对象 + + @remarks 会话 + + * \~english + Get single conversation data + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return Conversation object + + @ remarks Conversation + */ +- (RCConversation *)getConversation:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 获取会话中的消息数量 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 会话中的消息数量 + + @discussion -1 表示获取消息数量出错。 + + @remarks 会话 + + * \~english + Get the number of messages in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID. + @param channelId Business ID of the session to which it belongs + @ return Number of messages in conversation. + + @ discussion - 1 indicates an error in obtaining the number of messages. + + @ remarks Conversation + */ +- (int)getMessageCount:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 删除指定类型的会话 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @discussion 此方法会从本地存储中删除该会话,同时删除会话中的消息。 + + @remarks 会话 + + * \~english + Delete a conversation of the specified type. + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully. + + @ discussion This method deletes the conversation from the local storage and deletes the message in the conversation. + + @ remarks Conversation + */ +- (BOOL)clearConversations:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +/*! + * \~chinese + 从本地存储中删除会话 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @discussion + 此方法会从本地存储中删除该会话,但是不会删除会话中的消息。如果此会话中有新的消息,该会话将重新在会话列表中显示,并显示最近的历史消息。 + + @remarks 会话 + + * \~english + Delete a conversation from the local storage + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully. + + @ discussion + This method deletes the conversation from the local storage, but does not delete the message in the conversation. If there is a new message in this conversation, the conversation will reappear in the conversation list and the most recent historical message will be displayed. + + @ remarks Conversation + */ +- (BOOL)removeConversation:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 设置会话的置顶状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param isTop 是否置顶 + @return 设置是否成功 + + @discussion 会话不存在时设置置顶,会在会话列表生成会话。 + + @remarks 会话 + + * \~english + Set the top status of the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param isTop Whether or not set top + @ return Whether it is set successfully + + @ discussion If the conversation is set top when the conversation does not exist, the conversation will be generated in the conversation list + @ discussion After the conversation is set top, the conversation will be deleted, and the top setting will automatically expire + + @ remarks Conversation + */ +- (BOOL)setConversationToTop:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId isTop:(BOOL)isTop; + +/*! + * \~chinese + 获取置顶的会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 置顶的会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取置顶的会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of top conversations + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @ return List of top conversation RCConversation. + + @ discussion This method reads the top conversation list from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getTopConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +#pragma mark Draft + +/*! + * \~chinese + 获取会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @return 该会话中的草稿 + + @remarks 会话 + + * \~english + Get draft information in the conversations (temporary messages entered by the user but not sent). + + @param conversationType Conversations type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @ return drafts in this conversations + + @ remarks Conversations + */ +- (NSString *)getTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 保存草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @param content 草稿信息 + @return 是否保存成功 + + @remarks 会话 + + * \~english + Save draft information (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @param content Draft information + @ return whether it is saved successfully. + + @ remarks Conversation + */ +- (BOOL)saveTextMessageDraft:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(NSString *)content; + +/*! + * \~chinese + 删除会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @remarks 会话 + + * \~english + Delete draft information in a conversation (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully + + @ remarks Conversation + */ +- (BOOL)clearTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +#pragma mark Unread Count + +/*! + * \~chinese + 获取所有的未读消息数(聊天室会话除外) + + @param channelId 所属会话的业务标识 + + @return 所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages (except chatroom conversations). + + @param channelId Business ID of the session to which it belongs + + @ return All unread messages + + @ remarks Conversation + */ +- (int)getTotalUnreadCountWithChannelId:(NSString *)channelId; + +/*! + * \~chinese + 获取某个会话内的未读消息数(聊天室会话除外) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @return 该会话内的未读消息数 + + @remarks 会话 + + * \~english + Get the number of unread messages in a conversation (except for chatroom conversations). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @ return Number of unread messages in the conversation + + @ remarks Conversation + */ +- (int)getUnreadCount:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/** + * \~chinese + 获取某些类型的会话中所有的未读消息数 (聊天室会话除外) + + @param conversationTypes 会话类型的数组 + @param channelId 所属会话的业务标识 + @param isContain 是否包含免打扰消息的未读数 + @return 该类型的会话中所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages in certain types of conversations (except chatroom conversations) + + @param conversationTypes Array of conversation types. + @param channelId Business ID of the session to which it belongs + @param isContain Does it include the number of the unread Do Not Disturb messages. + @ return Number of all unread messages in this type of conversation. + + @ remarks Conversation + */ +- (int)getUnreadCount:(NSArray *)conversationTypes channelId:(NSString *)channelId containBlocked:(bool)isContain; + +/*! + * \~chinese + 获取某个类型的会话中所有未读的被@的消息数 + + @param conversationTypes 会话类型的数组 + @param channelId 所属会话的业务标识 + @return 该类型的会话中所有未读的被@的消息数 + + @remarks 会话 + + * \~english + Get the number of unread @ messages in a certain type of conversation + + @param conversationTypes Array of conversation types + @param channelId Business ID of the session to which it belongs + @ return Number of unread @ messages in this type of conversation + + @ remarks Conversation + */ +- (int)getUnreadMentionedCount:(NSArray *)conversationTypes channelId:(NSString *)channelId; + +/*! + * \~chinese + 清除某个会话中的未读消息数 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation. + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 清除某个会话中的未读消息数(该会话在时间戳 timestamp 之前的消息将被置成已读。) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param timestamp 该会话已阅读的最后一条消息的发送时间戳 + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation (messages for that conversation before the timestamp will be set to read.) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param timestamp Sending timestamp of the last message read by the conversation + @ return Whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + time:(long long)timestamp; + +#pragma mark - Message Notification + +/*! + * \~chinese + 设置会话的消息提醒状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param isBlocked 是否屏蔽消息提醒 + @param successBlock 设置成功的回调 + [nStatus:会话设置的消息提醒状态] + @param errorBlock 设置失败的回调 [status:设置失败的错误码] + + @discussion + 如果您使用 + IMLibCore,此方法会屏蔽该会话的远程推送;如果您使用IMKit,此方法会屏蔽该会话的所有提醒(远程推送、本地通知、前台提示音),该接口不支持聊天室。 + + @remarks 会话 + + * \~english + Set the message reminder status for the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param isBlocked Whether to block message reminders + @param successBlock Callback for successful setting + [nStatus: message reminder status set for the conversation]. + @param errorBlock Callback for failed setting [ status: error code for error code for setting failure]. + + @ discussion + If you use the IMLibCore, this method blocks the remote push of the conversation; If you use this method of IMKit, it blocks all reminders (remote push, local notification and foreground tone) of the conversation, and the interface does not support chatroom. + + @ remarks Conversation + */ +- (void)setConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + isBlocked:(BOOL)isBlocked + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + + +/*! + * \~chinese + 查询会话的消息提醒状态 + + @param conversationType 会话类型(不支持聊天室,聊天室是不接受会话消息提醒的) + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param successBlock 查询成功的回调 [nStatus:会话设置的消息提醒状态] + @param errorBlock 查询失败的回调 [status:设置失败的错误码] + + @remarks 会话 + + * \~english + Query the message reminder status of the conversation + + @param conversationType Conversation type (chatroom is not supported and chatroom does not accept reminders of conversation messages). + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param successBlock Callback for successful query [nStatus: message reminder status set for the conversation] + @param errorBlock Callback for failed query [status: error code for setting failure] + + @ remarks Conversation + */ +- (void)getConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取消息免打扰会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @return 消息免打扰会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取消息免打扰会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of conversations for Do Not Disturb messages. + + @param conversationTypeList Array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @ return List of conversation RCConversation for Do Not Disturb messages + + @ discussion This method reads the list of conversations of Do Not Disturb messages from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getBlockedConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +#pragma mark - input status + +/*! + * \~chinese + 向会话中发送正在输入的状态 + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @param objectName 正在输入的消息的类型名 + + @discussion + contentType 为用户当前正在编辑的消息类型名,即 RCMessageContent 中 getObjectName 的返回值。 + 如文本消息,应该传类型名"RC:TxtMsg"。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send the status being entered to the conversation + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @param objectName Type name of the message being entered + + @ discussion + contentType is the name of the message type that the user is currently editing, that is, the return value of getObjectName in RCMessageContent. + E.g. for a text message, pass the type name "RC:TxtMsg". + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendTypingStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + contentType:(NSString *)objectName; + +#pragma mark - Search + +/*! + * \~chinese + 根据关键字搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param keyword 关键字 + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on keywords. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param keyword Keyword + @param count Maximum number of queries + @param startTime Query messages before startTime (0 indicates unlimited time). + + @ return Matching message list + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + keyword:(NSString *)keyword + count:(int)count + startTime:(long long)startTime; + + +/*! + * \~chinese + 根据时间,偏移量和个数搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param keyword 关键字,传空默认为是查全部符合条件的消息 + @param startTime 查询 startTime 之后的消息, startTime >= 0 + @param endTime 查询 endTime 之前的消息,endTime > startTime + @param offset 查询的消息的偏移量,offset >= 0 + @param limit 最大的查询数量,limit 需大于 0,最大值为100,如果大于100,会默认成100。 + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on time, offset, and number. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param keyword Keyword, in which empty value indicates to check all messages that meet the criteria by default + @param startTime Query the message after startTime, startTime > = 0 + @param endTime Query the messages before endTime, endTime > startTime. + @param offset Offset of the queried message, offset > = 0 + @param limit For the maximum number of queries, the limit should be greater than 0, and the maximum value should be 100. If it is greater than 100, it will default to 100. + + @ return List of messages matched + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + keyword:(NSString *)keyword + startTime:(long long)startTime + endTime:(long long)endTime + offset:(int)offset + limit:(int)limit; + +/*! + * \~chinese + 按用户 ID 搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param userId 搜索用户 ID + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on keywords. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param userId userId + @param count Maximum number of queries + @param startTime Query messages before startTime (0 indicates unlimited time). + + @ return Matching message list + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + userId:(NSString *)userId + count:(int)count + startTime:(long long)startTime; + +/*! + * \~chinese + 根据关键字搜索会话 + + @param conversationTypeList 需要搜索的会话类型列表 + @param channelId 所属会话的业务标识 + @param objectNameList 需要搜索的消息类型名列表(即每个消息类方法 getObjectName 的返回值) + @param keyword 关键字 + + @return 匹配的会话搜索结果列表 + + @discussion 目前,SDK 内置的文本消息、文件消息、图文消息支持搜索。 + 自定义的消息必须要实现 RCMessageContent 的 getSearchableWords 接口才能进行搜索。 + + @remarks 消息操作 + + * \~english + Search a conversation based on keywords + + @param conversationTypeList List of conversation types to be searched + @param channelId Business ID of the session to which it belongs + @param objectNameList List of type names of message to be searched (that is, the return value of each message class method getObjectName) + @param keyword Keyword + + @ return Search results list for conversation matched. + + @ discussion Currently, SDK's built-in text messages, file messages, and image and text messages support search + Custom messages must implement getSearchableWords interface of RCMessageContent before they can be searched + + @ remarks message operation + */ +- (NSArray *)searchConversations:(NSArray *)conversationTypeList + channelId:(NSString *)channelId + messageType:(NSArray *)objectNameList + keyword:(NSString *)keyword; + +@end + + diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCommandMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCommandMessage.h new file mode 100644 index 0000000..de24d37 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCommandMessage.h @@ -0,0 +1,75 @@ +// +// RCCommandMessage.h +// RongIMLib +// +// Created by RongCloud on 15/12/2. +// Copyright © 2015 RongCloud. All rights reserved. +// +#import "RCMessageContent.h" + +/*! + * \~chinese + 命令消息的类型名 + * \~english + The type name of the command message + */ +#define RCCommandMessageIdentifier @"RC:CmdMsg" + +/*! + * \~chinese + 命令消息类 + + @discussion 命令消息类,此消息不存储不计入未读消息数。 + 与 RCCommandNotificationMessage 的区别是,此消息不存储,也不会在界面上显示。 + + @remarks 通知类消息 + + * \~english + Command message class. + + @ discussion command message class, this message is not stored and does not count as unread messages. + Unlike RCCommandNotificationMessage, this message is not stored and will not be displayed on the interface. + + @ remarks notification message + */ +@interface RCCommandMessage : RCMessageContent + +/*! + * \~chinese +命令的名称 + * \~english + The name of the command +*/ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 命令的扩展数据 + + @discussion 命令的扩展数据,可以为任意字符串,如存放您定义的json数据。 + + * \~english + Extended data for the command. + + @ discussion The extended data of the command can be any string, such as storing the json data you define. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 初始化命令消息 + + @param name 命令的名称 + @param data 命令的扩展数据 + @return 命令消息对象 + + * \~english + Initialize command message. + + @param name The name of the command. + @param data Extended data for the command. + @ return command message object. + */ ++ (instancetype)messageWithName:(NSString *)name data:(NSString *)data; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCommandNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCommandNotificationMessage.h new file mode 100644 index 0000000..86e0dda --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCommandNotificationMessage.h @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCCommandNotificationMessage.h +// Created by xugang on 14/11/28. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 命令提醒消息的类型名 + * \~english + The type name of the command reminder message. + */ +#define RCCommandNotificationMessageIdentifier @"RC:CmdNtf" + +/*! + * \~chinese + 命令提醒消息类 + + @discussion 命令消息类,此消息会进行存储,但不计入未读消息数。 + 与 RCCommandMessage 的区别是,此消息会进行存储并在界面上显示。 + + @remarks 通知类消息 + + * \~english + Command reminder message class. + + @ discussion Command message class, which is stored but does not count as unread messages. + Unlike RCCommandMessage, this message is stored and displayed on the interface. + + @ remarks notification message. + */ +@interface RCCommandNotificationMessage : RCMessageContent + +/*! + * \~chinese + 命令提醒的名称 + + * \~english + The name of the command reminder + */ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 命令提醒消息的扩展数据 + + @discussion 命令提醒消息的扩展数据,可以为任意字符串,如存放您定义的 json 数据。 + + * \~english + Extended data for command reminder messages. + + @ discussion The extended data of the command reminder message can be any string, such as storing the json data you defined. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 初始化命令提醒消息 + + @param name 命令的名称 + @param data 命令的扩展数据 + @return 命令提醒消息对象 + + * \~english + Initialization command reminder message. + + @param name The name of the command. + @param data Extended data for the command. + @ return Command reminder message object. + */ ++ (instancetype)notificationWithName:(NSString *)name data:(NSString *)data; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCContactNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCContactNotificationMessage.h new file mode 100644 index 0000000..9398b3d --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCContactNotificationMessage.h @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCContactNotificationMessage.h +// Created by xugang on 14/11/28. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 好友请求消息的类型名 + * \~english + The type name of the friend request message. + */ +#define RCContactNotificationMessageIdentifier @"RC:ContactNtf" + +/*! + * \~chinese + 请求添加好友 + * \~english + Request to add friends. + */ +#define ContactNotificationMessage_ContactOperationRequest @"Request" + +/*! + * \~chinese + 同意添加好友的请求 + * \~english + Agree to the request to add friends. + */ +#define ContactNotificationMessage_ContactOperationAcceptResponse @"AcceptResponse" + +/*! + * \~chinese + 拒绝添加好友的请求 + * \~english + Reject the request to add friends + */ +#define ContactNotificationMessage_ContactOperationRejectResponse @"RejectResponse" + +/*! + * \~chinese + 好友请求消息类 + + @discussion 好友请求消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Friend request message class. + + @ discussion friend request message class, this message is stored, but does not count as the number of unread messages. + + @ remarks notification message + */ +@interface RCContactNotificationMessage : RCMessageContent + +/*! + * \~chinese + 好友请求的当前操作名 + + @discussion + 好友请求当前的操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。 + 预定义的操作名:ContactNotificationMessage_ContactOperationRequest、ContactNotificationMessage_ContactOperationAcceptResponse、ContactNotificationMessage_ContactOperationRejectResponse。 + + * \~english + The current operation name of the friend request. + + @ discussion + Friends request the name of the current operation. You can use a predefined operation name or any operation name that you define yourself. + Predefined operation names: ContactNotificationMessage_ContactOperationRequest, ContactNotificationMessage_ContactOperationAcceptResponse, ContactNotificationMessage_ContactOperationRejectResponse. + */ +@property (nonatomic, copy) NSString *operation; + +/*! + * \~chinese + 当前操作发起用户的用户 ID + * \~english + User ID of the user who initiated the current operation + */ +@property (nonatomic, copy) NSString *sourceUserId; + +/*! + * \~chinese + 当前操作目标用户的用户 ID + * \~english + The user ID of the target user for the current operation + */ +@property (nonatomic, copy) NSString *targetUserId; + +/*! + * \~chinese + 当前操作的消息内容 + + @discussion 当前操作的消息内容,如同意、拒绝的理由等。 + + * \~english + Message content of the current operation. + + @ discussion The message content of the current operation, such as consent, reasons for rejection, etc. + */ +@property (nonatomic, copy) NSString *message; + +/*! + * \~chinese + 初始化好友请求消息 + + @param operation 好友请求当前的操作名 + @param sourceUserId 当前操作发起用户的用户 ID + @param targetUserId 当前操作目标用户的用户 ID + @param message 当前操作的消息内容 + @param extra 当前操作的附加信息 + @return 好友请求消息对象 + + @discussion 融云不介入您的好友关系,所有的好友关系都由您的服务器自己维护。 + 所以好友请求的操作名和消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好 UI 显示即可。 + + * \~english + Initialize friend request message. + + @param operation The name of the current operation requested by the friend. + @param sourceUserId User ID of the user who initiates the current operation. + @param targetUserId The user ID of the target user for the current operation. + @param message Message content of the current operation. + @param extra Additional information for the current operation. + @ return friend request message object. + + @ discussion RongCloud does not interfere in your friend relationships. All friend relationships are maintained by your server itself. + Therefore, you can customize the operation name, message content and extended information of the friend request, as long as your sender and receiver make a good UI display of the specific field content. + */ ++ (instancetype)notificationWithOperation:(NSString *)operation + sourceUserId:(NSString *)sourceUserId + targetUserId:(NSString *)targetUserId + message:(NSString *)message + extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversation.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversation.h new file mode 100644 index 0000000..d1b2b5f --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversation.h @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCConversation.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" +#import + +/*! + * \~chinese + 会话类 + + @discussion 会话类,包含会话的所有属性。 + + * \~english + Conversation class. + + @ discussion Conversation class, which contains all the properties of the conversation. + */ +@interface RCConversation : NSObject + +/*! + * \~chinese + 会话类型 + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType conversationType; + +/*! + * \~chinese + 会话 ID + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 该会话的业务标识,长度限制 20 字符 + * \~english + The business identity of the conversation, with a length limit of 20 characters. + */ +@property (nonatomic, copy) NSString *channelId; + +/*! + * \~chinese + 会话的标题 + * \~english + Title of the conversation + */ +@property (nonatomic, copy) NSString *conversationTitle; + +/*! + * \~chinese + 会话中的未读消息数量 + * \~english + Number of unread messages in the conversation + */ +@property (nonatomic, assign) int unreadMessageCount; + +/*! + * \~chinese + 是否置顶,默认值为 NO + + @discussion + 如果设置了置顶,在 IMKit 的 RCConversationListViewController 中会将此会话置顶显示。 + + * \~english + Whether to set the top. default value is NO. + + @ discussion + If the top is set, the conversation is displayed at the top in the RCConversationListViewController of IMKit. + */ +@property (nonatomic, assign) BOOL isTop; + +/*! + * \~chinese + 会话中最后一条消息的接收状态 + * \~english + The receiving status of the last message in the conversation + */ +@property (nonatomic, assign) RCReceivedStatus receivedStatus; + +/*! + * \~chinese + 会话中最后一条消息的发送状态 + * \~english + The sending status of the last message in the conversation + */ +@property (nonatomic, assign) RCSentStatus sentStatus; + +/*! + * \~chinese + 会话中最后一条消息的接收时间(Unix时间戳、毫秒) + * \~english + Time of receipt of the last message in the conversation (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long receivedTime; + +/*! + * \~chinese + 会话中最后一条消息的发送时间(Unix时间戳、毫秒) + * + * \~english + Time when the last message in the conversation is sent (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long sentTime; + +/*! + * \~chinese + 会话中存在的草稿 + * \~english + Drafts that exist in the conversation + */ +@property (nonatomic, copy) NSString *draft; + +/*! + * \~chinese + 会话中最后一条消息的类型名 + * \~english + The type name of the last message in the conversation + */ +@property (nonatomic, copy) NSString *objectName; + +/*! + * \~chinese + 会话中最后一条消息的发送者用户 ID + * \~english + User ID, the sender of the last message in the conversation. + */ +@property (nonatomic, copy) NSString *senderUserId; + +/*! + * \~chinese + 会话中最后一条消息的消息 ID + * \~english + Message ID of the last message in the conversation. + */ +@property (nonatomic, assign) long lastestMessageId; + +/*! + * \~chinese + 会话中最后一条消息的内容 + * \~english + The content of the last message in the conversation + */ +@property (nonatomic, strong) RCMessageContent *lastestMessage; + +/*! + * \~chinese + 会话中最后一条消息的方向 + * \~english + The direction of the last message in the conversation + */ +@property (nonatomic, assign) RCMessageDirection lastestMessageDirection; + +/*! + * \~chinese + 会话中最后一条消息的 json Dictionary + + @discussion 此字段存放最后一条消息内容中未编码的 json 数据。 + SDK 内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为 nil。 + + * \~english + The json Dictionary of the last message in the conversation. + + @ discussion This field stores the unencoded json data in the content of the last message. + The message built into SDK. If the message decoding fails, the default will store the contents of the message in this field; if the encoding and decoding are normal, this field will be set to nil. + */ +@property (nonatomic, strong) NSDictionary *jsonDict; + +/*! + * \~chinese + 最后一条消息的全局唯一 ID + + @discussion 服务器消息唯一 ID(在同一个Appkey下全局唯一) + + * \~english + Globally unique ID of the last message. + + @ discussion Server message unique ID (globally unique under the same Appkey). + */ +@property (nonatomic, copy) NSString *lastestMessageUId; + +/*! + * \~chinese + 会话中是否存在被 @ 的消息 + + @discussion 在清除会话未读数(clearMessagesUnreadStatus:targetId:)的时候,会将此状态置成 NO。 + + * \~english + Whether there is a @ message in the conversation. + + @ discussion set this state to NO when clearing the conversation unread (clearMessagesUnreadStatus:targetId:). + */ +@property (nonatomic, assign, readonly) BOOL hasUnreadMentioned; + +/*! + * \~chinese +会话中 @ 消息的个数 + +@discussion 在清除会话未读数(clearMessagesUnreadStatus:targetId:)的时候,会将此值置成 0。 + + * \~english + The number of @ messages in the conversation. + + @ discussion Set this value to 0 when it clears the conversation unread (clearMessagesUnreadStatus:targetId:). +*/ +@property (nonatomic, assign) int mentionedCount; + +/*! + * \~chinese +会话是否是免打扰状态 + + * \~english + Whether the conversation is in a do not Disturb state. +*/ +@property (nonatomic, assign) RCConversationNotificationStatus blockStatus; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationChannelProtocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationChannelProtocol.h new file mode 100644 index 0000000..fa44582 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationChannelProtocol.h @@ -0,0 +1,91 @@ +// +// RCConversationChannelProtocol.h +// RongIMLibCore +// +// Created by Sin on 2021/3/5. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#ifndef RCConversationChannelProtocol_h +#define RCConversationChannelProtocol_h +@protocol RCConversationChannelMessageReceiptDelegate +@optional +/*! + * \~chinese + 请求消息已读回执(收到需要阅读时发送回执的请求,收到此请求后在会话页面已经展示该 messageUId 对应的消息或者调用 + getHistoryMessages 获取消息的时候,包含此 messageUId 的消息,需要调用 sendMessageReadReceiptResponse + 接口发送消息阅读回执) + + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + @param channelId 所属会话的业务标识 + + * \~english + Request message read receipt (receive a request to send a receipt upon reading. After receiving this request, the corresponding message of the messageUId has been displayed on the conversation page, or when getHistoryMessages is called to get the message, the message with messageUId will call sendMessageReadReceiptResponse interface to send message tread receipt ). + + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + @param channelId Business identity of the conversation to which it belongs. + */ +- (void)onMessageReceiptRequest:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageUId:(NSString *)messageUId; + +/*! + * \~chinese + 消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数) + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + @param channelId 所属会话的业务标识 + @param userIdList 已读userId列表 + + * \~english + Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId). + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + @param channelId Business identity of the conversation to which it belongs. + @param userIdList Read userId list. + */ +- (void)onMessageReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageUId:(NSString *)messageUId + readerList:(NSMutableDictionary *)userIdList; + +@end + +@protocol RCConversationChannelTypingStatusDelegate +/*! + * \~chinese + 用户输入状态变化的回调 + + @param conversationType 会话类型 + @param targetId 会话目标ID + @param channelId 所属会话的业务标识 + @param userTypingStatusList 正在输入的RCUserTypingStatus列表(nil标示当前没有用户正在输入) + + @discussion + 当客户端收到用户输入状态的变化时,会回调此接口,通知发生变化的会话以及当前正在输入的RCUserTypingStatus列表。 + + * \~english + Callback for user input status change. + + @param conversationType Conversation type + @param targetId conversation destination ID. + @param channelId Business identity of the conversation to which it belongs. + @param userTypingStatusList List of RCUserTypingStatus being entered (nil indicates that no user is currently entering). + + @ discussion + When the client receives a change in the status of the user's input, it calls back this interface to notify the changed conversation and the RCUserTypingStatus list currently being entered. + */ +- (void)onTypingStatusChanged:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + status:(NSArray *)userTypingStatusList; +@end +#endif /* RCConversationChannelProtocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationIdentifier.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationIdentifier.h new file mode 100644 index 0000000..4f7ccc3 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationIdentifier.h @@ -0,0 +1,53 @@ +// +// RCConversationIdentifier.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCStatusDefine.h" +NS_ASSUME_NONNULL_BEGIN +/*! + * \~chinese + 会话标识 + * \~english + Conversation identification + */ +@interface RCConversationIdentifier : NSObject +/*! + * \~chinese + 会话类型 + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType type; +/*! + * \~chinese + 会话 ID + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + RCConversationIdentifier 初始化方法 + + @param type 会话类型 + @param targetId 会话 id + + * \~english + RCConversationIdentifier initialization method. + + @ param type conversation type. + @ param targetId conversation id. + */ + +- (instancetype)initWithConversationIdentifier:(RCConversationType)type + targetId:(NSString *)targetId; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationStatusInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationStatusInfo.h new file mode 100644 index 0000000..7e89a3e --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationStatusInfo.h @@ -0,0 +1,88 @@ +// +// RCConversationStatusInfo.h +// RongIMLib +// +// Created by liyan on 2020/5/13. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +#import "RCStatusDefine.h" + +/*! + * \~chinese +会话状态类型 + * \~english + Conversation state type +*/ + +typedef NS_ENUM(NSUInteger, RCConversationStatusType) { + /*! + * \~chinese + 免打扰 + * \~english + Do not disturb + */ + RCConversationStatusType_Mute = 1, + + /*! + * \~chinese + 置顶 + * \~english + Top + */ + RCConversationStatusType_Top = 2 +}; + +NS_ASSUME_NONNULL_BEGIN + +@interface RCConversationStatusInfo : NSObject + +/*! + * \~chinese + 会话类型 + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType conversationType; + +/*! + * \~chinese + 会话 ID + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 所属会话的业务标识 + * \~english + Business identifier of the conversation to which it belongs. + */ +@property (nonatomic, copy) NSString *channelId; + +/*! + * \~chinese + 会话状态改变的类型 + * \~english + Types of conversation state changes +*/ +@property (nonatomic, assign) RCConversationStatusType conversationStatusType; + +/*! + * \~chinese + 如果 conversationStatusType = RCConversationStatusType_Mute, conversationStatusvalue = 0 + 是提醒,conversationStatusvalue = 1 是免打扰。 如果 conversationStatusType = RCConversationStatusType_Top, + conversationStatusvalue = 0 是不置顶,conversationStatusvalue = 1 是置顶。 + + * \~english + If conversationStatusType = RCConversationStatusType_Mute, conversationStatusvalue = 0. + Is a reminder, conversationStatusvalue = 1 is do not disturb. If conversationStatusType = RCConversationStatusType_Top. + ConversationStatusvalue = 0 indicates non top setting, conversationStatusvalue = 1 is the top setting. +*/ +@property (nonatomic, assign) int conversationStatusvalue; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationTagInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationTagInfo.h new file mode 100644 index 0000000..2477797 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCConversationTagInfo.h @@ -0,0 +1,40 @@ +// +// ConversationTagInfo.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCTagInfo.h" +NS_ASSUME_NONNULL_BEGIN +/*! + * \~chinese + 会话所属的标签信息 + * \~english + Tag information to which the conversation belongs + */ +@interface RCConversationTagInfo : NSObject + +/*! + * \~chinese + 标签信息 + + * \~english + tag info + */ +@property (nonatomic, strong) RCTagInfo *tagInfo; + +/*! + * \~chinese + 会话是否置顶 + + * \~english + Whether the conversation is at the top + */ +@property (nonatomic, assign) BOOL isTop; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCoreClient.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCoreClient.h new file mode 100644 index 0000000..fc2e607 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCCoreClient.h @@ -0,0 +1,4547 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RongCoreClient.h +// Created by xugang on 14/12/23. + +#ifndef __RongCoreClient +#define __RongCoreClient +#import +#import +#import "RCConversation.h" +#import "RCMessage.h" +#import "RCPushProfile.h" +#import "RCSearchConversationResult.h" +#import "RCStatusDefine.h" +#import "RCUploadImageStatusListener.h" +#import "RCUploadMediaStatusListener.h" +#import "RCUserInfo.h" +#import "RCUserOnlineStatusInfo.h" +#import "RCWatchKitStatusDelegate.h" +#import "RCSendMessageOption.h" +#import "RCRemoteHistoryMsgOption.h" +#import "RCIMClientProtocol.h" +#import "RCTagInfo.h" +#import "RCConversationIdentifier.h" +#import "RCConversationTagInfo.h" +#import "RCTagProtocol.h" +#import "RCImageCompressConfig.h" +#import "RCHistoryMessageOption.h" +/*! + * \~chinese + @const 收到已读回执的 Notification + + @discussion 收到消息已读回执之后,IMLibCore 会分发此通知。 + + Notification 的 object 为 nil,userInfo 为 NSDictionary 对象, + 其中 key 值分别为 @"cType"、@"tId"、@"messageTime", + 对应的 value 为会话类型的 NSNumber 对象 、会话的 targetId 、已阅读的最后一条消息的 sendTime。 + 如: + NSNumber *ctype = [notification.userInfo objectForKey:@"cType"]; + NSNumber *time = [notification.userInfo objectForKey:@"messageTime"]; + NSString *targetId = [notification.userInfo objectForKey:@"tId"]; + NSString *channelId = [notification.userInfo objectForKey:@"cId"]; + NSString *fromUserId = [notification.userInfo objectForKey:@"fId"]; + + 收到这个消息之后可以更新这个会话中 messageTime 以前的消息 UI 为已读(底层数据库消息状态已经改为已读)。 + + @remarks 事件监听 + + * \~english + @const Receive the Notification of read receipt +@ discussion IMLibCore distributes this notification after receiving the read receipt of the message. + + The object of Notification is nil and userInfo is the object of NSDictionary +where key values are @ "cType", @ "tId" and @ "messageTime" respectively +and the corresponding value is the NSNumber object of the conversation type, the targetId of the conversation, and the sendTime of the last message read. + E.g. + NSNumber *ctype = [notification.userInfo objectForKey:@"cType"]; + NSNumber *time = [notification.userInfo objectForKey:@"messageTime"]; + NSString *targetId = [notification.userInfo objectForKey:@"tId"]; + NSString *channelId = [notification.userInfo objectForKey:@"cId"]; + NSString *fromUserId = [notification.userInfo objectForKey:@"fId"]; + +After this message is received, you can update the previous messageTime message UI in this conversation to read (the underlying database message status has been changed to read). + + @ remarks event listener + */ +FOUNDATION_EXPORT NSString *const RCLibDispatchReadReceiptNotification; + +#pragma mark - IMLibCore Core Class + +/*! + * \~chinese + 融云 IMLibCore 核心类 + + @discussion 您需要通过 sharedCoreClient 方法,获取单例对象。 + + * \~english + RongCloud IMLibCore core class + + @discussion You shall get the single instance object through the sharedCoreClient method. + */ +@interface RCCoreClient : NSObject + +/*! + * \~chinese + 获取融云通讯能力库 IMLibCore 的核心类单例 + + @return 融云通讯能力库 IMLibCore 的核心单例类 + + @discussion 您可以通过此方法,获取 IMLibCore 的单例,访问对象中的属性和方法. + + * \~english + Get a single instance of the core class of RongCloud communication capability library IMLibCore + + @ return Core single instance class of RongCloud communication capability library IMLibCore. + + @ discussion You can use this method to get the single instance of IMLibCore and access to the properties and methods in the object. + */ ++ (instancetype)sharedCoreClient; + +#pragma mark - SDK init +/*! + * \~chinese + 初始化融云 SDK + + @param appKey 从融云开发者平台创建应用后获取到的 App Key + @discussion 初始化后,SDK 会监听 app 生命周期, 用于判断应用处于前台、后台,根据前后台状态调整链接心跳 + @discussion + 您在使用融云 SDK 所有功能( 包括显示 SDK 中或者继承于 SDK 的 View )之前,您必须先调用此方法初始化 SDK。 + 在 App 整个生命周期中,您只需要执行一次初始化。 + + **升级说明:** + **从2.4.1版本开始,为了兼容 Swift 的风格与便于使用,将原有的 init: 方法升级为此方法,方法的功能和使用均不变。** + + @warning 如果您使用 IMLibCore,请使用此方法初始化 SDK; + 如果您使用 IMKit,请使用 RCIM 中的同名方法初始化,而不要使用此方法。 + + @remarks 连接 + + * \~english + Initialize RongCloud SDK. + + @param appKey The App Key obtained after the application is created by RongCloud developer platform + @discussion After initialization, SDK listens to the app life cycle to determine whether the application is in the foreground or background, and adjusts the link heartbeat according to the foreground and background status. + @ discussion + You must call this method to initialize the SDK before you can use all the features of the RongCloud SDK (including displaying View in SDK or inheriting from SDK). + You only shall perform initialization once throughout the App lifecycle. + + ** Upgrade instructions:** + *””From version 2.4.1, to be compatible with the style of Swift and easy to use, the original init: method is upgraded to this method, and the function and use of the method remain unchanged. ** + + @ warning If you are using IMLibCore, please use this method to initialize SDK + If you are using IMKit, use the method of the same name in RCIM instead of using this method. + + @ remarks Connection + */ +- (void)initWithAppKey:(NSString *)appKey; + +/*! + * \~chinese +设置 deviceToken(已兼容 iOS 13),用于远程推送 + +@param deviceTokenData 从系统获取到的设备号 deviceTokenData (不需要处理) + +@discussion +deviceToken 是系统提供的,从苹果服务器获取的,用于 APNs 远程推送必须使用的设备唯一值。 +您需要将 -application:didRegisterForRemoteNotificationsWithDeviceToken: 获取到的 deviceToken 作为参数传入此方法。 + +如: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [[RCCoreClient sharedCoreClient] setDeviceTokenData:deviceToken]; + } +@remarks 功能设置 + + * \~english + Set deviceToken (compatible with iOS 13) for remote push + + @param deviceTokenData Device number deviceTokenData obtained from the system (no processing required) + + @ discussion + DeviceToken is the unique device value the that must be used for APNs remote push, and is provided by the system and obtained from the Apple server. + You shall pass the deviceToken obtained by the application:didRegisterForRemoteNotificationsWithDeviceToken: into this method as a parameter. + + E.g.: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [[RCCoreClient sharedCoreClient] setDeviceTokenData:deviceToken]; + } + @remarks Function setting +*/ +- (void)setDeviceTokenData:(NSData *)deviceTokenData; + +/*! + * \~chinese + 设置 deviceToken,用于远程推送 + + @param deviceToken 从系统获取到的设备号 deviceToken + + @discussion + deviceToken 是系统提供的,从苹果服务器获取的,用于 APNs 远程推送必须使用的设备唯一值。 + 您需要将 -application:didRegisterForRemoteNotificationsWithDeviceToken: 获取到的 + deviceToken,转换成十六进制字符串,作为参数传入此方法。 + + 如: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + NSString *token = [self getHexStringForData:deviceToken]; + [[RCCoreClient sharedCoreClient] setDeviceToken:token]; + } + + - (NSString *)getHexStringForData:(NSData *)data { + NSUInteger len = [data length]; + char *chars = (char *)[data bytes]; + NSMutableString *hexString = [[NSMutableString alloc] init]; + for (NSUInteger i = 0; i < len; i ++) { + [hexString appendString:[NSString stringWithFormat:@"%0.2hhx", chars[i]]]; + } + return hexString; + } + + @remarks 功能设置 + + * \~english + Set deviceToken for remote push + + @param deviceToken The device number deviceToken obtained from the system + + @ discussion + DeviceToken is the unique device value the that must be used for APNs remote push, and is provided by the system and obtained from the Apple server. + You shall pass the deviceToken obtained by the application:didRegisterForRemoteNotificationsWithDeviceToken: Obtained + deviceToken, which is converted to a hexadecimal string and passed in to this method as a parameter. + + E.g.: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + NSString *token = [self getHexStringForData:deviceToken]; + [[RCCoreClient sharedCoreClient] setDeviceToken:token]; + } + + - (NSString *)getHexStringForData:(NSData *)data { + NSUInteger len = [data length]; + char *chars = (char *)[data bytes]; + NSMutableString *hexString = [[NSMutableString alloc] init]; + for (NSUInteger i = 0; i < len; i ++) { + [hexString appendString:[NSString stringWithFormat:@"%0.2hhx", chars[i]]]; + } + return hexString; + } + + @remarks function setting + */ +- (void)setDeviceToken:(NSString *)deviceToken; + +#pragma mark - set navi server & file server (contact us before use) + +/*! + * \~chinese + 设置导航服务器和上传文件服务器信息 + + @param naviServer 导航服务器地址,具体的格式参考下面的说明 + @param fileServer 文件服务器地址,具体的格式参考下面的说明 + @return 是否设置成功 + + @warning 仅限独立数据中心使用,使用前必须先联系商务开通。必须在 SDK init 之前进行设置。 + @discussion + naviServer 必须为有效的服务器地址,fileServer 如果想使用默认的,可以传 nil。 + naviServer 和 fileServer 的格式说明: + 1、如果使用 https,则设置为 https://cn.xxx.com:port 或 https://cn.xxx.com 格式,其中域名部分也可以是 + IP,如果不指定端口,将默认使用 443 端口。 + 2、如果使用 http,则设置为 cn.xxx.com:port 或 cn.xxx.com 格式,其中域名部分也可以是 IP,如果不指定端口,将默认使用 80 + 端口。(iOS 默认只能使⽤ HTTPS 协议。如果您使⽤ http 协议,请参考 iOS 开发 + ⽂档中的 ATS 设置说明。链接如下:https://support.rongcloud.cn/ks/OTQ1 ) + + @remarks 功能设置 + + * \~english + Set navigation server and upload file server information + + @param naviServer Address of navigation server. For the specific format, please refer to the instructions below + @param fileServer Address of the file server. For the specific format, please refer to the instructions below + @ return whether it is set successfully + + @ warning It can only be used at an independent data center and you must contact the business to activate it before using it. It must be set before SDK init. + @ discussion + naviServer must be a valid server address, and fileServer can pass nil if you want to use the default. + Format description for naviServer and fileServer: + 1. If you use https, it is set to https://cn.xxx.com:port or https://cn.xxx.com format, and the domain name can also be IP. If a port is not specified, port 443 will be used by default. + 2. If http is used, it is set to cn.xxx.com:port or cn.xxx.com format, and the domain name can also be IP. If the port is not specified, port 80 will be used by default. (iOS can only use the HTTPS protocol by default. If you use the http protocol, please refer to description of the ATS settings in the iOS development documentation. The link is as follows: https://support.rongcloud.cn/ks/OTQ1) + + @ remarks function setting + */ +- (BOOL)setServerInfo:(NSString *)naviServer fileServer:(NSString *)fileServer; + +/** + * \~chinese + 设置统计服务器的信息 + + @param statisticServer 统计服务器地址,具体的格式参考下面的说明 + @return 是否设置成功 + + @warning 仅限独立数据中心使用,使用前必须先联系商务开通。必须在 SDK init 和 setDeviceToken 之前进行设置。 + @discussion + statisticServer 必须为有效的服务器地址,否则会造成推送等业务不能正常使用。 + 格式说明: + 1、如果使用 https,则设置为 https://cn.xxx.com:port 或 https://cn.xxx.com 格式,其中域名部分也可以是 + IP,如果不指定端口,将默认使用 443 端口。 + 2、如果使用 http,则设置为 cn.xxx.com:port 或 cn.xxx.com 格式,其中域名部分也可以是 IP,如果不指定端口,将默认使用 80 + 端口。(iOS 默认只能使⽤ HTTPS 协议。如果您使⽤ http 协议,请参考 iOS 开发 + ⽂档中的 ATS 设置说明。链接如下:https://support.rongcloud.cn/ks/OTQ1 ) + + @remarks 功能设置 + + * \~english + Set the statistics server information + + @param statisticServer Address of the statistics server. For the specific format, please refer to the instructions below + @ return Whether it is set successfully + + @ warning It can only be used at an independent data center and you must contact the business to activate it before using it. It must be set before SDK init and setDeviceToken. + @ discussion + statisticServer must have a valid server address, otherwise services such as push cannot be used properly. + Format description: + 1. If you use https, it is set to https://cn.xxx.com:port or https://cn.xxx.com format, and the domain name can also be IP. If a port is not specified, port 443 will be used by default. + 2. If http is used, it is set to cn.xxx.com:port or cn.xxx.com format, and the domain name can also be IP. If the port is not specified, 80 will be used by default. (iOS can only use the HTTPS protocol by default. If you use the http protocol, please refer to description of the ATS settings in the iOS development documentation. The link is as follows: https://support.rongcloud.cn/ks/OTQ1) + + @ remarks function setting + */ +- (BOOL)setStatisticServer:(NSString *)statisticServer; + +#pragma mark - Connect & disconnect + +/*! + * \~chinese + 与融云服务器建立连接 + + @param token 从您服务器端获取的 token (用户身份令牌) + @param dbOpenedBlock 本地消息数据库打开的回调 + @param successBlock 连接建立成功的回调 [ userId: 当前连接成功所用的用户 ID] + @param errorBlock 连接建立失败的回调,触发该回调代表 SDK 无法继续重连 [errorCode: 连接失败的错误码] + + @discussion 调用该接口,SDK 会在连接失败之后尝试重连,直到连接成功或者出现 SDK 无法处理的错误(如 token 非法)。 + 如果您不想一直进行重连,可以使用 connectWithToken:timeLimit:dbOpened:success:error: 接口并设置连接超时时间 timeLimit。 + + @discussion 连接成功后,SDK 将接管所有的重连处理。当因为网络原因断线的情况下,SDK 会不停重连直到连接成功为止,不需要您做额外的连接操作。 + + 对于 errorBlock 需要特定关心 tokenIncorrect 的情况: + 一是 token 错误,请您检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey 是否一致; + 二是 token 过期,是因为您在开发者后台设置了 token 过期时间,您需要请求您的服务器重新获取 token 并再次用新的 token 建立连接。 + 在此种情况下,您需要请求您的服务器重新获取 token 并建立连接,但是注意避免无限循环,以免影响 App 用户体验。 + + @warning 如果您使用 IMLibCore,请使用此方法建立与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法建立与融云服务器的连接,而不要使用此方法。 + + 此方法的回调并非为原调用线程,您如果需要进行 UI 操作,请注意切换到主线程。 + + * \~english + Establish a connection with the RongCloud server. + + @param token Token (user identity token) obtained from your server. + @param dbOpenedBlock Callback for opening the local message database. + @param successBlock Callback for successful connection establishment [userId: The user ID used for the current successful connection]. + @param errorBlock Callback for failed connection establishment. Triggering this callback means that SDK cannot continue to reconnect [errorCode: Error code for connection failure]. + + @ discussion After this interface is called, SDK will try to reconnect after the connection fails, until the connection is successful or an error that SDK cannot handle (such as illegal token) occurs. + If you don't want to keep reconnecting, you can use connectWithToken:timeLimit:dbOpened:success:error: interface and set the connection timeout timeLimit + + @ discussion After the connection is successful, SDK will take over all reconnection processing When the connection is disconnected due to network reasons, SDK will keep reconnecting until the connection is successful, and there is no need for you to do any additional connection operations. + + For situations where errorBlock shall be specifically concerned about tokenIncorrect: + One is the token error. Please check whether the AppKey used by the client initialization is consistent with the AppKey used by your server to obtain the token. + Second, the token expires because you set the token expiration time in the developer background, and you shall request your server to retrieve the token and establish a connection with the new token again. + In this case, you shall ask your server to retrieve the token and establish a connection, but be careful to avoid an infinite loop so as not to ensure a good App user experience. + + @ warning If you use IMLibCore, please use this method to establish a connection with the RongCloud server; + If you use IMKit, please use the method of the same name in RCIM to establish a connection to the RongCloud server instead of using this method. + + The callback for this method is not the original calling thread. If you shall perform a UI operation, please be careful to switch to the main thread. + */ +- (void)connectWithToken:(NSString *)token + dbOpened:(void (^)(RCDBErrorCode code))dbOpenedBlock + success:(void (^)(NSString *userId))successBlock + error:(void (^)(RCConnectErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 与融云服务器建立连接 + + @param token 从您服务器端获取的 token (用户身份令牌) + @param timeLimit SDK 连接的超时时间,单位: 秒 + timeLimit <= 0,SDK 会一直连接,直到连接成功或者出现 SDK 无法处理的错误(如 token 非法)。 + timeLimit > 0,SDK 最多连接 timeLimit 秒,超时时返回 RC_CONNECT_TIMEOUT 错误,并不再重连。 + @param dbOpenedBlock 本地消息数据库打开的回调 + @param successBlock 连接建立成功的回调 [ userId: 当前连接成功所用的用户 ID] + @param errorBlock 连接建立失败的回调,触发该回调代表 SDK 无法继续重连 [errorCode: 连接失败的错误码] + + @discussion 调用该接口,SDK 会在 timeLimit 秒内尝试重连,直到出现下面三种情况之一: + 第一、连接成功,回调 successBlock(userId)。 + 第二、超时,回调 errorBlock(RC_CONNECT_TIMEOUT)。 + 第三、出现 SDK 无法处理的错误,回调 errorBlock(errorCode)(如 token 非法)。 + + @discussion 连接成功后,SDK 将接管所有的重连处理。当因为网络原因断线的情况下,SDK 会不停重连直到连接成功为止,不需要您做额外的连接操作。 + + 对于 errorBlock 需要特定关心 tokenIncorrect 的情况: + 一是 token 错误,请您检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey 是否一致; + 二是 token 过期,是因为您在开发者后台设置了 token 过期时间,您需要请求您的服务器重新获取 token 并再次用新的 token 建立连接。 + 在此种情况下,您需要请求您的服务器重新获取 token 并建立连接,但是注意避免无限循环,以免影响 App 用户体验。 + + @warning 如果您使用 IMLibCore,请使用此方法建立与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法建立与融云服务器的连接,而不要使用此方法。 + + 此方法的回调并非为原调用线程,您如果需要进行 UI 操作,请注意切换到主线程。 + + * \~english + Establish a connection with the RongCloud server. + + @param token Token (user identity token) obtained from your server. + @param timeLimit Timeout of SDK connection, unit: (in seconds) + TimeLimit < = 0 the SDK SDK will continue to connect until the connection is successful or an error (such as illegal token) that cannot be handled by the SDK occurs. + TimeLimit > 0, SDK can be connected for a maximum of timeLimit seconds. A RC_CONNECT_TIMEOUT error is returned when the timeout occurs, and the connection will not be reconnected + @param dbOpenedBlock Callback for opening the local message database. + @param successBlock Callback for successful connection establishment [userId: The user ID used for the current successful connection]. + @param errorBlock Callback for failed connection establishment. Triggering this callback means that SDK cannot continue to reconnect [errorCode: Error code for connection failure] + + @ discussion If this interface is called, SDK will try to reconnect within the timeLimit seconds until one of the following three situations occurs: + First, if the connection is successful, call back successBlock (userId). + Second, call back errorBlock (RC_CONNECT_TIMEOUT) after timeout. + Third, if there is an error that cannot be handled by SDK, callback errorBlock (errorCode) (such as token is illegal). + + @ discussion After the connection is successful, SDK will take over all reconnection processing When the connection is disconnected due to network reasons, SDK will keep reconnecting until the connection is successful, and there is no need for you to do any additional connection operations. + + For situations where errorBlock shall be specifically concerned about tokenIncorrect: + One is the token error. Please check whether the AppKey used by the client initialization is consistent with the AppKey used by your server to obtain the token. + Second, the token expires because you set the token expiration time in the developer background, and you shall request your server to retrieve the token and establish a connection with the new token again. + In this case, you shall ask your server to retrieve the token and establish a connection, but be careful to avoid an infinite loop so as not to ensure a good App user experience. + + @ warning If you use IMLibCore, please use this method to establish a connection with the RongCloud server; + If you use IMKit, please use the method of the same name in RCIM to establish a connection to the RongCloud server instead of using this method. + + The callback for this method is not the original calling thread. If you shall perform a UI operation, please be careful to switch to the main thread. + */ +- (void)connectWithToken:(NSString *)token + timeLimit:(int)timeLimit + dbOpened:(void (^)(RCDBErrorCode code))dbOpenedBlock + success:(void (^)(NSString *userId))successBlock + error:(void (^)(RCConnectErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 断开与融云服务器的连接 + + @param isReceivePush App 在断开连接之后,是否还接收远程推送 + + @discussion + 因为 SDK 在前后台切换或者网络出现异常都会自动重连,会保证连接的可靠性。 + 所以除非您的 App 逻辑需要登出,否则一般不需要调用此方法进行手动断开。 + + @warning 如果您使用 IMLibCore,请使用此方法断开与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法断开与融云服务器的连接,而不要使用此方法。 + + isReceivePush 指断开与融云服务器的连接之后,是否还接收远程推送。 + [[RCCoreClient sharedCoreClient] disconnect:YES] 与 [[RCCoreClient sharedCoreClient] + disconnect] 完全一致; + [[RCCoreClient sharedCoreClient] disconnect:NO] 与[ [RCCoreClient sharedCoreClient] + logout] 完全一致。 + 您只需要按照您的需求,使用 disconnect: 与 disconnect 以及 logout 三个接口其中一个即可。 + + @remarks 连接 + + * \~english + Disconnect from the RongCloud server + + @param isReceivePush Does app still receive remote push after being disconnected + + @ discussion + The system can automatically reconnect to ensure reliability of the connection because SDK switches between the foreground and background or the network is abnormal. + Unless your App logic requires logout, generally you don't need to call this method for manual disconnection. + + @ warning If you use IMLibCore, please use this method to disconnect from the RongCloud server. + If you use IMKit, please use the method of the same name in RCIM to disconnect from the RongCloud server instead of using this method. + + isReceivePush refers to whether remote push will be received after the connection with the RongCloud server is disconnected. + [[RCCoreClient sharedCoreClient] disconnect:YES] and [[RCCoreClient sharedCoreClient] + disconnect] are exactly the same; + [[RCCoreClient sharedCoreClient] disconnect:NO] and [ [RCCoreClient sharedCoreClient] + logout] are exactly the same. + You just need to use one of disconnect:, disconnect and logout interfaces on demand. + + @ remarks Connection + */ +- (void)disconnect:(BOOL)isReceivePush; + +/*! + * \~chinese + 断开与融云服务器的连接,但仍然接收远程推送 + + @discussion + 因为 SDK 在前后台切换或者网络出现异常都会自动重连,会保证连接的可靠性。 + 所以除非您的 App 逻辑需要登出,否则一般不需要调用此方法进行手动断开。 + + @warning 如果您使用 IMLibCore,请使用此方法断开与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法断开与融云服务器的连接,而不要使用此方法。 + + [[RCCoreClient sharedCoreClient] disconnect:YES] 与 [[RCCoreClient sharedCoreClient] + disconnect] 完全一致; + [[RCCoreClient sharedCoreClient] disconnect:NO] 与 [[RCCoreClient sharedCoreClient] + logout] 完全一致。 + 您只需要按照您的需求,使用 disconnect: 与 disconnect 以及 logout 三个接口其中一个即可。 + + @remarks 连接 + + * \~english + Disconnect from the RongCloud server, but still receive remote push + + @ discussion + The system can automatically reconnect to ensure reliability of the connection because SDK switches between the foreground and background or the network is abnormal. + Unless your App logic requires logout, generally you don't need to call this method for manual disconnection. + + @ warning If you use IMLibCore, please use this method to disconnect from the RongCloud server. + If you use IMKit, please use the method of the same name in RCIM to disconnect from the RongCloud server instead of using this method. + + [[RCCoreClient sharedCoreClient] disconnect:YES] and [[RCCoreClient sharedCoreClient] + disconnect] are exactly same; + [[RCCoreClient sharedCoreClient] disconnect:NO] and [[RCCoreClient sharedCoreClient] + logout] are exactly same. + You just shall use one of disconnect: Disconnect and logout interface on demand. + + @ remarks Connection + */ +- (void)disconnect; + +/*! + * \~chinese + 断开与融云服务器的连接,并不再接收远程推送 + + @discussion + 因为 SDK 在前后台切换或者网络出现异常都会自动重连,会保证连接的可靠性。 + 所以除非您的 App 逻辑需要登出,否则一般不需要调用此方法进行手动断开。 + + @warning 如果您使用 IMKit,请使用此方法断开与融云服务器的连接; + 如果您使用 IMLibCore,请使用 RCCoreClient 中的同名方法断开与融云服务器的连接,而不要使用此方法。 + + [[RCCoreClient sharedCoreClient] disconnect:YES] 与 [[RCCoreClient sharedCoreClient] + disconnect] 完全一致; + [[RCCoreClient sharedCoreClient] disconnect:NO] 与 [[RCCoreClient sharedCoreClient] + logout] 完全一致。 + 您只需要按照您的需求,使用 disconnect: 与 disconnect 以及 logout 三个接口其中一个即可。 + + @remarks 连接 + + * \~english + Disconnect from the RongCloud server and do not receive remote push + + @ discussion + The system can automatically reconnect to ensure reliability of the connection because SDK switches between the foreground and background or the network is abnormal. + Unless your App logic requires logout, generally you don't need to call this method for manual disconnection. + + @ warning If you use IMKit, please use this method to disconnect from the RongCloud server; + If you use IMLibCore, please use the method of the same name in RCCoreClient to disconnect from the RongCloud server instead of using this method. + + [[RCCoreClient sharedCoreClient] disconnect:YES] and [[RCCoreClient sharedCoreClient] + disconnect] are exactly same; + [[RCCoreClient sharedCoreClient] disconnect:NO] and [[RCCoreClient sharedCoreClient] + logout] are exactly same. + You just shall use one of disconnect: Disconnect and logout interface on demand. + + @ remarks Connection + */ +- (void)logout; + +/** + * \~chinese + 设置断线重连时是否踢出当前正在重连的设备 + + @discussion + 用户没有开通多设备登录功能的前提下,同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。 + 由于 SDK 有断线重连功能,存在下面情况。 + 用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。 + 用户此时又在 B 设备登录,B 设备连接成功。 + A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。 + 这个接口就是为这种情况加的。 + 设置 enable 为 YES 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。 + + @param enable 是否踢出重连设备 + + @remarks 功能设置 + + * \~english + Set whether to kick out the reconnected device upon disconnection and reconnection. + + @ discussion + If the user does not enable the multi-device login function, when the same account logs in on a new device, the account will be kicked out of the previously logged-in device. + Due to the disconnection and reconnection function of SDK, the following conditions exist: + When the user logs in on device A, the network of device A is unstable, and the connection is not successful, SDK will start the reconnection mechanism. + At this time, the user logs in on the B device, and the B device is connected successfully. + After the A device network is stable, the user connects to the A device successfully, and the B device is kicked out. + This interface is added for this case. I + If If enable is set as YES, when SDK is reconnected and it is found that other devices have been successfully connected at this time, the reconnected devices will be kicked out instead of forcibly kicking out the existing devices. + + @param enable Whether to kick out the reconnected equipment + + @ remarks function setting + */ +- (void)setReconnectKickEnable:(BOOL)enable; + +#pragma mark - RCConnectionStatusChangeDelegate + +/*! + * \~chinese + 设置 IMLibCore 的连接状态监听器 + + @param delegate IMLibCore 连接状态监听器 + + @warning 如果您使用 IMLibCore,可以设置并实现此 Delegate 监听连接状态变化; + 如果您使用 IMKit,请使用 RCIM 中的 connectionStatusDelegate 监听连接状态变化,而不要使用此方法,否则会导致 IMKit + 中无法自动更新 UI! + + @remarks 功能设置 + + * \~english + Set the connection status listener for IMLibCore + + @param delegate IMLibCore connection status listener. + + @ warning If you use IMLibCore, you can set and implement this Delegate to listen toconnection status changes. + If you use IMKit, please use connectionStatusDelegate in RCIM to listen to connection status changes, and do not use this method, otherwise it will cause that UI cannot be automatically updated in IMKit! + + @ remarks function setting + */ +- (void)setRCConnectionStatusChangeDelegate:(id)delegate; + +/*! + * \~chinese + 获取当前 SDK 的连接状态 + + @return 当前 SDK 的连接状态 + + @remarks 数据获取 + + * \~english + Get the connection status of the current SDK + + @ return connection status of the current SDK + + @ remarks data acquisition + */ +- (RCConnectionStatus)getConnectionStatus; + +/*! + * \~chinese + 获取当前的网络状态 + + @return 当前的网路状态 + + @remarks 数据获取 + + * \~english + Get the current network status + + @ return current network status + + @ remarks data acquisition + */ +- (RCNetworkStatus)getCurrentNetworkStatus; + +/*! + * \~chinese + SDK 当前所处的运行状态 + + @remarks 数据获取 + + * \~english + Current running status of SDK + + @ remarks data acquisition + */ +@property (nonatomic, assign, readonly) RCSDKRunningMode sdkRunningMode; + +#pragma mark - Apple Watch Delegate + +/*! + * \~chinese + 用于 Apple Watch 的 IMLibCore 事务监听器 + + @remarks 功能设置 + + * \~english + IMLibCore transaction listener for Apple Watch. + + @ remarks function setting + */ +@property (nonatomic, strong) id watchKitStatusDelegate; + +/*! + * \~chinese + 媒体文件下载拦截器 + + @remarks 功能设置 + + * \~english + Media file downloading interceptor + + @ remarks function setting + */ +@property (nonatomic, weak) id downloadInterceptor; + +#pragma mark - RCMessageDestructDelegate + +/** + * \~chinese + 设置 IMLibCore 的阅后即焚监听器 + + @param delegate 阅后即焚监听器 + @discussion 可以设置并实现此 Delegate 监听消息焚烧 + @warning 如果您使用 IMKit,请不要使用此监听器,否则会导致 IMKit 中无法自动更新 UI! + + @remarks 功能设置 + + * \~english + Set burn-after-reading listener of IMLibCore. + + @param delegate Burn-after-reading listener + @ discussion you can set and implement this Delegate to listen to message burning. + @ warning Please do not use this listener if you use IMKit, otherwise UI cannot be automatically updated in IMKit! + + @ remarks function setting + */ +- (void)setRCMessageDestructDelegate:(id)delegate; + +#pragma mark - currentUserInfo + +/*! + * \~chinese + 当前登录用户的用户信息 + + @discussion 用于与融云服务器建立连接之后,设置当前用户的用户信息。 + + @warning 如果传入的用户信息中的用户 ID 与当前登录的用户 ID 不匹配,则将会忽略。 + 如果您使用 IMLibCore,请使用此字段设置当前登录用户的用户信息; + 如果您使用 IMKit,请使用 RCIM 中的 currentUserInfo 设置当前登录用户的用户信息,而不要使用此字段。 + + @remarks 数据获取 + + * \~english + User information of the currently logged in user. + + @ discussion is used to set the user information of the current user after a connection is established with the RongCloud server. + + @ warning It will be ignored if the user ID in the passed user information does not match the current login user ID. + If you use IMLibCore, this field is used to set the user information for the currently logged in user. + If you use IMKit, use currentUserInfo in RCIM to set the user information for the current login user instead of using this field. + + @ remarks data acquisition + */ +@property (nonatomic, strong) RCUserInfo *currentUserInfo; + +#pragma mark - Message Receive & Send + +/*! + * \~chinese + 注册自定义的消息类型 + + @param messageClass 自定义消息的类,该自定义消息需要继承于 RCMessageContent + + @discussion + 如果您需要自定义消息,必须调用此方法注册该自定义消息的消息类型,否则 SDK 将无法识别和解析该类型消息。 + @discussion 请在初始化 appkey 之后,token 连接之前调用该方法注册自定义消息 + + @warning 如果您使用 IMLibCore,请使用此方法注册自定义的消息类型; + 如果您使用 IMKit,请使用 RCIM 中的同名方法注册自定义的消息类型,而不要使用此方法。 + + @remarks 消息操作 + + * \~english + Register a custom message type + + @param messageClass Class of a custom message that needs to be inherited from RCMessageContent + + @ discussion + If you need a custom message, you must call this method to register the type of the custom message, otherwise SDK will not be able to recognize and parse that type of message. + @ discussion Please call this method to register custom messages after appkey initialization and before token connection. + + @ warning If you use IMLibCore, please use this method to register custom message types; + If you use IMKit, please use the method of the same name in RCIM to register the custom message type instead of using this method. + + @ remarks message operation + */ +- (void)registerMessageType:(Class)messageClass; + +#pragma mark Message Send + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId:消息的ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent ,用于显示;二是 pushData ,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil ,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for failed message sending [nErrorCode: Error code for sending failure. + MessageId: message ID] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom message, you shall set pushContent and pushData to define the push content yourself, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it by using this method. + + If you use this method to send a file message, you should upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it by using this method. + + @ warning If you use IMLibCore, you can use this method to send messages; + If you use IMKit, please use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId: 消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message. + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param option Related configuration of messages. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for message sending failure [nErrorCode: Error code for sending failure, + messageId: ID of the message] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it using this method. + + If you use this method to send a file message, you shall upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it using this method. + + @ warning you can use this method to send messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送媒体消息(图片消息或文件消息) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的 ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您需要上传图片到自己的服务器,需要构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送媒体消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送媒体消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send media messages (image messages or file messages) + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation in which the message is sent + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID] + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock callback for failed message sending [errorCode: error code for sending failure. messageId: message ID] + @param cancelBlock Callback for the user canceling message sending [messageId: message ID] + @ return message entity sent . + + @ discussion A remote push can be received when the receiver is offline and allows remote push. + The remote push consists of two parts, one is pushContent for display and the other is pushData for carrying data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format will be used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you need to upload images to your own server, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful uploading, and then use the RCCoreClient's + sendMessage:targetId:content:pushContent:pushData:success:error: method or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload files to your own server, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method. + or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ warning If you use IMLibCore, you can use this method to send meida messages; + If you use IMKit, please use the method of the same name in RCIM to send a media message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 发送媒体消息(上传图片或文件等媒体信息到指定的服务器) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param uploadPrepareBlock 媒体文件上传进度更新的 IMKit 监听 + [uploadListener:当前的发送进度监听,SDK 通过此监听更新 IMKit UI] + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 此方法仅用于 IMKit。 + 如果您需要上传图片到自己的服务器并使用 IMLibCore,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器并使用 IMLibCore,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @remarks 消息操作 + + * \~english + Send media messages (upload media information such as images or files to the specified server) + + @param conversationType Type of conversation in which the message is sent. + @param targetId ID of conversation in which the message is sent + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param uploadPrepareBlock IMKit listening of media file uploading progress updates. + [uploadListener: current sending progress listening, which is used by SDK to update IMKit UI] + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID]. + @param successBlock Callback for successful message sending [ messageId: message ID]. + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure + messageId: message ID]. + @param cancelBlock Callback for the user canceling message sending [messageId: message ID]. + @ return message entity sent. + + @ discussion This method is for IMKit only. + If you need to upload pictures to your own server and use IMLibCore, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload a file to your own server and use IMLibCore, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + uploadPrepare:(void (^)(RCUploadMediaStatusListener *uploadListener))uploadPrepareBlock + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 发送消息 + + @param message 将要发送的消息实体(需要保证 message 中的 conversationType,targetId,messageContent 是有效值) + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [successMessage: 消息实体] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, errorMessage:消息实体] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent ,用于显示;二是 pushData ,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil ,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message. + + @param message The message entity to be sent (you shall ensure that the conversationType, targetId and messageContent in message are valid values) + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [successMessage: Message entity]. + @param errorBlock Callback for failed message sending [nErrorCode: Error code for send failure, errorMessage: message entity]. + @ return sent message entity. + + @ discussion Receive a remote push when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it using this method. + + If you use this method to send a file message, you shall upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it using this method. + + @ warning you can use this method to send messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +/*! + * \~chinese + 发送媒体消息(图片消息或文件消息) + + @param message 将要发送的消息实体(需要保证 message 中的 conversationType,targetId,messageContent 是有效值) + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 <= progress <= 100, progressMessage:消息实体] + @param successBlock 消息发送成功的回调 [successMessage:消息实体] + @param errorBlock 消息发送失败的回调 [nErrorCode:发送失败的错误码, errorMessage:消息实体] + @param cancelBlock 用户取消了消息发送的回调 [cancelMessage:消息实体] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您需要上传图片到自己的服务器,需要构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送媒体消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送媒体消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send media messages (images messages or file messages) + + @param message Message entity to be sent (you shall ensure that the conversationType, targetId and messageContent in message are valid values) + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline + @param progressBlock Callback for message sending progress update [current sending progress of progress:, 0 < = progress < = 100, progressMessage: message entity] + @param successBlock Callback for successful message sending [successMessage: message entity] + @param errorBlock Callback for failed message sending [nErrorCode: error code for sending failure, errorMessage: message entity] + @param cancelBlock User canceled callback for message sending [cancelMessage: message entity]. + @ return message entity sent + + @ discussion A remote push can be received when the receiver is offline and allows remote push. + The remote push consists of two parts, one is pushContent for display and the other is pushData for carrying data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format will be used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you shall upload images to your own server, you shall build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful uploading, and then use the RCCoreClient's + SendMessage:targetId:content:pushContent:pushData:success:error: method or the sendMessage:targetId:content:pushContent:success:error: method, and do not use this method. + + If you shall upload files to your own server, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method. + Or the sendMessage:targetId:content:pushContent:success:error: method, and do not use this method. + + @ warning you can use this method to send media messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send media messages, otherwise UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progress:(void (^)(int progress, RCMessage *progressMessage))progressBlock + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock + cancel:(void (^)(RCMessage *cancelMessage))cancelBlock; + + + +/*! + * \~chinese + 取消发送中的媒体信息 + + @param messageId 媒体消息的 messageId + + @return YES 表示取消成功,NO 表示取消失败,即已经发送成功或者消息不存在。 + + @remarks 消息操作 + + * \~english + Cancel media messages in transmission + + MessageId of media messages. + + @ return YES: canceled successfully, NO: failed to cancel, that is, the message has been sent successfully or the message does not exist. + + @ remarks message operation + */ +- (BOOL)cancelSendMediaMessage:(long)messageId; + +/*! + * \~chinese + 插入向外发送的消息(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param sentStatus 发送状态 + @param content 消息的内容 + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + + * \~english + Insert an outgoing message (the message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID + @param sentStatus Sending status. + @param content Content of the message. + @ return message entity inserted . + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertOutgoingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content; + +/*! + * \~chinese + 插入向外发送的、指定时间的消息(此方法如果 sentTime 有问题会影响消息排序,慎用!!) +(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param sentStatus 发送状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒(传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。如果 sentTime<=0,则被忽略,会以插入时的时间为准。 + + @remarks 消息操作 + + * \~english + Insert a message sent outward at a specified time (this method will affect message sorting if there is a problem with sentTime and shall be used with caution!!) + (The message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID. + @param sentStatus Sending status. + @param content Content of the message. + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. If sentTime < = 0, it will be ignored and the time at which it is inserted shall prevail. + + @ remarks message operation + */ +- (RCMessage *)insertOutgoingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + +/*! + * \~chinese + 插入接收的消息(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param senderUserId 发送者 ID + @param receivedStatus 接收状态 + @param content 消息的内容 + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + + * \~english + Insert the received message (the message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID + @param senderUserId Sender ID + @param receivedStatus Receiving status + @param content Content of the message + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertIncomingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + senderUserId:(NSString *)senderUserId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content; + + +/*! + * \~chinese + 插入接收的消息(此方法如果 sentTime + 有问题会影响消息排序,慎用!!)(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param senderUserId 发送者 ID + @param receivedStatus 接收状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒 (传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + + * \~english + Insert the received message (this method will affect message sorting if there is a problem with sentTime and shall be used with caution!!) (The message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID. + @param senderUserId Sender ID. + @param receivedStatus Receiving status + @param content Content of the message. + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertIncomingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + senderUserId:(NSString *)senderUserId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + + +/*! + * \~chinese + 批量插入接收的消息(该消息只插入本地数据库,实际不会发送给服务器和对方) + RCMessage 下列属性会被入库,其余属性会被抛弃 + conversationType 会话类型 + targetId 会话 ID + messageDirection 消息方向 + senderUserId 发送者 ID + receivedStatus 接收状态;消息方向为接收方,并且 receivedStatus 为 ReceivedStatus_UNREAD 时,该条消息未读 + sentStatus 发送状态 + content 消息的内容 + sentTime 消息发送的 Unix 时间戳,单位为毫秒 ,会影响消息排序 + extra RCMessage 的额外字段 + + @discussion 此方法不支持聊天室的会话类型。每批最多处理 500 条消息,超过 500 条返回 NO + @discussion 消息的未读会累加到回话的未读数上 + + @remarks 消息操作 + + * \~english + Insert received messages (the messages are only inserted into the local database and will not actually be sent to the server and the other party) in batches + RCMessage The following properties will be stored into the database, and the residual properties will be discarded + conversationType Conversation type + targetId Conversation ID + messageDirection Message direction + senderUserId Sender ID + receivedStatus receiving status; When the message is directed to the receiver and receivedStatus is ReceivedStatus_UNREAD, the message is not read + sentStatus Sending status + content Content of message. + sentTime Unix timestamp for sending a message with the unit as milliseconds, which will affect message sorting + extra Additional fields for RCMessage + + @ discussion This method does not support the chatroom conversation type. A maximum of 500 messages are processed for each batch, and NO is returned for more than 500 messages. + @ discussion The unread messages will accumulate to the number of unread replies. + @ remarks message operation + */ +- (BOOL)batchInsertMessage:(NSArray *)msgs; + +/*! + * \~chinese + 根据文件 URL 地址下载文件内容 + + @param fileName 指定的文件名称 需要开发者指定文件后缀 (例如 rongCloud.mov) + @param mediaUrl 文件的 URL 地址 + @param progressBlock 文件下载进度更新的回调 [progress:当前的下载进度, 0 <= progress <= 100] + @param successBlock 下载成功的回调[mediaPath:下载成功后本地存放的文件路径 文件路径为文件消息的默认地址] + @param errorBlock 下载失败的回调[errorCode:下载失败的错误码] + @param cancelBlock 用户取消了下载的回调 + + @discussion 用来获取媒体原文件时调用。如果本地缓存中包含此文件,则从本地缓存中直接获取,否则将从服务器端下载。 + + @remarks 多媒体下载 + + * \~english + Download the contents of the file according to the URL address of the file. + + @param fileName The specified file name requires the developer to specify a file suffix (for example, rongCloud.mov) + @param mediaUrl URL address of the file. + @param progressBlock Callback for file download progress update [progress: current download progress, 0 < = progress < = 100] + @param successBlock Callback after a successful download [mediaPath: the file path stored locally after a successful download is the default address of the file message] + @param errorBlock Callback for download failure [errorCode: error code for download failure] + @param cancelBlock Callback for download canceled by user. + + @ discussion Call when get the media source file. If this file is included in the local cache, it is obtained directly from the local cache, otherwise it will be downloaded from the server side. + + @ remarks multimedia downloading +*/ +- (void)downloadMediaFile:(NSString *)fileName + mediaUrl:(NSString *)mediaUrl + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 下载消息内容中的媒体信息 + + @param conversationType 消息的会话类型 + @param targetId 消息的会话 ID + @param mediaType 消息内容中的多媒体文件类型,目前仅支持图片 + @param mediaUrl 多媒体文件的网络 URL + @param progressBlock 消息下载进度更新的回调 [progress:当前的下载进度, 0 + <= progress <= 100] + @param successBlock 下载成功的回调 + [mediaPath:下载成功后本地存放的文件路径] + @param errorBlock 下载失败的回调[errorCode:下载失败的错误码] + @param cancelBlock 用户取消了下载的回调 + + @discussion 用来获取媒体原文件时调用。如果本地缓存中包含此文件,则从本地缓存中直接获取,否则将从服务器端下载。 + @remarks 多媒体下载 + + * \~english + Download the media information in the message content. + + @param conversationType Conversation type of the message. + @param targetId Conversation ID of the message. + @param mediaType Type of the multimedia file in the message content. Currently, only images are supported. + @param mediaUrl Network URL of multimedia file. + @param progressBlock callback for message download progress update [progress: current download progress:, 0< = progress < = 100] + @param successBlock Callback for successful download + [mediaPath: path of files stored locally after successful download]. + @param errorBlock Callback for download failure [errorCode: error code for download failure] + @param cancelBlock Callback for download canceled by user + + @ discussion Call when get the media source file. If this file is included in the local cache, it is obtained directly from the local cache, otherwise it will be downloaded from the server side. + @ remarks multimedia downloading + */ +- (void)downloadMediaFile:(RCConversationType)conversationType + targetId:(NSString *)targetId + mediaType:(RCMediaType)mediaType + mediaUrl:(NSString *)mediaUrl + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 下载消息内容中的媒体信息 + + @param messageId 媒体消息的 messageId + @param progressBlock 消息下载进度更新的回调 [progress:当前的下载进度, 0 <= progress <= 100] + @param successBlock 下载成功的回调[mediaPath:下载成功后本地存放的文件路径] + @param errorBlock 下载失败的回调[errorCode:下载失败的错误码] + @param cancelBlock 用户取消了下载的回调 + + @discussion 用来获取媒体原文件时调用。如果本地缓存中包含此文件,则从本地缓存中直接获取,否则将从服务器端下载。 + + @remarks 多媒体下载 + + * \~english + Download the media information in the message content. + + @param messageId MessageId of media messages + @param progressBlock callback for message download progress update [progress: current download progress, 0 < = progress < = 100] + @param successBlock Callback for successful download [mediaPath: path of files stored locally after successful download]. + @param errorBlock callback for download failure [errorCode: error code for download failure ] + @param cancelBlock Callback for download canceled by user. + + @ discussion Call when get the media source file. If this file is included in the local cache, it is obtained directly from the local cache, otherwise it will be downloaded from the server side. + + @ remarks multimedia downloading + */ +- (void)downloadMediaMessage:(long)messageId + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 取消下载中的媒体信息 + + @param messageId 媒体消息的messageId + + @return YES 表示取消成功,NO表示取消失败,即已经下载完成或者消息不存在。 + + @remarks 多媒体下载 + + * \~english + Cancel the media information in downloading + + @param messageId MessageId of media messages + + @ return YES: canceled successfully, NO: failed to cancel, that is, the message has been sent successfully or the message does not exist. + + @ remarks multimedia downloading + */ +- (BOOL)cancelDownloadMediaMessage:(long)messageId; + +/*! + * \~chinese + 取消下载中的媒体信息 + + @param mediaUrl 媒体消息 Url + + @return YES 表示取消成功,NO 表示取消失败,即已经下载完成或者消息不存在。 + + @remarks 多媒体下载 + + * \~english + Cancel the media information in downloading + + @param mediaUrl Url of media message + + @ return YES: canceled successfully, NO: failed to cancel, that is, the message has been downloaded successfully or the message does not exist. + + @ remarks multimedia downloading +*/ +- (BOOL)cancelDownloadMediaUrl:(NSString *)mediaUrl; + +/*! + * \~chinese + 发送定向消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param userIdList 接收消息的用户 ID 列表 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + 如果您使用 IMLibCore,可以使用此方法发送定向消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送定向消息,否则不会自动更新 UI。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param conversationType Type of conversation in which the message is sent + @param targetId Conversation ID that sends the message + @param userIdList List of user ID receiving messages + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure, + messageId: message ID] + + @ return Message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + If you use IMLibCore, you can use this method to send directed messages. + If you use IMKit, please use the method of the same name in RCIM to send a directed message, otherwise the UI will not be updated automatically. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + toUserIdList:(NSArray *)userIdList + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送定向消息 + + @param message 消息实体 + @param userIdList 接收消息的用户 ID 列表 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [successMessage:发送成功的消息] + @param errorBlock 消息发送失败的回调 [nErrorCode:发送失败的错误码,errorMessage:发送失败的消息] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param message Message entity + @param userIdList List of user ID receiving messages. + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [successMessage: message sent successfully]. + @param errorBlock callback for failed message sending [nErrorCode: error code for sending failure, errorMessage: message failed in sending] + + @ return message entity sent + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCMessage *)message + toUserIdList:(NSArray *)userIdList + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +/*! + * \~chinese + 发送定向消息 + + @param message 消息实体 + @param userIdList 接收消息的用户 ID 列表 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [successMessage:发送成功的消息] + @param errorBlock 消息发送失败的回调 [nErrorCode:发送失败的错误码,errorMessage:发送失败的消息] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages + + @param message Message entity + @param userIdList List of user ID receiving messages + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param option Related configuration of messages. + @param successBlock Callback for successful message sending [successMessage: message sent successfully] + @param errorBlock callback for failed message sending [nErrorCode: error code for sending failure, errorMessage: message failed in sending]. + + @ return message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCMessage *)message + toUserIdList:(NSArray *)userIdList + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +#pragma mark RCIMClientReceiveMessageDelegate +/*! + * \~chinese + 设置 IMLibCore 的消息接收监听器 + + @param delegate IMLibCore 消息接收监听器 + @param userData 用户自定义的监听器 Key 值,可以为 nil + + @discussion + 设置 IMLibCore 的消息接收监听器请参考 RCCoreClient 的 setReceiveMessageDelegate:object:方法。 + + userData 为您自定义的任意数据,SDK 会在回调的 onReceived:left:object:方法中传入作为 object 参数。 + 您如果有设置多个监听,会只有最终的一个监听器起作用,您可以通过该 userData 值区分您设置的监听器。如果不需要直接设置为 + nil 就可以。 + + @warning 如果您使用 IMLibCore,可以设置并实现此 Delegate 监听消息接收; + 如果您使用 IMKit,请使用 RCIM 中的 receiveMessageDelegate 监听消息接收,而不要使用此方法,否则会导致 IMKit + 中无法自动更新 UI! + + @remarks 功能设置 + + * \~english + Set the message receiving listener for IMLibCore + + @param delegate IMLibCore message receiving listener + @param userData Key value of user-defined listener, which can be nil + + @ discussion + For how to set the message receiving listener for IMLibCore, please refer to the setReceiveMessageDelegate:object: method of RCCoreClient. + + UserData is any data you customized, and SDK will be passed as an object parameter in the onReceived:left:object: method of the callback. + If you set multiple listeners, only the final listener will work. You can distinguish the listeners you set by this userData value. If it is not required, it is directly set as Nil. + + @ warning If you use IMLibCore, you can set and enable this Delegate to listen to message receiving; + If you use IMKit, please use receiveMessageDelegate in RCIM to listen to message receiving instead of using this method, otherwise it will cause that the UI cannot be automatically updated in IMKit! + + @ remarks function setting + */ +- (void)setReceiveMessageDelegate:(id)delegate object:(id)userData; + +#pragma mark - RCMessageInterceptor +/*! + * \~chinese + 设置消息拦截器 + + @discussion 可以设置并实现此拦截器来进行消息的拦截处理 + + @remarks 功能设置 + + * \~english + Set message interceptor + + @ discussion it can set and enable this interceptor to intercept messages + + @ remarks function setting + */ +@property (nonatomic, weak) id messageInterceptor; + +#pragma mark - Message Read Receipt + +/*! + * \~chinese + 发送某个会话中消息阅读的回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param timestamp 该会话中已阅读的最后一条消息的发送时间戳 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 此接口只支持单聊, 如果使用 IMLibCore 可以注册监听 + RCLibDispatchReadReceiptNotification 通知,使用 IMKit 直接设置RCIM.h + 中的 enabledReadReceiptConversationTypeList。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send a message reading receipt in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param timestamp The sending timestamp of the last message read by the conversation. + @param successBlock Callback for successful sending + @param errorBlock Callback for sending failure [nErrorCode: error code for failure] + + @ discussion This interface only supports single chat. If you use IMLibCore, you can register to listen to + RCLibDispatchReadReceiptNotification notification, and use IMKit to set directly + enabledReadReceiptConversationTypeList in RCIM.h. + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendReadReceiptMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 请求消息阅读回执 + + @param message 要求阅读回执的消息 + @param successBlock 请求成功的回调 + @param errorBlock 请求失败的回调[nErrorCode: 失败的错误码] + + @discussion 通过此接口,可以要求阅读了这条消息的用户发送阅读回执。 + + @remarks 高级功能 + + * \~english + Request message reading receipt + + @param message Request to read the message of the receipt + @param successBlock Callback for successful request + @param errorBlock Callback for failed request [nErrorCode: Error code for failure] + + @ discussion With this interface, the user who has read this message can be asked to send a reading receipt. + + @ remarks advanced functions + */ +- (void)sendReadReceiptRequest:(RCMessage *)message + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 发送阅读回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param messageList 已经阅读了的消息列表 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 当用户阅读了需要阅读回执的消息,可以通过此接口发送阅读回执,消息的发送方即可直接知道那些人已经阅读。 + + @remarks 高级功能 + + * \~english + Send a reading receipt + + @param conversationType Conversation type + @param targetId Conversation ID + @param messageList List of messages that have been read + @param successBlock Callback for successful sending + @param errorBlock Callback for failed sending [nErrorCode: Error code of failure] + + @ discussion When a user reads a message that needs to be read, a reading receipt cane be sent through this interface, and the sender of the message can directly know who has read the message. + + @ remarks advanced functions + */ +- (void)sendReadReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + messageList:(NSArray *)messageList + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 同步会话阅读状态(把指定会话里所有发送时间早于 timestamp 的消息置为已读) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param timestamp 已经阅读的最后一条消息的 Unix 时间戳(毫秒) + @param successBlock 同步成功的回调 + @param errorBlock 同步失败的回调[nErrorCode: 失败的错误码] + + @remarks 高级功能 + + * \~english + Synchronize conversation reading status (set all messages sent before timestamp in a specified conversation to be read) + + @param conversationType Conversation type + @param targetId Conversation ID + @param timestamp Unix timestamp of the last message read (in milliseconds) + @param successBlock Callback for successful synchronization + @param errorBlock Callback for failed synchronization [nErrorCode: Error code for failure]. + + @ remarks advanced functions + */ +- (void)syncConversationReadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +#pragma mark - Message Recall + +/*! + * \~chinese + 撤回消息 + + @param message 需要撤回的消息 + @param pushContent 当下发 push 消息时,在通知栏里会显示这个字段,不设置将使用融云默认推送内容 + @param successBlock 撤回成功的回调 [messageId:撤回的消息 ID,该消息已经变更为新的消息] + @param errorBlock 撤回失败的回调 [errorCode:撤回失败错误码] + + @warning 仅支持单聊、群组和讨论组。 + + @remarks 高级功能 + + * \~english + Recall the message + + @param message Messages to be recalled + @param pushContent When a push message is distributed, this field will be displayed in the notification bar. If it is not set, the default content will be pushed by RongCloud. + @param successBlock Callback for successful recall [messageId: ID of message recalled, the message has been changed to a new message]. + @param errorBlock Callback for failed recall [errorCode: error code for recall failure] + + @ warning Only single chat, groups and discussion groups are supported. + + @ remarks advanced functions + */ +- (void)recallMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorcode))errorBlock; + +/*! + * \~chinese + 撤回消息 + + @param message 需要撤回的消息 + @param successBlock 撤回成功的回调 [messageId:撤回的消息 ID,该消息已经变更为新的消息] + @param errorBlock 撤回失败的回调 [errorCode:撤回失败错误码] + @remarks 高级功能 + + * \~english + Recall the message + + @param message Messages to be recalled + @param successBlock Callback for successful recall [messageId: ID of message recalled, the message has been changed to a new message] + @param errorBlock Callback for failed ecall [errorCode: error code for recall failure] + @ remarks advanced function + */ +- (void)recallMessage:(RCMessage *)message + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorcode))errorBlock; + +#pragma mark - Message Operation + +/*! + * \~chinese + 获取某个会话中指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get the specified number of latest message entities in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param count Number of messages to be obtained + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getLatestMessages:(RCConversationType)conversationType targetId:(NSString *)targetId count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + 如: + oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param oldestMessageId ID of due message. + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + E.g. + If the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的、指定消息类型的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量和消息类型的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应的那条消息,如果会话中的消息数量小于参数 count + 的值,会将该会话中的所有消息返回。 + 如:oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number and specified message types before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil + @param oldestMessageId ID of due message + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + For example, if the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + objectName:(NSString *)objectName + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定消息、指定数量、指定消息类型、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param baseMessageId 当前的消息 ID + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,baseMessageId + 之前或之后的、指定数量、消息类型和查询方向的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 baseMessageId 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with specified messages, specified number and specified message type in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil. + @param baseMessageId Current message ID. + @param isForward Query direction: true indicates forward and false indicates backward. + @param count Number of messages to be obtained + @ return object list of message entity RCMessage + + @ discussion + This method gets the latest message entities before or after baseMessageId with the specified number, message type, and query direction, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to baseMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + objectName:(NSString *)objectName + baseMessageId:(long)baseMessageId + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定时间、指定数量、指定消息类型(多个)、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param objectNames 消息内容的类型名称列表 + @param sentTime 当前的消息时间戳 + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,sentTime + 之前或之后的、指定数量、指定消息类型(多个)的消息实体列表,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 sentTime 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with a specified time, a specified number and a specified message type (multiple) in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param objectNames List of type names for message content + @param sentTime Current message timestamp + @param isForward Query direction: true indicates forward and false indicates backward + @param count Number of messages to be obtained. + @ return object list of message entity RCMessage + + @ discussion + This method gets a list of message entities before and after the sentTime with a specified number and a specified message type (multiple) in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to sentTime. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + objectNames:(NSArray *)objectNames + sentTime:(long long)sentTime + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 在会话中搜索指定消息的前 beforeCount 数量和后 afterCount + 数量的消息。返回的消息列表中会包含指定的消息。消息列表时间顺序从新到旧。 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param sentTime 消息的发送时间 + @param beforeCount 指定消息的前部分消息数量 + @param afterCount 指定消息的后部分消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 获取该会话的这条消息及这条消息前 beforeCount 条和后 afterCount 条消息,如前后消息不够则返回实际数量的消息。 + + @remarks 消息操作 + + * \~english + Searches the the number of beforeCount and afterCount messages for the specified message in the conversation. The list of returned messages contains the specified message. The message in the list are in chronological order from earliest to most recent. + + @param conversationType Conversation type + @param targetId Conversation ID + @param sentTime Time when the message is sent + @param beforeCount Specify the number of messages in the first part of the message. + @param afterCount Specify the number of messages in the latter part of the message. + @ return object list of message entity RCMessage + + @ discussion + Get this message, beforeCount messages ahead of this message and afterCount messages after this message in the conversation. If there are not enough messages before and after the message, the actual number of messages will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + sentTime:(long long)sentTime + beforeCount:(int)beforeCount + afterCount:(int)afterCount; + +/*! + * \~chinese + 从服务器端清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [status:清除失败的错误码] + + @discussion + 此方法从服务器端清除历史消息,但是必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 清除成功后只能获取该时间戳之后的历史消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation, 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param successBlock Callback for successful acquisition + @param errorBlock Callback for failed acquisition [status: error code for clearing failure ] + + @ discussion + This method clears historical messages from the server, bu the historical message cloud storage function must be activated first. + For example, if you don't want to get more history messages from the server, you can only get the history messages after the timestamp after the recordTime has been cleared successfully. + + @ remarks message operation + */ +- (void)clearRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + recordTime:(long long)recordTime + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param clearRemote 是否同时删除服务端消息 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [ status:清除失败的错误码] + + @discussion + 此方法可以清除服务器端历史消息和本地消息,如果清除服务器端消息必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 并设置 clearRemote 为 YES + 清除消息,成功后只能获取该时间戳之后的历史消息。如果 clearRemote 传 NO, + 只会清除本地消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages. + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation. 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param clearRemote Whether to delete server messages at the same time. + @param successBlock Callback for successful acquisition. + @param errorBlock Callback for failed acquisition [status: error code for clearing failure]. + + @ discussion + This method can clear server-side historical messages and local messages. If you clear messages on the server, you must first activate the historical message cloud storage functions. + For example, if you don't want to get more historical messages from the server, you can specify the recordTime and set clearRemote to YES to clear the messages, and then you can only get the historical message after the timestamp. If clearRemote passes NO, only local messages are cleared. + + @ remarks message operation + */ +- (void)clearHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + recordTime:(long long)recordTime + clearRemote:(BOOL)clearRemote + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param recordTime 截止的消息发送时间戳,毫秒 + @param count 需要获取的消息数量, 0 < count <= 20 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有10条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @discussion 本地数据库可以查到的消息,该接口不会再返回,所以建议先用 getHistoryMessages + 相关接口取本地历史消息,本地消息取完之后再通过该接口获取远端历史消息 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server. + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Due message sending timestamp, in milliseconds. + @param count Number of messages to be obtained, 0 < count < = 20. + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES indicates that there is still any remaining messages; NO indicates that there is no remaining messages] + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure] + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ discussion Messages that can be found in the local database will not be returned by this interface, so it is recommended to first take the local historical messages by using the related interfaces of the getHistoryMessages. + After the local message is taken, the remote historical messages are obtained through this interface + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + recordTime:(long long)recordTime + count:(int)count + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param option 可配置的参数 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有 10 条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param option Configurable parameters + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES: + Indicates that there is still any remaining messages; NO: indicates that there is no remaining messages]. + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure]. + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + option:(RCRemoteHistoryMsgOption *)option + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param option 可配置的参数 + @param complete 获取成功的回调 [messages:获取到的历史消息数组; code : 获取是否成功,0表示成功,非 0 表示失败,此时 messages 数组可能存在断档] + + @discussion 必须开通历史消息云存储功能。 + @discussion count 传入 1~20 之间的数值。 + @discussion 此方法先从本地获取历史消息,本地有缺失的情况下会从服务端同步缺失的部分。 + @discussion 从服务端同步失败的时候会返回非 0 的 errorCode,同时把本地能取到的消息回调上去。 + + @remarks 消息操作 + + * \~english + Get historical messages + + @param conversationType Conversation type + @param targetId Conversation ID + @param option Configurable parameters + @param complete Callback for successful acquisition [messages: array of obtained historical messages; Code: succeeded or not; 0: successful; non-0: failed. In this case, there may be a message break in the messages array] + + @ discussion The historical message cloud storage function must be activated. + @ discussion The count passes a value between 1 and 20. + @ discussion This method first obtains historical messages locally, and synchronizes the missing parts from the server if it is missing locally; + @ discussion If synchronization fails on the server, a non-0 errorCode will be returned, and the messages that can be accessed locally will be called back. + + @ remarks message operation + */ +- (void)getMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + option:(RCHistoryMessageOption *)option + complete:(void (^)(NSArray *messages, RCErrorCode code))complete; + +/*! + * \~chinese + 获取会话中@提醒自己的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + + @discussion + 此方法从本地获取被@提醒的消息(最多返回 10 条信息) + @warning 使用 IMKit 注意在进入会话页面前调用,否则在进入会话清除未读数的接口 clearMessagesUnreadStatus: targetId: + 以及 设置消息接收状态接口 setMessageReceivedStatus:receivedStatus:会同步清除被提示信息状态。 + + @remarks 高级功能 + + * \~english + Get the @ reminder messages in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID. + + @ discussion + This method gets the @ reminder messages locally (a maximum of 10 messages are returned). + @ warning When the IMKit is used, note that it is called before the conversation page is entered, otherwise the unread interface clearMessagesUnreadStatus: is cleared when the conversation is entered. targetId: + When the message receiving status interface setMessageReceivedStatus:receivedStatus: is set, it will synchronously clear the prompted information status. + + @ remarks advanced functions + */ +- (NSArray *)getUnreadMentionedMessages:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 获取消息的发送时间(Unix 时间戳、毫秒) + + @param messageId 消息 ID + @return 消息的发送时间(Unix 时间戳、毫秒) + + @remarks 消息操作 + + * \~english + Get the sending time of message(Unix timestamp, in milliseconds). + + @param messageId Message ID + @ return sending time of message (Unix timestamp, in milliseconds). + + @ remarks message operation + */ +- (long long)getMessageSendTime:(long)messageId; + +/*! + * \~chinese + 通过 messageId 获取消息实体 + + @param messageId 消息 ID(数据库索引唯一值) + @return 通过消息 ID 获取到的消息实体,当获取失败的时候,会返回 nil。 + + @remarks 消息操作 + + * \~english + Get the message entity through messageId + + @param messageId Message ID (unique value of database index) + @ return For message entity obtained through the message ID, when it fails to fetch, nil is returned. + + @ remarks message operation + */ +- (RCMessage *)getMessage:(long)messageId; + +/*! + * \~chinese + 通过全局唯一 ID 获取消息实体 + + @param messageUId 全局唯一 ID(服务器消息唯一 ID) + @return 通过全局唯一ID获取到的消息实体,当获取失败的时候,会返回 nil。 + + @remarks 消息操作 + + * \~english + Get message entities through globally unique ID. + + @param messageUId Globally unique ID (unique ID of server message) + @ return For the message entity obtained through the globally unique ID, when it fails to fetch, nil is returned. + + @ remarks message operation + */ +- (RCMessage *)getMessageByUId:(NSString *)messageUId; + +/** + * \~chinese + * 获取会话里第一条未读消息。 + * + * @param conversationType 会话类型 + * @param targetId 会话 ID + * @return 第一条未读消息的实体。 + * @remarks 消息操作 + * + * \~english + * Get the first unread message in the conversation. + * + * @param conversationType Conversation type + * @param targetId Conversation ID + * @ return Entity of the first unread message. + * @ remarks Message operation + */ +- (RCMessage *)getFirstUnreadMessage:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 删除消息 + + @param messageIds 消息 ID 的列表,元素需要为 NSNumber 类型 + @return 是否删除成功 + + @remarks 消息操作 + + * \~english + Delete message + + @param messageIds List of message ID, the element shall be the type of NSNumber + @ return Whether it is deleted successfully + + @ remarks Message operation + */ +- (BOOL)deleteMessages:(NSArray *)messageIds; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法删除数据库中该会话的消息记录,同时会整理压缩数据库,减少占用空间 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes the message record of the conversation in the database. At the same time, the compressed database is sorted to reduce the footprint. + + @ remarks Message operation + */ +- (void)deleteMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 批量删除某个会话中的指定远端消息(同时删除对应的本地消息) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 目标会话ID + @param messages 将被删除的消息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法会同时删除远端和本地消息。 + 一次批量操作仅支持删除属于同一个会话的消息,请确保消息列表中的所有消息来自同一会话 + 一次最多删除 100 条消息。 + + @remarks 消息操作 + + * \~english + Delete specified remote messages in a conversation in batches (while deleting corresponding local messages) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Target conversation ID + @param messages List of messages to be deleted + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes both remote and local messages. + One batch operation only supports to delete messages belonging to the same conversation, please make sure that all messages in the message list come from the same conversation and delete at most 100 messages at a time. + + @ remarks message operation + */ +- (void)deleteRemoteMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + messages:(NSArray *)messages + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 是否删除成功 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @ return Whether it is deleted successfully. + + @ remarks Message operation + */ +- (BOOL)clearMessages:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 设置消息的附加信息 + + @param messageId 消息 ID + @param value 附加信息,最大 1024 字节 + @return 是否设置成功 + + @discussion 用于扩展消息的使用场景。只能用于本地使用,无法同步到远端。 + + @remarks 消息操作 + + * \~english + Set additional information for messages + + @param messageId Conversation ID + @param value Additional information, up to 1024 bytes + @ return Whether it is set successfully + + @ discussion It is used to extend the usage scenario of messages. It can only be used locally and cannot be synchronized to the remote end. + + @ remarks message operation + */ +- (BOOL)setMessageExtra:(long)messageId value:(NSString *)value; + +/*! + * \~chinese + 设置消息的接收状态 + + @param messageId 消息 ID + @param receivedStatus 消息的接收状态 + @return 是否设置成功 + + @discussion 用于 UI 展示消息为已读,已下载等状态。 + + @remarks 消息操作 + + * \~english + Set the receiving status of the message + + @param messageId Message ID + @param receivedStatus Receiving status of the message + @return Whether it is set successfully + + @ discussion It is used for UI to show statuses such as read message, downloaded and so on. + + @ remarks message operation + */ +- (BOOL)setMessageReceivedStatus:(long)messageId receivedStatus:(RCReceivedStatus)receivedStatus; + +/*! + * \~chinese + 设置消息的发送状态 + + @param messageId 消息 ID + @param sentStatus 消息的发送状态 + @return 是否设置成功 + + @discussion 用于 UI 展示消息为正在发送,对方已接收等状态。 + + @remarks 消息操作 + + * \~english + Set the sending status of the message + + @param messageId Message ID. + @param sentStatus The sending status of the message. + @ return Whether it is set successfully. + + @ discussion It is used for UI to show message status such as in sending, received by other party and so on. + + @ remarks message operation + */ +- (BOOL)setMessageSentStatus:(long)messageId sentStatus:(RCSentStatus)sentStatus; + +/** + * \~chinese + 开始焚烧消息(目前仅支持单聊) + + @param message 消息类 + @discussion 仅限接收方调用 + + @remarks 高级功能 + + * \~english + Start to burn messages (Currently only support single chat.) + + @param message Message class + @ discussion Only for receiver calls + + @ remarks Advanced functions + */ +- (void)messageBeginDestruct:(RCMessage *)message; + +/** + * \~chinese + 停止焚烧消息(目前仅支持单聊) + + @param message 消息类 + @discussion 仅限接收方调用 + + @remarks 高级功能 + + * \~english + Stop burnning messages (currently only support single chat). + + @param message Message class + @ discussion Only for receiver calls + + @ remarks Advanced functions + */ +- (void)messageStopDestruct:(RCMessage *)message; + +#pragma mark - Conversation List +/*! + * \~chinese + 获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + @discussion 当您的会话较多且没有清理机制的时候,强烈建议您使用 getConversationList: count: startTime: + 分页拉取会话列表,否则有可能造成内存过大。 + + @remarks 会话列表 + + * \~english + Get conversation list + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray) + @ return List of conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + @ discussion When you have a large number of conversations and do not have a cleaning mechanism, it is strongly recommended that you use getConversationList: count: startTime: + Pull the list of the conversation page by page, otherwise the memory may be too large. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList; + +/*! + * \~chinese + 分页获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param count 获取的数量(当实际取回的会话数量小于 count 值时,表明已取完数据) + @param startTime 会话的时间戳(获取这个时间戳之前的会话列表,0表示从最新开始获取) + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + + @remarks 会话列表 + + * \~english + Get a list of conversations page by page + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param count Number of conversations obtained (when the actual number of conversations retrieved is less than the count value, the data has been fetched). + @param startTime Timestamp of the conversation (get the list of conversation before this timestamp, 0 indicates obtaining from the latest one). + @ return List of the conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList count:(int)count startTime:(long long)startTime; + +/*! + * \~chinese + 获取单个会话数据 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 会话的对象 + + @remarks 会话 + + * \~english + Get single conversation data + + @param conversationType Conversation type + @param targetId Conversation ID + @ return Conversation object + + @ remarks Conversation + */ +- (RCConversation *)getConversation:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 获取会话中的消息数量 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 会话中的消息数量 + + @discussion -1 表示获取消息数量出错。 + + @remarks 会话 + + * \~english + Get the number of messages in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID. + @ return Number of messages in conversation. + + @ discussion - 1 indicates an error in obtaining the number of messages. + + @ remarks Conversation + */ +- (int)getMessageCount:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 删除指定类型的会话 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 是否删除成功 + + @discussion 此方法会从本地存储中删除该会话,同时删除会话中的消息。 + + @remarks 会话 + + * \~english + Delete a conversation of the specified type. + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @ return Whether it is deleted successfully. + + @ discussion This method deletes the conversation from the local storage and deletes the message in the conversation. + + @ remarks Conversation + */ +- (BOOL)clearConversations:(NSArray *)conversationTypeList; + +/*! + * \~chinese + 从本地存储中删除会话 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 是否删除成功 + + @discussion + 此方法会从本地存储中删除该会话,但是不会删除会话中的消息。如果此会话中有新的消息,该会话将重新在会话列表中显示,并显示最近的历史消息。 + + @remarks 会话 + + * \~english + Delete a conversation from the local storage + + @param conversationType Conversation type + @param targetId Conversation ID + @ return Whether it is deleted successfully. + + @ discussion + This method deletes the conversation from the local storage, but does not delete the message in the conversation. If there is a new message in this conversation, the conversation will reappear in the conversation list and the most recent historical message will be displayed. + + @ remarks Conversation + */ +- (BOOL)removeConversation:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 设置会话的置顶状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param isTop 是否置顶 + @return 设置是否成功 + + @discussion 会话不存在时设置置顶,会在会话列表生成会话。 + + @remarks 会话 + + * \~english + Set the top status of the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param isTop Whether or not set top + @ return Whether it is set successfully + + @ discussion If the conversation is set top when the conversation does not exist, the conversation will be generated in the conversation list + @ discussion After the conversation is set top, the conversation will be deleted, and the top setting will automatically expire + + @ remarks Conversation + */ +- (BOOL)setConversationToTop:(RCConversationType)conversationType targetId:(NSString *)targetId isTop:(BOOL)isTop; + +/*! + * \~chinese + 获取置顶的会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 置顶的会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取置顶的会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of top conversations + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @ return List of top conversation RCConversation. + + @ discussion This method reads the top conversation list from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getTopConversationList:(NSArray *)conversationTypeList; + +- (void)setRCConversationDelegate:(id)delegate; + +#pragma mark Draft +/*! + * \~chinese + 获取会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @return 该会话中的草稿 + + @remarks 会话 + + * \~english + Get draft information in the conversations (temporary messages entered by the user but not sent). + + @param conversationType Conversations type + @param targetId Conversation destination ID + @ return drafts in this conversations + + @ remarks Conversations + */ +- (NSString *)getTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 保存草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param content 草稿信息 + @return 是否保存成功 + + @remarks 会话 + + * \~english + Save draft information (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param content Draft information + @ return whether it is saved successfully. + + @ remarks Conversation + */ +- (BOOL)saveTextMessageDraft:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(NSString *)content; + +/*! + * \~chinese + 删除会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @return 是否删除成功 + + @remarks 会话 + + * \~english + Delete draft information in a conversation (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @ return Whether it is deleted successfully + + @ remarks Conversation + */ +- (BOOL)clearTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId; + +#pragma mark Unread Count + +/*! + * \~chinese + 获取所有的未读消息数(聊天室会话除外) + + @return 所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages (except chatroom conversations). + + @ return All unread messages + + @ remarks Conversation + */ +- (int)getTotalUnreadCount; + +/*! + * \~chinese + 获取某个会话内的未读消息数(聊天室会话除外) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @return 该会话内的未读消息数 + + @remarks 会话 + + * \~english + Get the number of unread messages in a conversation (except for chatroom conversations). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @ return Number of unread messages in the conversation + + @ remarks Conversation + */ +- (int)getUnreadCount:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 获取某些会话的总未读消息数 (聊天室会话除外) + + @param conversations 会话列表 ( RCConversation 对象只需要 conversationType 和 targetId,channelId 按需使用) + @return 传入会话列表的未读消息数 + + @remarks 会话 + + * \~english + Get the total number of unread messages for some conversations (except chatroom conversations) + + @param conversations Conversation list (RCConversation object only requires conversationType and targetId, and channelId is used on demand) + @ return Number of unread messages passed into the conversation list + + @ remarks Conversation + */ +- (int)getTotalUnreadCount:(NSArray *)conversations; + +/** + * \~chinese + 获取某些类型的会话中所有的未读消息数 (聊天室会话除外) + + @param conversationTypes 会话类型的数组 + @param isContain 是否包含免打扰消息的未读数 + @return 该类型的会话中所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages in certain types of conversations (except chatroom conversations) + + @param conversationTypes Array of conversation types. + @param isContain Does it include the number of the unread Do Not Disturb messages. + @ return Number of all unread messages in this type of conversation. + + @ remarks Conversation + */ +- (int)getUnreadCount:(NSArray *)conversationTypes containBlocked:(bool)isContain; + +/*! + * \~chinese + 获取某个类型的会话中所有的未读消息数(聊天室会话除外) + + @param conversationTypes 会话类型的数组 + @return 该类型的会话中所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages in a certain type of conversation (except chatroom conversation) + + @param conversationTypes Array of conversation types + @ return the number of all unread messages in this type of conversation + + @ remarks Conversation + */ +- (int)getUnreadCount:(NSArray *)conversationTypes; + +/*! + * \~chinese + 获取某个类型的会话中所有未读的被@的消息数 + + @param conversationTypes 会话类型的数组 + @return 该类型的会话中所有未读的被@的消息数 + + @remarks 会话 + + * \~english + Get the number of unread @ messages in a certain type of conversation + + @param conversationTypes Array of conversation types + @ return Number of unread @ messages in this type of conversation + + @ remarks Conversation + */ +- (int)getUnreadMentionedCount:(NSArray *)conversationTypes; + +/*! + * \~chinese + 清除某个会话中的未读消息数 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation. + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @ return whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 清除某个会话中的未读消息数(该会话在时间戳 timestamp 之前的消息将被置成已读。) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param timestamp 该会话已阅读的最后一条消息的发送时间戳 + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation (messages for that conversation before the timestamp will be set to read.) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param timestamp Sending timestamp of the last message read by the conversation + @ return Whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + time:(long long)timestamp; + +#pragma mark - Conversation Notification + +/*! + * \~chinese + 设置会话的消息提醒状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param isBlocked 是否屏蔽消息提醒 + @param successBlock 设置成功的回调 + [nStatus:会话设置的消息提醒状态] + @param errorBlock 设置失败的回调 [status:设置失败的错误码] + + @discussion + 如果您使用 + IMLibCore,此方法会屏蔽该会话的远程推送;如果您使用IMKit,此方法会屏蔽该会话的所有提醒(远程推送、本地通知、前台提示音),该接口不支持聊天室。 + + @remarks 会话 + + * \~english + Set the message reminder status for the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param isBlocked Whether to block message reminders + @param successBlock Callback for successful setting + [nStatus: message reminder status set for the conversation]. + @param errorBlock Callback for failed setting [ status: error code for error code for setting failure]. + + @ discussion + If you use the IMLibCore, this method blocks the remote push of the conversation; If you use this method of IMKit, it blocks all reminders (remote push, local notification and foreground tone) of the conversation, and the interface does not support chatroom. + + @ remarks Conversation + */ +- (void)setConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + isBlocked:(BOOL)isBlocked + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询会话的消息提醒状态 + + @param conversationType 会话类型(不支持聊天室,聊天室是不接受会话消息提醒的) + @param targetId 会话 ID + @param successBlock 查询成功的回调 [nStatus:会话设置的消息提醒状态] + @param errorBlock 查询失败的回调 [status:设置失败的错误码] + + @remarks 会话 + + * \~english + Query the message reminder status of the conversation + + @param conversationType Conversation type (chatroom is not supported and chatroom does not accept reminders of conversation messages). + @param targetId Conversation ID + @param successBlock Callback for successful query [nStatus: message reminder status set for the conversation] + @param errorBlock Callback for failed query [status: error code for setting failure] + + @ remarks Conversation + */ +- (void)getConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取消息免打扰会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 消息免打扰会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取消息免打扰会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of conversations for Do Not Disturb messages. + + @param conversationTypeList Array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @ return List of conversation RCConversation for Do Not Disturb messages + + @ discussion This method reads the list of conversations of Do Not Disturb messages from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getBlockedConversationList:(NSArray *)conversationTypeList; + +#pragma mark - Global Message Notification + +/*! + * \~chinese + 全局屏蔽某个时间段的消息提醒 + + @param startTime 开始消息免打扰时间,格式为 HH:MM:SS + @param spanMins 需要消息免打扰分钟数,0 < spanMins < 1440( 比如,您设置的起始时间是 00:00, 结束时间为 + 23:59,则 spanMins 为 23 * 60 + 59 = 1439 分钟。) + @param successBlock 屏蔽成功的回调 + @param errorBlock 屏蔽失败的回调 [status:屏蔽失败的错误码] + + @discussion 此方法设置的屏蔽时间会在每天该时间段时生效。 + 如果您使用 IMLibCore,此方法会屏蔽该会话在该时间段的远程推送;如果您使用 + IMKit,此方法会屏蔽该会话在该时间段的所有提醒(远程推送、本地通知、前台提示音)。 + + @remarks 会话 + + * \~english + Globally block message reminders for a certain period of time. + + @param startTime Start message Do Not Disturb time in HH:MM:SS format. + @param spanMins Minutes required for message Do Not Disturb, 0 < spanMins < 1440 (for example, set the start time to be 00: 00 and the end time to be 23: 59, then the spanMins is 23 * 60 + 59 = 1439 minutes). + @param successBlock Callback for successful masking + @param errorBlock Callback for masking failure [status: error code for masking failure]. + + @ discussion The masking time set by this method takes effect at that time of day. + If you use the IMLibCore, this method blocks the remote push of the conversation in this period; If you use IMKit, this method blocks all reminders (remote push, local notification and foreground tone) of the conversation in this period. + + @ remarks Conversation + */ +- (void)setNotificationQuietHours:(NSString *)startTime + spanMins:(int)spanMins + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 删除已设置的全局时间段消息提醒屏蔽 + + @param successBlock 删除屏蔽成功的回调 + @param errorBlock 删除屏蔽失败的回调 [status:失败的错误码] + + @remarks 会话 + + * \~english + Delete the set message reminder masking in a global time period. + + @param successBlock Callback for successful masking deletion + @param errorBlock Callback for failed masking deletion[status: error code for failure] + + @ remarks Conversation + */ +- (void)removeNotificationQuietHours:(void (^)(void))successBlock error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询已设置的全局时间段消息提醒屏蔽 + + @param successBlock 屏蔽成功的回调 [startTime:已设置的屏蔽开始时间, + spansMin:已设置的屏蔽时间分钟数,0 < spansMin < 1440] + @param errorBlock 查询失败的回调 [status:查询失败的错误码] + + @remarks 会话 + + * \~english + Query the set message reminder masking in a global time period. + + @param successBlock Callback for successful masking [startTime: set start time of masking, + spansMin: set minutes of masking, 0 < spansMin < 1440] + @param errorBlock callback for failed query [status: error code of failed query] + + @ remarks Conversation + */ +- (void)getNotificationQuietHours:(void (^)(NSString *startTime, int spansMin))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +#pragma mark - Typing status + +/** + * \~chinese + typing 状态更新的时间,默认是 6s + + @remarks 功能设置 + + * \~english + Time when the typing status is updated and the default value is 6s + + @ remarks Function setting + */ +@property (nonatomic, assign) NSInteger typingUpdateSeconds; + +/*! + * \~chinese + 设置输入状态的监听器 + + @param delegate IMLibCore 输入状态的的监听器 + + @warning 目前仅支持单聊。 + + @remarks 功能设置 + + * \~english + Set the listener for the input status + + @param delegate Listeners for IMLibCore input status + + @ warning currently only support single chat + + @ remarks function setting + */ +- (void)setRCTypingStatusDelegate:(id)delegate; + +/*! + * \~chinese + 向会话中发送正在输入的状态 + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param objectName 正在输入的消息的类型名 + + @discussion + contentType 为用户当前正在编辑的消息类型名,即 RCMessageContent 中 getObjectName 的返回值。 + 如文本消息,应该传类型名"RC:TxtMsg"。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send the status being entered to the conversation + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param objectName Type name of the message being entered + + @ discussion + contentType is the name of the message type that the user is currently editing, that is, the return value of getObjectName in RCMessageContent. + E.g. for a text message, pass the type name "RC:TxtMsg". + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendTypingStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + contentType:(NSString *)objectName; + +#pragma mark - Disallow List + +/*! + * \~chinese + 将某个用户加入黑名单 + + @param userId 需要加入黑名单的用户 ID + @param successBlock 加入黑名单成功的回调 + @param errorBlock 加入黑名单失败的回调 [status:失败的错误码] + + @discussion 将对方加入黑名单后,对方再发消息时,就会提示“您的消息已经发出, 但被对方拒收”。但您仍然可以给对方发送消息。 + + @remarks 高级功能 + + * \~english + Add a user to the blacklist + + @param userId ID of users to be added to the blacklist + @param successBlock Callback for successfully adding to the blacklist + @param errorBlock Callback for failure to add to the blacklist [status: error code for failure] + + @ discussion After the other party is added to the blacklist, when the other party sends another message, it will prompt "your message has been sent, but it has been rejected.” But you can still send messages to each other. + + @ remarks advanced functions + */ +- (void)addToBlacklist:(NSString *)userId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 将某个用户移出黑名单 + + @param userId 需要移出黑名单的用户 ID + @param successBlock 移出黑名单成功的回调 + @param errorBlock 移出黑名单失败的回调[status:失败的错误码] + + @remarks 高级功能 + + * \~english + Remove a user from the blacklist + + @param userId ID of users to be removed from the blacklist + @param successBlock Callback for successful removal from the blacklist + @param errorBlock Callback for failed removal from blacklist [status: error code for failure] + + @ remarks Advanced functions + */ +- (void)removeFromBlacklist:(NSString *)userId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询某个用户是否已经在黑名单中 + + @param userId 需要查询的用户 ID + @param successBlock 查询成功的回调 + [bizStatus:该用户是否在黑名单中。0 表示已经在黑名单中,101 表示不在黑名单中] + @param errorBlock 查询失败的回调 [status:失败的错误码] + + @remarks 高级功能 + + * \~english + Query whether a user is already in the blacklist. + + @param userId ID of the user to be queried + @param successBlock Callback for successful query + [bizStatus: whether the user is in the blacklist 0 indicates it is already in the blacklist, 101 indicates it is not in the blacklist] + @param errorBlock Callback for failed query [status: error code forfailure] + + @ remarks Advanced functions + */ +- (void)getBlacklistStatus:(NSString *)userId + success:(void (^)(int bizStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询已经设置的黑名单列表 + + @param successBlock 查询成功的回调 + [blockUserIds:已经设置的黑名单中的用户 ID 列表] + @param errorBlock 查询失败的回调 [status:失败的错误码] + + @remarks 高级功能 + + * \~english + Query the list of blacklists set + + @param successBlock Callback for successful query + [blockUserIds: ID list of users in the blacklist set] + @param errorBlock Callback for failed query [status: error code for failure] + + @ remarks Advanced functions + */ +- (void)getBlacklist:(void (^)(NSArray *blockUserIds))successBlock error:(void (^)(RCErrorCode status))errorBlock; + +#pragma mark - Push Data Countly + +/*! + * \~chinese + 统计App启动的事件 + + @param launchOptions App的启动附加信息 + + @discussion 此方法用于统计融云推送服务的点击率。 + 如果您需要统计推送服务的点击率,只需要在 AppDelegate 的-application:didFinishLaunchingWithOptions:中, + 调用此方法并将 launchOptions 传入即可。 + + @remarks 高级功能 + + * \~english + Count the events started by app + + @param launchOptions Additional information about app startup + + @ discussion This method is used to count the click rate of RongCloud push service. + If you need to count the click rate of the push service, you only need to call this method in -application:didFinishLaunchingWithOptions: of AppDelegate and pass in the launchOptions. + + @ remarks advanced functions + */ +- (void)recordLaunchOptionsEvent:(NSDictionary *)launchOptions; + +/*! + * \~chinese + 统计本地通知的事件 + + @param notification 本体通知的内容 + + @discussion 此方法用于统计融云推送服务的点击率。 + 如果您需要统计推送服务的点击率,只需要在AppDelegate 的-application:didReceiveLocalNotification:中, + 调用此方法并将 launchOptions 传入即可。 + + @remarks 高级功能 + + * \~english + Count locally notified events + + @param notification Content of ontology notification + + @ discussion This method is used to count the click rate of RongCloud push service. + If you need to count the click rate of the push service, you only need to call this method in -application:didReceiveLocalNotification: of AppDelegate and pass in the launchOptions. + + @ remarks advanced functions + */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +- (void)recordLocalNotificationEvent:(UILocalNotification *)notification; +#pragma clang diagnostic pop + +/*! + * \~chinese + 统计收到远程推送的事件 + + @param userInfo 远程推送的内容 + + @discussion 此方法用于统计融云推送服务的到达率。 + 如果您需要统计推送服务的到达率,需要在 App 中实现通知扩展,并在 NotificationService 的 -didReceiveNotificationRequest: withContentHandler: 中 + 先初始化 appkey 再调用此方法并将推送内容 userInfo 传入即可。 + + @discussion 如果有单独的统计服务地址,还需要在初始化之后设置独立的统计服务地址 + + 如: + + - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { + self.contentHandler = contentHandler; + self.bestAttemptContent = [request.content mutableCopy]; + + NSDictionary *userInfo = self.bestAttemptContent.userInfo; + [[RCCoreClient sharedCoreClient] initWithAppKey:RONGCLOUD_IM_APPKEY]; + if (RONGCLOUD_STATS_SERVER.length > 0) { + [[RCCoreClient sharedCoreClient] setStatisticServer:RONGCLOUD_STATS_SERVER]; + } + [[RCCoreClient sharedCoreClient] recordReceivedRemoteNotificationEvent:userInfo]; + + self.contentHandler(self.bestAttemptContent); + } + + @remarks 高级功能 + */ +- (void)recordReceivedRemoteNotificationEvent:(NSDictionary *)userInfo; + +/*! + * \~chinese + 统计远程推送的点击事件 + + @param userInfo 远程推送的内容 + + @discussion 此方法用于统计融云推送服务的点击率。 + 如果您需要统计推送服务的点击率,只需要在 AppDelegate 的-application:didReceiveRemoteNotification:中, + 调用此方法并将 launchOptions 传入即可。 + + @remarks 高级功能 + + * \~english + Count the events of remote push + + @param userInfo Content of remote push + + @ discussion This method is used to count the click rate of RongCloud push service. + If you need to count the click rate of the push service, you only need to call this method in -application:didReceiveRemoteNotification: of AppDelegate and pass in the launchOptions. + + @ remarks advanced functions + */ +- (void)recordRemoteNotificationEvent:(NSDictionary *)userInfo; + +/*! + * \~chinese + 获取点击的启动事件中,融云推送服务的扩展字段 + + @param launchOptions App 的启动附加信息 + @return 收到的融云推送服务的扩展字段,nil 表示该启动事件不包含来自融云的推送服务 + + @discussion 此方法仅用于获取融云推送服务的扩展字段。 + + @remarks 高级功能 + + * \~english + Get the extension field of the RongCloud push service in the clicked start event + + @param launchOptions Additional information about app startup + @ return Received extension field of the RongCloud push service. Nil indicates that the start event does not include the push service from the RongCoud service. + + @ discussion This method is only used to obtain the extended fields of RongCloud push service. + + @ remarks advanced functions + */ +- (NSDictionary *)getPushExtraFromLaunchOptions:(NSDictionary *)launchOptions; + +/*! + * \~chinese + 获取点击的远程推送中,融云推送服务的扩展字段 + + @param userInfo 远程推送的内容 + @return 收到的融云推送服务的扩展字段,nil 表示该远程推送不包含来自融云的推送服务 + + @discussion 此方法仅用于获取融云推送服务的扩展字段。 + + @remarks 高级功能 + + * \~english + Get the extension field of the RongCloud push service in the clicked remote push. + + @param userInfo Content of remote push. + @ return Received extension field of RongCloud push service. Nil indicates that the remote push does not include the push service from RongCloud. + + @ discussion This method is only used to obtain the extended fields of RongCloud push service. + + @ remarks advanced functions + */ +- (NSDictionary *)getPushExtraFromRemoteNotification:(NSDictionary *)userInfo; + +#pragma mark - Util + +/*! + * \~chinese + 获取当前 IMLibCore SDK的版本号 + + @return 当前 IMLibCore SDK 的版本号,如: @"2.0.0" + + @remarks 数据获取 + + * \~english + Get the version number of the current IMLibCore SDK. + + @ return Version number of the current IMLibCore SDK, e.g.: @ "2.0.0" + + @ remarks Data acquisition + */ ++ (NSString *)getVersion; + +/*! + * \~chinese + 获取当前手机与服务器的时间差 + + @return 时间差 + @discussion 消息发送成功后,SDK 会与服务器同步时间,消息所在数据库中存储的时间就是服务器时间。 + + @remarks 数据获取 + + * \~english + Get the time difference between the current mobile phone and the server + + @ return time difference + @ discussion After the message is sent successfully, the SDK synchronizes the time with the server, and the time stored in the database where the message is located is the server time. + @ remarks Data acquisition + + @ remarks data acquisition + */ +- (long long)getDeltaTime; + +/*! + * \~chinese + 将AMR格式的音频数据转化为 WAV 格式的音频数据,数据开头携带 WAVE 文件头 + + @param data AMR 格式的音频数据,必须是 AMR-NB 的格式 + @return WAV 格式的音频数据 + + @remarks 数据获取 + + * \~english + Convert audio data in AMR format into audio data in WAV format with WAVE file header at the beginning of the data. + + @param data Audio data in AMR format, which must be in AMR-NB format + @ return Audio data in WAV format + + @ remarks Data acquisition + */ +- (NSData *)decodeAMRToWAVE:(NSData *)data; + +/*! + * \~chinese + 将 AMR 格式的音频数据转化为 WAV 格式的音频数据,数据开头不携带 WAV 文件头 + + @param data AMR 格式的音频数据,必须是 AMR-NB 的格式 + @return WAV 格式的音频数据 + + @remarks 数据获取 + + * \~english + Convert audio data in AMR format into audio data in WAV format with WAV file header at the beginning of the data. + + @param data Audio data in AMR format, which must be in AMR-NB format. + @ return Audio data in WAV format + + @ remarks Data acquisition + */ +- (NSData *)decodeAMRToWAVEWithoutHeader:(NSData *)data; + +#pragma mark - Voice Message Setting +/** + * \~chinese + 语音消息采样率,默认 8KHz + + @discussion + 2.9.12 之前的版本只支持 8KHz。如果设置为 16KHz,老版本将无法播放 16KHz 的语音消息。 + 客服会话只支持 8KHz。 + + @remarks 功能设置 + + * \~english + Voice message sampling rate, with default value of 8KHz + + @ discussion + The versions prior to 2.9.12 only supports 8KHz. If it is set to 16kHz, the old version will not be able to play 16KHz voice messages. + The customer service conversations only support 8KHz. + + @ remarks function setting + */ +@property (nonatomic, assign) RCSampleRate sampleRate __deprecated_msg("deprecated"); + +/** + * \~chinese + 语音消息类型,默认 RCVoiceMessageTypeOrdinary + + @discussion 老版本 SDK 不兼容新版本语音消息 + 2.9.19 之前的版本无法播放高音质语音消息; + 2.9.19 及之后的版本可以同时兼容普通音质语音消息和高音质语音消息; + 客服会话类型 (ConversationType_CUSTOMERSERVICE) 不支持高音质语音消息。 + + @remarks 功能设置 + + * \~english + Voice message type, with default value of RCVoiceMessageTypeOrdinary + + @ discussion The old version of SDK is not compatible with the new version of voice messages. + The versions prior to 2.9.19 cannot play high-quality voice messages; + 2.9.19 and later versions can be compatible with both normal and high quality voice messages. + The customer service conversation type (ConversationType_CUSTOMERSERVICE) does not support high-quality voice messages. + + @ remarks function setting + */ +@property (nonatomic, assign) RCVoiceMessageType voiceMsgType; + +#pragma mark - Search + +/*! + * \~chinese + 根据关键字搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param keyword 关键字 + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on keywords. + + @param conversationType Conversation type + @param targetId Conversation ID + @param keyword Keyword + @param count Maximum number of queries + @param startTime Query messages before startTime (0 indicates unlimited time). + + @ return Matching message list + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + keyword:(NSString *)keyword + count:(int)count + startTime:(long long)startTime; + +/*! + * \~chinese + 根据时间,偏移量和个数搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param keyword 关键字,传空默认为是查全部符合条件的消息 + @param startTime 查询 startTime 之后的消息, startTime >= 0 + @param endTime 查询 endTime 之前的消息,endTime > startTime + @param offset 查询的消息的偏移量,offset >= 0 + @param limit 最大的查询数量,limit 需大于 0,最大值为100,如果大于100,会默认成100。 + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on time, offset, and number. + + @param conversationType Conversation type + @param targetId Conversation ID + @param keyword Keyword, in which empty value indicates to check all messages that meet the criteria by default + @param startTime Query the message after startTime, startTime > = 0 + @param endTime Query the messages before endTime, endTime > startTime. + @param offset Offset of the queried message, offset > = 0 + @param limit For the maximum number of queries, the limit should be greater than 0, and the maximum value should be 100. If it is greater than 100, it will default to 100. + + @ return List of messages matched + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + keyword:(NSString *)keyword + startTime:(long long)startTime + endTime:(long long)endTime + offset:(int)offset + limit:(int)limit; + +/*! + * \~chinese + 按用户 ID 搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param userId 搜索用户 ID + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation by user ID + + @param conversationType Conversation type + @param targetId Conversation ID + @param userId Search user ID + @param count Maximum number of queries. + @param startTime Query messages before startTime (0 indicates unlimited time) + + @ return List of message matched + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + userId:(NSString *)userId + count:(int)count + startTime:(long long)startTime; + +/*! + * \~chinese + 根据关键字搜索会话 + + @param conversationTypeList 需要搜索的会话类型列表 + @param objectNameList 需要搜索的消息类型名列表(即每个消息类方法 getObjectName 的返回值) + @param keyword 关键字 + + @return 匹配的会话搜索结果列表 + + @discussion 目前,SDK 内置的文本消息、文件消息、图文消息支持搜索。 + 自定义的消息必须要实现 RCMessageContent 的 getSearchableWords 接口才能进行搜索。 + + @remarks 消息操作 + + * \~english + Search a conversation based on keywords + + @param conversationTypeList List of conversation types to be searched + @param objectNameList List of type names of message to be searched (that is, the return value of each message class method getObjectName) + @param keyword Keyword + + @ return Search results list for conversation matched. + + @ discussion Currently, SDK's built-in text messages, file messages, and image and text messages support search + Custom messages must implement getSearchableWords interface of RCMessageContent before they can be searched + + @ remarks message operation + */ +- (NSArray *)searchConversations:(NSArray *)conversationTypeList + messageType:(NSArray *)objectNameList + keyword:(NSString *)keyword; + +#pragma mark - Log + +/*! + * \~chinese + 设置日志级别 + + @remarks 高级功能 + + * \~english + Set log level + + @ remarks Advanced functions + */ +@property (nonatomic, assign) RCLogLevel logLevel; + +/*! + * \~chinese + 设置 IMLibCore 日志的监听器 + + @param delegate IMLibCore 日志的监听器 + + @discussion 您可以通过 logLevel 来控制日志的级别。 + + @remarks 功能设置 + + * \~english + Set listeners for IMLibCore logs + + @param delegate Listeners for IMLibCore logs + + @ discussion You can control the level of logs through logLevel. + + @ remarks function setting + */ +- (void)setRCLogInfoDelegate:(id)delegate; + +#pragma mark - File Storage + +/*! + * \~chinese + 文件消息下载路径 + + @discussion 默认值为沙盒下的 Documents/MyFile 目录。您可以通过修改 RCConfig.plist 中的 RelativePath 来修改该路径。 + + @remarks 数据获取 + + * \~english + File message downloading path + + @ discussion The default value is the Documents/MyFile directory under sandboxes. You can modify the path by modifying the RelativePath in RCConfig.plist. + + @ remarks data acquisition + */ +@property (nonatomic, strong, readonly) NSString *fileStoragePath; + +#pragma mark - VendorToken +/*! + * \~chinese + 获取Vendor token. 仅供融云第三方服务厂家使用。 + + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @remarks 数据获取 + + * \~english + Get Vendor token, which is for RongCloud's third-party service manufacturers only. + + @ param successBlock Callback for success + @ param errorBlock Callback for failure + + @ remarks Data acquisition + */ +- (void)getVendorToken:(void (^)(NSString *vendorToken))successBlock error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 远程推送相关设置 + + @remarks 功能设置 + + * \~english + Remote push of related settings + + @ remarks Function setting + */ +@property (nonatomic, strong, readonly) RCPushProfile *pushProfile; + +#pragma mark - History Message +/** + * \~chinese + 设置离线消息在服务端的存储时间(以天为单位) + + @param duration 存储时间,范围【1~7天】 + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @remarks 功能设置 + + * \~english + Set the storage time of offline messages on the server (in days) + + @param duration Storage time, range [1~7 days] + @ param Callback for successBlock + @ param Callback for errorBlock + + @ remarks Function setting + */ +- (void)setOfflineMessageDuration:(int)duration + success:(void (^)(void))successBlock + failure:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 获取离线消息时间 (以天为单位) + + @return 离线消息存储时间 + + @remarks 数据获取 + + * \~english + Get offline message time (in days) + + @ return Storage time of offline message + + @ remarks Data acquisition + */ +- (int)getOfflineMessageDuration; + +/** + * \~chinese + 设置集成 SDK 的用户 App 版本信息。便于融云排查问题时,作为分析依据,属于自愿行为。 + + @param appVer 用户 APP 的版本信息。 + + @remarks 功能设置 + + * \~english + Set the user App version information for the integrated SDK. When it is convenient for RongCloud to investigate the problem, as the basis for analysis, it shall be voluntary. + + @ param appVer Version information of user APP + + @ remarks function setting + */ +- (void)setAppVer:(NSString *)appVer; + +/** + * \~chinese + GIF 消息大小限制,以 KB 为单位,超过这个大小的 GIF 消息不能被发送 + + @return GIF 消息大小,以 KB 为单位 + + @remarks 数据获取 + + * \~english + GIF message size limit, in KB. GIF messages exceeding this size cannot be sent + + @ return GIF message size, in KB + + @ remarks Data acquisition + */ +- (NSInteger)getGIFLimitSize; + +/** + * \~chinese + 小视频消息时长限制,以 秒 为单位,超过这个时长的小视频消息不能在相册中被选择发送 + + @return 小视频消息时长,以 秒 为单位 + + * \~english + Duration limit of small video messages, in seconds. Small video messages exceeding this limit cannot be selected to be sent in the album + + @ return Duration of small video message, in seconds + */ +- (NSTimeInterval)getVideoDurationLimit; + +#pragma mark - Conversation Status: Sync,Notification,Top + +/*! + * \~chinese +设置会话状态(包含置顶,消息免打扰)同步的监听器 + +@param delegate 会话状态同步的监听器 + +@discussion 可以设置并实现此 delegate 来进行会话状态同步。SDK 会在回调的 conversationStatusChange:方法中通知您会话状态的改变。 + +@remarks 功能设置 + + * \~english + Listeners that set conversation status (including top setting and Do Not Disturb setting) synchronization + + @param delegate Listeners for conversation status synchronization + + @ discussion It can set and implement this delegate for conversation status synchronization. SDK will notify you of the change in conversation status in the callback conversationStatusChange: method. + + @ remarks function setting +*/ +- (void)setRCConversationStatusChangeDelegate:(id)delegate; + +#pragma mark - Message Expansion +/** + * \~chinese + 更新消息扩展信息 + + @param expansionDic 要更新的消息扩展信息键值对 + @param messageUId 消息 messageUId + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 消息扩展信息是以字典形式存在。设置的时候从 expansionDic 中读取 key,如果原有的扩展信息中 key 不存在则添加新的 KV 对,如果 key 存在则替换成新的 value。 + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + @discussion 扩展信息字典中的 Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 32;Value 最长长度,单次设置扩展数量最大为 20,消息的扩展总数不能超过 300 + + @remarks 高级功能 + + * \~english + Update message extension information + + @param expansionDic Message extension information key-value pair to be updated + @param messageUId Message messageUId. + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion The message extension information exists in the form of a dictionary. Read key from expansionDic when setting. If key does not exist in the original extension information, add a new KV pair, or replace it with a new value if key exists. + @ discussion The extension information only supports single chat and groups. Other conversation types cannot set extension information + @ discussion The Key in the extended information dictionary supports the combination of uppercase and lowercase letters, numbers, and some special symbols + =-_. The maximum length is 32; For the maximum length of Value, the maximum number of extensions set at a time is 20, and the total number of messages extensions cannot exceed 300 + @ remarks Advanced functions +*/ +- (void)updateMessageExpansion:(NSDictionary *)expansionDic + messageUId:(NSString *)messageUId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 删除消息扩展信息中特定的键值对 + + @param keyArray 消息扩展信息中待删除的 key 的列表 + @param messageUId 消息 messageUId + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + + @remarks 高级功能 + + * \~english + Delete a specific key-value pair in the message extension information. + + @param keyArray List of key to be deleted in message extension information + @param messageUId Message messageUId + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion The extension information only supports single chat and groups and other conversation types cannot set extension information. + + @ remarks Advanced functions +*/ +- (void)removeMessageExpansionForKey:(NSArray *)keyArray + messageUId:(NSString *)messageUId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 设置 IMLibCore 的消息扩展监听器 + + @discussion 代理回调在非主线程 + + @remarks 高级功能 + + * \~english + Set the message extension listener for IMLibCore + + @ discussion Proxy callback in non-main thread + + @ remarks Advanced functions + */ +@property (nonatomic, weak) id messageExpansionDelegate; + +#pragma mark - Tag +/*! + * \~chinese + 添加标签 + + @param tagInfo 标签信息。只需要设置标签信息的 tagId 和 tagName。 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 最多支持添加 20 个标签 + @remarks 高级功能 + + * \~english + Add tags + + @param tagInfo Tag information. You only shall set the tagId and tagName of the tag information. + @param successBlock Callback for success. + @param errorBlock Callback for failure + + @ discussion Support to add 20 tags at most + @ remarks Advanced functions + */ +- (void)addTag:(RCTagInfo *)tagInfo + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 移除标签 + + @param tagId 标签 ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Remove tag + + @param tagId Tag ID + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)removeTag:(NSString *)tagId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 更新标签信息 + + @param tagInfo 标签信息。只支持修改标签信息的 tagName + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Update tag information + + @param tagInfo Tag information. Only tagName that modifies tag information is supported + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)updateTag:(RCTagInfo *)tagInfo + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + + +/*! + * \~chinese + 获取标签列表 + + @return 标签列表 + @remarks 高级功能 + + * \~english + Get a list of tags + + @ return Tag list + @ remarks Advanced functions + */ +- (NSArray *)getTags; + +/*! + * \~chinese + 标签变化监听器 + + @discussion 标签添加移除更新会触发此监听器,用于多端同步 + @discussion 本端添加删除更新标签,不会触发此监听器,在相关调用方法的 block 块直接回调 + + @remarks 高级功能 + + * \~english + Listener for tag changing + + @ discussion Addition, removal and update of a tag triggers this listener for multi-terminal synchronization + @ discussion Local addition, removal and update of a tag will not trigger this listener, and it will be called back directly in the block of the relevant call method. + + @ remarks Advanced functions + */ +@property (nonatomic, weak) id tagDelegate; + +/*! + * \~chinese + 添加会话到指定标签 + + @param tagId 标签 ID + @param conversationIdentifiers 会话信息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 每次添加会话个数最大为 1000。最多支持添加 1000 个会话,如果标签添加的会话总数已超过 1000,会自动覆盖早期添加的会话 + @remarks 高级功能 + + * \~english + Add a conversation to the specified tag + + @param tagId Tag ID + @param conversationIdentifiers Conversation information list + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion Maximum 1000 conversations are added at a time. A maximum of 1000 conversations can be added. If the total number of conversations added by the tag exceeds 1000, the previously added conversations will be automatically overwritten. + @ remarks Advanced functions + */ +- (void)addConversationsToTag:(NSString *)tagId + conversationIdentifiers:(NSArray *)conversationIdentifiers + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 从指定标签移除会话 + + @param tagId 标签 ID + @param conversationIdentifiers 会话信息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 每次移除会话个数最大为 1000 + @remarks 高级功能 + + * \~english + Remove a conversation from the specified tag + + @param tagId Tag ID + @param conversationIdentifiers Conversation information list + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion Maximum 1000 conversations are removed at a time + @ remarks Advanced functions + */ +- (void)removeConversationsFromTag:(NSString *)tagId + conversationIdentifiers:(NSArray *)conversationIdentifiers + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 从指定会话中移除标签 + + @param conversationIdentifier 会话信息 + @param tagIds 标签 ID 列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Remove the tag from the specified conversation + + @param conversationIdentifier Conversation information. + @param tagIds Tag ID list + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)removeTagsFromConversation:(RCConversationIdentifier *)conversationIdentifier + tagIds:(NSArray *)tagIds + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 获取会话的所有标签 + + @param conversationIdentifier 会话信息 + @return 会话所属的标签列表 + + @remarks 高级功能 + + * \~english + Get all the tags for the conversation + + @param conversationIdentifier Conversation information. + @ return List of tags to which the conversation belongs + + @ remarks Advanced functions + */ +- (NSArray *)getTagsFromConversation:(RCConversationIdentifier *)conversationIdentifier; + +/*! + * \~chinese + 分页获取标签中会话列表 + + @param tagId 标签 ID + @param timestamp 会话的时间戳(获取这个时间戳之前的会话列表,0表示从最新开始获取) + @param count 获取的数量(当实际取回的会话数量小于 count 值时,表明已取完数据) + @return 会话 RCConversation 的列表 + + @remarks 高级功能 + + * \~english + Get the list of conversations in the tag page by page + + @param tagId tag ID + @param timestamp Timestamp of the conversation (get the list of conversations before this timestamp, 0 indicates obtaining from the latest). + @param count Number of conversations obtained (When the actual number of retrieved conversations is less than the count value, it indicates that the data has been fetched.) + @ return List of conversation RCConversation + + @ remarks Advanced functions + */ +- (NSArray *)getConversationsFromTagByPage:(NSString *)tagId + timestamp:(long long)timestamp + count:(int)count; + +/*! + * \~chinese + 获取标签中会话消息未读数 + + @param tagId 标签 ID + @param isContain 是否包含免打扰会话 + @return 会话消息未读数 + + @remarks 高级功能 + + * \~english + Get the number of unread conversation messages in the tag + + @param tagId Tag ID + @param isContain Does it include a Do Not Disturb conversation + @ return Number of unread conversation messages + + @ remarks Advanced functions + */ +- (int)getUnreadCountByTag:(NSString *)tagId + containBlocked:(BOOL)isContain; + +/*! + * \~chinese + 设置标签中的会话置顶 + + @param tagId 标签 ID + @param conversationIdentifier 会话信息 + @param top 是否置顶 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Set the conversation in the tag to be top + + @param tagId Tag ID + @param conversationIdentifier Conversation information + @param top Whether or not to set top + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)setConversationToTopInTag:(NSString *)tagId + conversationIdentifier:(RCConversationIdentifier *)conversationIdentifier + isTop:(BOOL)top + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 获取标签中的会话置顶状态 + + @param conversationIdentifier 会话信息 + @param tagId 标签 ID + @return 置顶状态 + + @remarks 高级功能 + + * \~english + Get the conversation top setting status in the tag. + + @param conversationIdentifier Conversation information + @param tagId Tag ID + @ return top setting status + + @ remarks Advanced functions + */ +- (BOOL)getConversationTopStatusInTag:(RCConversationIdentifier *)conversationIdentifier tagId:(NSString *)tagId; + + +/*! + * \~chinese + 会话标签变化监听器 + + @discussion 会话标签添加移除更新会触发此监听器,用于多端同步 + @discussion 本端操作会话标签,不会触发此监听器,在相关调用方法的 block 块直接回调 + + @remarks 高级功能 + + * \~english + Listener for conversation tag changing. + + @ discussion Addition, removal and update of the conversation tag triggers this listener for multi-terminal synchronization. + @ discussion Local operation on the conversation tag does not trigger this listener, and the block of the relevant calling method is called back directly + + @ remarks Advanced functions + */ +@property (nonatomic, weak) id conversationTagDelegate; + +/*! + * \~chinese + 缩略图压缩配置 + + @remarks 缩略图压缩配置,如果此处设置了配置就按照这个配置进行压缩。如果此处没有设置,会按照 RCConfig.plist 中的配置进行压缩。 + + * \~english + Thumbnail compression configuration + + @ remarks Thumbnail compression configuration. If the configuration is set here, it is compressed according to this configuration. If it is not set here, it will be compressed according to the configuration in RCConfig.plist. + */ +@property (nonatomic, strong) RCImageCompressConfig *imageCompressConfig; + +/*! + * \~chinese + 子模块是否正在使用声音通道,特指 RTCLib + + * \~english + Whether the submodule is using a sound channel, especially the RTCLib + */ +- (BOOL)isAudioHolding; + +/*! + * \~chinese + 子模块是否正在使用摄像头,特指 RTCLib + + * \~english + Whether the submodule is using a camera, especially the RTCLib + */ +- (BOOL)isCameraHolding; + +@end + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCDownloadItem.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCDownloadItem.h new file mode 100644 index 0000000..268dea0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCDownloadItem.h @@ -0,0 +1,200 @@ +// +// RCEDownloadItem.h +// RongEnterpriseApp +// +// Created by zhaobingdong on 2018/5/15. +// Copyright © 2018 rongcloud. All rights reserved. +// + +#import + +/** + * \~chinese + 下载状态枚举 + + - RCDownloadItemStateWaiting: 等待 + - RCDownloadItemStateChecking: 正在检测是否支持 Range + - RCDownloadItemStateRunning: 正在下载 + - RCDownloadItemStateSuspended: 暂停 + - RCDownloadItemStateCanceled: 已取消 + - RCDownloadItemStateCompleted: 完成 + - RCDownloadItemStateFailed: 失败 + + * \~english + Download status enumeration. + + - RCDownloadItemStateWaiting: Wait for + - RCDownloadItemStateChecking: Testing to see if Range is supported. + - RCDownloadItemStateRunning: Downloading. + - RCDownloadItemStateSuspended: Suspend + - RCDownloadItemStateCanceled: Canceled + - RCDownloadItemStateCompleted: Complete + - RCDownloadItemStateFailed: Failure + */ +typedef NS_ENUM(NSInteger, RCDownloadItemState) { + RCDownloadItemStateWaiting = 0, + RCDownloadItemStateChecking, + RCDownloadItemStateRunning, + RCDownloadItemStateSuspended, + RCDownloadItemStateCanceled, + RCDownloadItemStateCompleted, + RCDownloadItemStateFailed +}; + +NS_ASSUME_NONNULL_BEGIN +@class RCDownloadItem; +@protocol RCDownloadItemDelegate + +/** + * \~chinese + 下载任务状态变化时调用 + + @param item 下载任务对象 + @param state 状态 + + * \~english + Called when the status of the download task changes. + + @param item Download task object. + @param state Status. + */ +- (void)downloadItem:(RCDownloadItem *)item state:(RCDownloadItemState)state; + +/** + * \~chinese + 下载进度上报时调用 + + @param item 下载任务 + @param progress 下载进度 + + * \~english + Called when the download progress is reported. + + @param item Download task. + @param progress Download progress. + */ +- (void)downloadItem:(RCDownloadItem *)item progress:(float)progress; + +/** + * \~chinese + 任务结束时调用 + + @param item 下载任务 + @param error 错误信息对象,成功时为 nil + @param path 下载完成后文件的路径,此路径为相对路径,相对于沙盒根目录 NSHomeDirectory + + * \~english + Called at the end of the task. + + @param item Download task. + @param error Error message object, nil on success. + @param path The path to the file after the download is completed. This path is relative to sandboxie's root directory NSHomeDirectory. + */ +- (void)downloadItem:(RCDownloadItem *)item didCompleteWithError:(NSError *)error filePath:(nullable NSString *)path; +@end + +@interface RCDownloadItem : NSObject + +/** + * \~chinese + 下载状态 + + * \~english + Download status. + */ +@property (nonatomic, assign, readonly) RCDownloadItemState state; + +/** + * \~chinese + 文件总大小 单位字节 + + * \~english + Total file size in bytes. + */ +@property (nonatomic, assign, readonly) long long totalLength; + +/** + * \~chinese + 文件当前的大小 + + * \~english + The current size of the file. + */ +@property (nonatomic, assign, readonly) long long currentLength; + +/** + * \~chinese + 文件对应的网络 URL + + * \~english + Network URL corresponding to the file. + */ +@property (nonatomic, strong, readonly) NSURL *URL; + +/** + * \~chinese + 标识是否可恢复下载。 YES 表示可恢复,支持 Range。 NO 表示不支持 Range。 + + * \~english + Identify whether the download can be resumed. YES indicates recoverable and supports Range. NO indicates that Range is not supported. + */ +@property (nonatomic, assign, readonly) BOOL resumable; + +/** + * \~chinese + 下载任务的标识符 + + * \~english + Identifier of the download task. + */ +@property (nonatomic, copy, readonly) NSString *identify; + +/** + * \~chinese + 下载任务的代理对象 + + * \~english + Download the proxy object for the task. + */ +@property (nonatomic, weak) id delegate; + ++ (instancetype) new NS_UNAVAILABLE; + +/** + * \~chinese + 开始下载 + + * \~english + Start downloading + */ +- (void)downLoad; + +/** + * \~chinese + 暂停下载 + + * \~english + Suspend download + */ +- (void)suspend; + +/** + * \~chinese + 恢复下载 + + * \~english + Resume download + */ +- (void)resume; + +/** + * \~chinese + 取消下载 + + * \~english + Cancel download + */ +- (void)cancel; + +@end +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFileMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFileMessage.h new file mode 100644 index 0000000..d4a82f1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFileMessage.h @@ -0,0 +1,96 @@ +// +// RCFileMessage.h +// RongIMLib +// +// Created by RongCloud on 16/5/23. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 文件消息的类型名 + + * \~english + The type name of the file message + */ +#define RCFileMessageTypeIdentifier @"RC:FileMsg" +/*! + * \~chinese + 文件消息类 + + @discussion 文件消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + File message class. + + @ discussion file message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCFileMessage : RCMediaMessageContent + +/*! + * \~chinese + 文件名 + + * \~english + File name + */ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 文件大小,单位为 Byte + + * \~english + File size in Byte + */ +@property (nonatomic, assign) long long size; + +/*! + * \~chinese + 文件类型 + + * \~english + File type + */ +@property (nonatomic, copy) NSString *type; + +/*! + * \~chinese + 文件的网络地址 + + * \~english + The network address of the file + */ +@property (nonatomic, copy) NSString *fileUrl; + +/*! + * \~chinese + 文件的本地路径 + + * \~english + Local path to the file + */ +@property (nonatomic, copy) NSString *localPath; + +/*! + * \~chinese + 初始化文件消息 + + @param localPath 文件的本地路径 + @return 文件消息对象 + + * \~english + Initialize file message. + + @param localPath Local path to the file. + @ return file message object. + */ ++ (instancetype)messageWithFile:(NSString *)localPath; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFileUtility.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFileUtility.h new file mode 100644 index 0000000..fcccf6a --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFileUtility.h @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCFileUtility.h + +#ifndef __RCFileUtility +#define __RCFileUtility + +#import "RCStatusDefine.h" + +@interface RCFileUtility : NSObject + +/*! + * \~chinese + 设置文件媒体类型 + + @return 文件类型 + + * \~english + Set file media type. + + @ return file type. + */ ++ (NSString *)getMimeType:(RCMediaType)fileType; + +/*! + * \~chinese + 获取上传文件名称 + + @return 文件媒体类型 + + * \~english + Get the name of the uploaded file. + + @ return file media type. + */ ++ (NSString *)generateKey:(NSString *)mimeType; + +/*! + * \~chinese + 生成下载的文件路径 + + @return 文件名称 + + * \~english + Generate the downloaded file path. + + @ return file name. + */ ++ (NSString *)getFileName:(NSString *)imgUrl + conversationType:(RCConversationType)conversationType + mediaType:(RCMediaType)mediaType + targetId:(NSString *)targetId; + +/*! + * \~chinese + 根据文件 URL 获取 MD5 key + + @return key + + * \~english + Get MD5 key according to file URL. + + @ return key. + */ ++ (NSString *)getFileKey:(NSString *)fileUri; + +/*! + * \~chinese + 根据文件类型获取文件夹名称 + + @return 文件夹名称 + + * \~english + Gets folder name according to file type. + + @ return folder name + */ ++ (NSString *)getMediaDir:(RCMediaType)fileType; + +/*! + * \~chinese + 根据会话类型获取存储的文件夹名称 + + @return 文件夹名称 + + * \~english + Get the stored folder name based on the conversation type. + + @ return folder name. + */ ++ (NSString *)getCateDir:(RCConversationType)categoryId; + +/*! + * \~chinese + 文件是否存在 + + @return 是否存在 + + * \~english + Whether the file exists. + + @ return exist or not +*/ ++ (BOOL)isFileExist:(NSString *)fileName; + +/*! + * \~chinese + 存储数据到指定路径 + + @param filePath 文件存储路径 + @param content 存储数据 + @return 存储成功与否的结果 + + * \~english + Store data to the specified path. + + @param filePath File storage path. + @param content Store data. + @ return store the result of success or not. + */ ++ (BOOL)saveFile:(NSString *)filePath content:(NSData *)content; + +/*! + * \~chinese + 文件唯一存储地址 + + * \~english + Unique storage address of the file. + */ ++ (NSString *)getUniqueFileName:(NSString *)baseFileName; + +/*! + * \~chinese + 根据文件名获取文件类型 + + @param fileName 文件名,需要带扩展名 + + * \~english + Get the file type based on the file name. + + @param fileName File name with extension name + */ ++ (NSString *)getTypeName:(NSString *)fileName; + +/*! + * \~chinese + 根据文件 URL 获取文件本地存储路径 + + @return 文件本地存储路径 + + * \~english + Get the local storage path of the file according to the file URL. + + @ return file local storage path. + */ ++ (NSString *)getFileLocalPath:(NSString *)fileUri; + +/*! + * \~chinese + 关联文件远端 URL 和本地路径 + * + * \~english + Associate file remote URL and local path. + */ ++ (void)setFileLocalPath:(NSString *)localPath fileUri:(NSString *)fileUri; +/*! + * \~chinese + 获取小视频文件缓存路径 + + * \~english + Get the cache path of small video File. + */ ++ (NSString *)getSightCachePath:(NSString *)sightUrl; +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFwLog.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFwLog.h new file mode 100644 index 0000000..c9849f2 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCFwLog.h @@ -0,0 +1,91 @@ +// +// RCFwLog.h +// MacLogTest +// +// Created by ZhangLei on 26/02/2018. +// Copyright © 2018 RongCloud. All rights reserved. +// + +#import + +#define __FILE_STRING__ [NSString stringWithUTF8String:__FILE__] +#define __GET_FILENAME__ \ + [__FILE_STRING__ substringFromIndex:[__FILE_STRING__ rangeOfString:@"/" options:NSBackwardsSearch].location + 1] + +#define RCLogR(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_R type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogF(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_F type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogE(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_E type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogW(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_W type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogI(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_I type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogD(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_D type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogV(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_V type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] + +#define FwLogR(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_R type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogF(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_F type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogE(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_E type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogW(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_W type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogI(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_I type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogD(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_D type:p tag:t keys:k, ##__VA_ARGS__] + +typedef NS_ENUM(NSInteger, RCFwLogLevel) { + RC_Level_R = -1,//Record + RC_Level_N = 0,//None + RC_Level_F = 1,//Fatal + RC_Level_E = 2,//Error + RC_Level_W = 3,//Warn + RC_Level_I = 4,//Info + RC_Level_D = 5,//Debug + RC_Level_V = 6//Verbose +}; + +typedef NS_OPTIONS(NSUInteger, RCLogType) { + RC_Type_APP = 1 << 0, // User interface. + RC_Type_PTC = 1 << 1, // Protocol. + RC_Type_ENV = 1 << 2, + RC_Type_DET = 1 << 3, + RC_Type_CON = 1 << 4, + RC_Type_RCO = 1 << 5, + RC_Type_CRM = 1 << 6, + RC_Type_MSG = 1 << 7, // Message. + RC_Type_MED = 1 << 8, // Media file. + RC_Type_LOG = 1 << 9, + RC_Type_DEB = 1 << 10, // Debug log. + RC_Type_CRS = 1 << 11, // Crash stack. + RC_Type_RTC = 1 << 12 // RTC. +}; + +@interface RCFwLog : NSObject + +// should be call init first, otherwise getInstance will return nil. ++ (void)init:(NSString *)appKey sdkVer:(NSString *)sdkVer; ++ (instancetype)getInstance; + ++ (void)setLogMonitor:(NSInteger)value; ++ (void)setToken:(NSString *)token; ++ (void)setUserId:(NSString *)userId; ++ (void)setLogListener:(void (^)(NSString *log))logBlock; ++ (void)setConsoleLogLevel:(RCFwLogLevel)level; ++ (NSString *)getIpWithHost:(NSString *)hostName; ++ (void)setRcDebugLogLevel:(NSInteger)rcDebugLogLevel; ++ (void)setRcDebugLogMaxSize:(long long)rcDebugLogMaxSize; ++ (void)startRealTimelog; +- (void)uploadLog:(void (^)(int code))errorBlock; +- (void)uploadDebugLog; +- (void)write:(RCFwLogLevel)level + type:(RCLogType)type + tag:(NSString *)tag + keys:(NSString *)keys, ... NS_FORMAT_FUNCTION(4, 5); + +- (void)write:(RCFwLogLevel)level + type:(RCLogType)type + tag:(NSString *)tag + keys:(NSArray *)keys + values:(NSArray *)vals; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGIFMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGIFMessage.h new file mode 100644 index 0000000..b921071 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGIFMessage.h @@ -0,0 +1,107 @@ +// +// RCGIFMessage.h +// RongIMLib +// +// Created by liyan on 2018/12/20. +// Copyright © 2018 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + * \~chinese + GIF 消息的类型名 + + * \~english + Type name of the GIF message + */ +#define RCGIFMessageTypeIdentifier @"RC:GIFMsg" +/*! + * \~chinese + GIF 消息 + @discussion GIF 消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + GIF message. + @ discussion GIF message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCGIFMessage : RCMediaMessageContent + +/*! + * \~chinese + GIF 图的大小,单位字节 + + * \~english + The size of the GIF graph, in bytes + */ +@property (nonatomic, assign) long long gifDataSize; + +/*! + * \~chinese + GIF 图的宽 + + * \~english + The width of GIF graphs + */ +@property (nonatomic, assign) long width; + +/*! + * \~chinese + GIF 图的高 + + * \~english + The height of GIF graph + */ +@property (nonatomic, assign) long height; + +/*! + * \~chinese + 初始化 GIF 消息 + + @param gifImageData GIF 图的数据 + @param width GIF 的宽 + @param height GIF 的高 + + @return GIF 消息对象 + + * \~english + Initialize GIF messages. + + @param gifImageData Data of GIF diagram. + @param width Width of GIF. + @param height The height of GIF. + + @ return GIF message object. + */ ++ (instancetype)messageWithGIFImageData:(NSData *)gifImageData width:(long)width height:(long)height; + +/*! + * \~chinese + 初始化 GIF 消息 + + @param gifURI GIF 的本地路径 + @param width GIF 的宽 + @param height GIF 的高 + + @return GIF 消息对象 + + * \~english + Initialize GIF messages. + + @param gifURI Local path to GIF. + @param width Width of GIF. + @param height The height of GIF. + + @ return GIF message object. + */ ++ (instancetype)messageWithGIFURI:(NSString *)gifURI width:(long)width height:(long)height; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroup.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroup.h new file mode 100644 index 0000000..01674b5 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroup.h @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCGroup.h +// Created by Heq.Shinoda on 14-9-6. + +#import + +/*! + * \~chinese + 群组信息类 + + * \~english + Group information class + */ +@interface RCGroup : NSObject + +/*! + * \~chinese + 群组 ID + + * \~english + Group ID + */ +@property (nonatomic, copy) NSString *groupId; + +/*! + * \~chinese + 群组名称 + + * \~english + Group name + */ +@property (nonatomic, copy) NSString *groupName; + +/*! + * \~chinese + 群组头像的 URL + + * \~english + URL of group portrait + */ +@property (nonatomic, copy) NSString *portraitUri; + +/*! + * \~chinese + 群组信息的初始化方法 + + @param groupId 群组 ID + @param groupName 群组名称 + @param portraitUri 群组头像的 URL + @return 群组信息对象 + + * \~english + Initialization method of group information. + + @param groupId Group ID. + @param groupName Group name. + @param portraitUri URL of group portrait. + @ return Group Information object. + */ +- (instancetype)initWithGroupId:(NSString *)groupId groupName:(NSString *)groupName portraitUri:(NSString *)portraitUri; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupMessageReaderV2.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupMessageReaderV2.h new file mode 100644 index 0000000..df007f0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupMessageReaderV2.h @@ -0,0 +1,38 @@ +// +// RCMessageReadUser.h +// RongIMLibCore +// +// Created by RongCloud on 2021/2/22. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import + +/** + * \~chinese + 已读用户对象 + + * \~english + Read user object + */ +@interface RCGroupMessageReaderV2 : NSObject + +/** + * \~chinese + 已读用户 id + + * \~english + Read user id + */ +@property (nonatomic, copy) NSString *userId; + +/** + * \~chinese + 已读时间 + + * \~english + Read time + */ +@property (nonatomic, assign) long long readTime; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupNotificationMessage.h new file mode 100644 index 0000000..bac2ec3 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupNotificationMessage.h @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCGroupNotificationMessage.h +// Created by xugang on 14/11/24. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 群组通知消息的类型名 + + * \~english + Type name of the group notification message + */ +#define RCGroupNotificationMessageIdentifier @"RC:GrpNtf" + +/*! + * \~chinese + 有成员加入群组的通知 + + * \~english + Notice of members joining the group + */ +#define GroupNotificationMessage_GroupOperationAdd @"Add" +/*! + * \~chinese + 有成员退出群组的通知 + + * \~english + Notice of exit of a member from the group + */ +#define GroupNotificationMessage_GroupOperationQuit @"Quit" +/*! + * \~chinese + 有成员被踢出群组的通知 + + * \~english + Notice that a member has been kicked out of the group + */ +#define GroupNotificationMessage_GroupOperationKicked @"Kicked" +/*! + * \~chinese + 群组名称发生变更的通知 + + * \~english + Notification of a change in the group name + */ +#define GroupNotificationMessage_GroupOperationRename @"Rename" +/*! + * \~chinese + 群组公告发生变更的通知 + + * \~english + Notice of a change in the group announcement + */ +#define GroupNotificationMessage_GroupOperationBulletin @"Bulletin" + +/*! + * \~chinese + 群组通知消息类 + + @discussion 群组通知消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Group notification message class. + + @ discussion group notification message class, which is stored but will not be counted as unread messages. + + @ remarks notification message + */ +@interface RCGroupNotificationMessage : RCMessageContent + +/*! + * \~chinese + 群组通知的当前操作名 + + @discussion + 群组通知的当前操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。 + 预定义的操作名:GroupNotificationMessage_GroupOperationAdd、GroupNotificationMessage_GroupOperationQuit、GroupNotificationMessage_GroupOperationKicked、GroupNotificationMessage_GroupOperationRename、GroupNotificationMessage_GroupOperationBulletin。 + + * \~english + The current operation name of the group notification. + + @ discussion + The current operation name of the group notification, you can use a predefined operation name, or any operation name that you define yourself. + Predefined operation names: GroupNotificationMessage_GroupOperationAdd, GroupNotificationMessage_GroupOperationQuit, GroupNotificationMessage_GroupOperationKicked, GroupNotificationMessage_GroupOperationRename, GroupNotificationMessage_GroupOperationBulletin. + */ +@property (nonatomic, copy) NSString *operation; + +/*! + * \~chinese + 当前操作发起用户的用户 ID + + * \~english + User ID of the user who initiated the current operation + */ +@property (nonatomic, copy) NSString *operatorUserId; + +/*! + * \~chinese + 当前操作的目标对象 + + @discussion + 当前操作的目标对象,如被当前操作目标用户的用户 ID 或变更后的群主名称等。 + + * \~english + The target object of the current operation. + + @ discussion + The target object of the current operation, such as the user ID or the changed group owner name of the target user of the current operation. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 当前操作的消息内容 + + * \~english + Message content of the current operation + */ +@property (nonatomic, copy) NSString *message; + +/*! + * \~chinese + 初始化群组通知消息 + + @param operation 群组通知的当前操作名 + @param operatorUserId 当前操作发起用户的用户 ID + @param data 当前操作的目标对象 + @param message 当前操作的消息内容 + @param extra 当前操作的附加信息 + @return 群组通知消息对象 + + @discussion 群组关系由开发者维护,所有的群组操作都由您的服务器自己管理和维护。 + 所以群组通知的操作名和目标对象、消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好UI显示即可。 + + * \~english + Initialize group notification messages. + + @param operation The current operation name of the group notification. + @param operatorUserId User ID of the user who initiated the current operation. + @param data The target object of the current operation. + @param message Message content of the current operation. + @param extra Additional information for the current operation. + @ return Group Notification message object. + + @ discussion Group relationships are maintained by developers, and all group operations are managed and maintained by your server. + Therefore, you can customize the operation name and target object, message content and extended information of the group notification, as long as your sender and receiver make a good UI display of the specific field content. + */ ++ (instancetype)notificationWithOperation:(NSString *)operation + operatorUserId:(NSString *)operatorUserId + data:(NSString *)data + message:(NSString *)message + extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptInfoV2.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptInfoV2.h new file mode 100644 index 0000000..d8172b8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptInfoV2.h @@ -0,0 +1,48 @@ +// +// RCGroupReadReceiptInfoV2.h +// RongIMLibCore +// +// Created by RongCloud on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCGroupMessageReaderV2.h" +@interface RCGroupReadReceiptInfoV2 : NSObject +/** + * \~chinese + 是否已经发送回执 + + * \~english + Whether a receipt has been sent + */ +@property (nonatomic, assign) BOOL hasRespond; + +/*! + * \~chinese + 发送回执的用户 ID 列表 + + * \~english + ID list of users who send receipts + */ +@property (nonatomic, strong) NSArray *readerList; + +/** + * \~chinese + * 已读人数 + * + * \~english + * Number of people read + */ +@property (nonatomic, assign) int readCount; + +/** + * \~chinese + * 群内总人数 + * + * \~english + * Total number of people in the group + */ +@property (nonatomic, assign) int totalCount; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Manager.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Manager.h new file mode 100644 index 0000000..6bf9122 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Manager.h @@ -0,0 +1,90 @@ +// +// RCGroupReadReceiptV2Manager.h +// RongIMLibCore +// +// Created by RongCloud on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCGroupMessageReaderV2.h" +#import "RCMessage.h" +#import "RCGroupReadReceiptV2Protocol.h" +@interface RCGroupReadReceiptV2Manager : NSObject +/*! + * \~chinese + 获取单例类 + + * \~english + Get singleton class. + */ ++ (instancetype)sharedManager; + +/*! + * \~chinese + 群已读回执代理 + + * \~english + Group read receipt agent + */ +@property (nonatomic, weak) id groupReadReceiptV2Delegate; + +/*! + * \~chinese + 发送阅读回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param messageList 已经阅读了的消息列表 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 当用户阅读了需要阅读回执的消息,可以通过此接口发送阅读回执,消息的发送方即可直接知道那些人已经阅读。 + + @remarks 高级功能 + + * \~english + Send a reading receipt. + + @param conversationType Conversation type + @param targetId conversation ID. + @param channelId Business identity of the conversation to which it belongs. + @param messageList List of messages that have been read. + @param successBlock Callback for successful sending + @param errorBlock Callback for failed sending [nErrorCode: Error code of failure] + + @ discussion when a user reads a message that needs to be read, you can send a reading receipt through this interface, and the sender of the message can directly know who has read it. + + @ remarks advanced functions + */ +- (void)sendReadReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageList:(NSArray *)messageList + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 获取群消息已读用户列表 + + @param message 消息体 + @param successBlock 同步成功的回调 + @param errorBlock 同步失败的回调[nErrorCode: 失败的错误码] + + @remarks 高级功能 + + * \~english + Get group message read user list. + + @param message Message body. + @param successBlock Callback for successful synchronization. + @param errorBlock Callback for failed synchronization [nErrorCode: Error code of failure]. + + @ remarks Advanced functions + */ +- (void)getGroupMessageReaderList:(RCMessage *)message + success:(void (^)(NSArray *readerList, int totalCount))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Protocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Protocol.h new file mode 100644 index 0000000..8b50bc9 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Protocol.h @@ -0,0 +1,42 @@ +// +// RCGroupReadReceiptV2Protocol.h +// RongIMLibCore +// +// Created by RongCloud on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#ifndef RCGroupReadReceiptV2Protocol_h +#define RCGroupReadReceiptV2Protocol_h + +@protocol RCGroupReadReceiptV2Delegate + +/*! + * \~chinese + 消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数) + @param conversationType conversationType + @param targetId targetId + @param channelId 所属会话的业务标识 + @param messageUId 请求已读回执的消息ID + @param readCount 已读用户数 + @param totalCount 群内总用户数 + + * \~english + Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId). + @param conversationType ConversationType + @param targetId TargetId + @param channelId Business identity of the conversation to which it belongs + @param messageUId Message ID requesting read receipt + @param readCount Number of read users + @param totalCount Total number of users in the group + */ +- (void)onMessageReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageUId:(NSString *)messageUId + readCount:(int)readCount + totalCount:(int)totalCount; + +@end + +#endif /* RCGroupReadReceiptV2Protocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCHQVoiceMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCHQVoiceMessage.h new file mode 100644 index 0000000..35f2fc9 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCHQVoiceMessage.h @@ -0,0 +1,68 @@ +// +// RCHQVoiceMessage.h +// RongIMLib +// +// Created by Zhaoqianyu on 2019/5/16. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 高清语音消息类型名 + + * \~english + HD voice message type name + */ +#define RCHQVoiceMessageTypeIdentifier @"RC:HQVCMsg" + +NS_ASSUME_NONNULL_BEGIN +/*! + * \~chinese + 高清语音消息类 + + @discussion 高清语音消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + High definition voice message class. + + @ discussion HD voice message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCHQVoiceMessage : RCMediaMessageContent + +/*! + * \~chinese + 语音消息的时长,以秒为单位 + + * \~english + The duration of the voice message, in seconds + */ +@property (nonatomic, assign) long duration; + +/*! + * \~chinese + 初始化高清语音消息 + + @param localPath 语音的本地路径 + @param duration 语音时长,以秒为单位 + + @return 语音消息对象 + + * \~english + Initialize HD voice messages. + + @param localPath Local path of voice + @param duration Voice duration in seconds + + @ return voice message object + */ ++ (instancetype)messageWithPath:(NSString *)localPath duration:(long)duration; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCHistoryMessageOption.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCHistoryMessageOption.h new file mode 100644 index 0000000..7a74e8b --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCHistoryMessageOption.h @@ -0,0 +1,64 @@ +// +// RCHistoryMessageOption.h +// RongIMLibCore +// +// Created by RongCloud on 2021/4/20. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import + +/** + * \~chinese + 拉取顺序 + RCHistoryMessageOrderDesc - 降序 + RCHistoryMessageOrderAsc - 升序 + + * \~english + Pull sequence. + RCHistoryMessageOrderDesc-descending. + RCHistoryMessageOrderAsc-ascending order. + */ +typedef enum : NSUInteger { + RCHistoryMessageOrderDesc = 0, + RCHistoryMessageOrderAsc, +} RCHistoryMessageOrder; + +@interface RCHistoryMessageOption : NSObject +/** + * \~chinese + 起始的消息发送时间戳,毫秒 + 默认 0 + + * \~english + Initial message sending timestamp, millisecond. + Default 0. + */ +@property (nonatomic, assign) long long recordTime; + +/** + * \~chinese + 需要获取的消息数量, 0 < count <= 20 + 默认 0 + + * \~english + The number of messages to be obtained, 0 < count < = 20. + Default 0. + */ +@property (nonatomic, assign) NSInteger count; + +/** + * \~chinese + 拉取顺序 + RCRemoteHistoryOrderDesc: 降序,结合传入的时间戳参数,获取 recordtime 之前的消息 + RCRemoteHistoryOrderAsc: 升序,结合传入的时间戳参数,获取 recordtime 之后的消息 + 默认降序 + + * \~english + Pull sequence. + RCRemoteHistoryOrderDesc: Descending order, the passed timestamp parameters are combined to get the messages before recordtime. + RCRemoteHistoryOrderAsc: Ascending order, the passed timestamp parameters are combined to get the message after recordtime + Default descending order. + */ +@property (nonatomic, assign) RCHistoryMessageOrder order; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCIMClientProtocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCIMClientProtocol.h new file mode 100644 index 0000000..6ce97d4 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCIMClientProtocol.h @@ -0,0 +1,529 @@ +// +// RCIMClientProtocol.h +// RongIMLib +// +// Created by LiFei on 2020/4/29. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#ifndef RCIMClientProtocol_h +#define RCIMClientProtocol_h + +@class RCMessage; +@class RCConversationStatusInfo; + +#pragma mark - RCIMClientReceiveMessageDelegate + +/*! + * \~chinese + IMlib消息接收的监听器 + + @discussion + 设置IMLib的消息接收监听器请参考RCIMClient的setReceiveMessageDelegate:object:方法。 + + @warning 如果您使用IMlib,可以设置并实现此Delegate监听消息接收; + 如果您使用IMKit,请使用RCIM中的RCIMReceiveMessageDelegate监听消息接收,而不要使用此监听器,否则会导致IMKit中无法自动更新UI! + + * \~english + Listeners for IMlib message reception. + + @ discussion + To set the message receiving listener for IMLib, please refer to the setReceiveMessageDelegate:object: method of RCIMClient. + + @ warning If you use IMlib, you can set and implement this Delegate to listen to message reception. + If you use IMKit, use RCIMReceiveMessageDelegate in RCIM to listen to message reception instead of using this listener, otherwise you will not be able to update UI automatically in IMKit! + */ +@protocol RCIMClientReceiveMessageDelegate + +/*! + * \~chinese + 接收消息的回调方法 + + @param message 当前接收到的消息 + @param nLeft 还剩余的未接收的消息数,left>=0 + @param object 消息监听设置的key值 + + @discussion 如果您设置了IMlib消息监听之后,SDK在接收到消息时候会执行此方法。 + 其中,left为还剩余的、还未接收的消息数量。比如刚上线一口气收到多条消息时,通过此方法,您可以获取到每条消息,left会依次递减直到0。 + 您可以根据left数量来优化您的App体验和性能,比如收到大量消息时等待left为0再刷新UI。 + object为您在设置消息接收监听时的key值。 + + * \~english + Callback method for receiving messages. + + @param message Messages currently received. + @param nLeft The number of unreceived messages left, left > = 0. + @param object The key value of the message listening setting. + + @ discussion If you have set IMlib message listening, SDK will execute this method when it receives a message. + Where left is the number of messages that have not yet been received. For example, when you receive multiple messages upon being online, you can get each message in this way, and the left will decrease to 0 in turn. + You can optimize your App experience and performance based on the number of left, e.g. waiting for left to be 0 before refreshing UI when you receive a large number of messages. + Object is the key value that you set when the message is received and listeninged. + */ +- (void)onReceived:(RCMessage *)message left:(int)nLeft object:(id)object; + +@optional + +/** + * \~chinese + 接收消息的回调方法 + + @param message 当前接收到的消息 + @param nLeft 还剩余的未接收的消息数,left>=0 + @param object 消息监听设置的key值 + @param offline 是否是离线消息 + @param hasPackage SDK 拉取服务器的消息以包(package)的形式批量拉取,有 package 存在就意味着远端服务器还有消息尚未被 SDK + 拉取 + @discussion 和上面的 - (void)onReceived:(RCMessage *)message left:(int)nLeft object:(id)object 功能完全一致,额外把 + offline 和 hasPackage 参数暴露,开发者可以根据 nLeft、offline、hasPackage 来决定何时的时机刷新 UI ;建议当 hasPackage=0 + 并且 nLeft=0 时刷新 UI + @warning 如果使用此方法,那么就不能再使用 RCIM 中 - (void)onReceived:(RCMessage *)message left:(int)nLeft + object:(id)object 的使用,否则会出现重复操作的情形 + + * \~english + Callback method for receiving messages. + + @param message Messages currently received. + @param nLeft The number of unreceived messages left, left > = 0. + @param object The key value of the message listening setting. + @param offline Is it an offline message? + @param hasPackage Messages from the SDK pull server are pulled in batches in the form of packet (package). The presence of package means that there are still messages on the remote server that have not been SDK. + Pull. + @ discussion It is exactly the same as the above-(void) onReceived: (RCMessage *) message left: (int) nLeft object: (id) object function, add. + Offline and hasPackage parameters are exposed, and developers can decide when to refresh UI based on nLeft, offline and hasPackage. It is recommended that when hasPackage=0. + And refresh UI when nLeft=0. + @ warning If you use this method, you can no longer use-(void) onReceived: (RCMessage *) message left: (int) nLeft in RCIM. + The use of object: (id) object, otherwise the operation will be repeated. + */ +- (void)onReceived:(RCMessage *)message + left:(int)nLeft + object:(id)object + offline:(BOOL)offline + hasPackage:(BOOL)hasPackage; + +/*! + * \~chinese + 消息被撤回的回调方法 + + @param messageId 被撤回的消息ID + + @discussion 被撤回的消息会变更为RCRecallNotificationMessage,App需要在UI上刷新这条消息。 + + * \~english + Callback method for recalled message. + + @param messageId recalled message ID. + + @ discussion The message that is recalled will be changed to the RCrecallNotificationMessage and App shall refresh it on the UI. + */ +- (void)onMessageRecalled:(long)messageId __deprecated_msg("Use messageDidRecall:");; + +/*! + * \~chinese + 消息被撤回的回调方法 + + @param message 被撤回的消息 + + @discussion 被撤回的消息会变更为RCRecallNotificationMessage,App需要在UI上刷新这条消息。 + @discussion 和上面的 - (void)onMessageRecalled:(long)messageId 功能完全一致,只能选择其中一个使用。 + + * \~english + Callback method in which the message is recalled. + + @param message recalled news. + + @ discussion The message that is recalled will be changed to the RCrecallNotificationMessage and App shall refresh this message on the UI. + @ discussion It is exactly the same as the-(void) onMessageRecalled: (long) messageId function above, so you can only choose one to use. + */ +- (void)messageDidRecall:(RCMessage *)message; + +/*! + * \~chinese + 请求消息已读回执(收到需要阅读时发送回执的请求,收到此请求后在会话页面已经展示该 messageUId 对应的消息或者调用 + getHistoryMessages 获取消息的时候,包含此 messageUId 的消息,需要调用 sendMessageReadReceiptResponse + 接口发送消息阅读回执) + + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + + * \~english + Request message read receipt (received a request to send a receipt when you shall read, after receiving this request, the corresponding message of the messageUId has been displayed on the conversation page or called. + When getHistoryMessages Get the message, you shall call sendMessageReadReceiptResponse to include the message of this messageUId. + Interface to send messages to read receipt). + + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + */ +- (void)onMessageReceiptRequest:(RCConversationType)conversationType + targetId:(NSString *)targetId + messageUId:(NSString *)messageUId; + + +/*! + * \~chinese + 消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数) + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + @param userIdList 已读userId列表 + + * \~english + Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId). + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + @param userIdList Read userId list. + */ +- (void)onMessageReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + messageUId:(NSString *)messageUId + readerList:(NSMutableDictionary *)userIdList; + + +@end + +#pragma mark - RCConnectionStatusChangeDelegate + +/*! + * \~chinese + IMLib连接状态的的监听器 + + @discussion + 设置IMLib的连接状态监听器,请参考RCIMClient的setRCConnectionStatusChangeDelegate:方法。 + + @warning 如果您使用IMLib,可以设置并实现此Delegate监听连接状态变化; + 如果您使用IMKit,请使用RCIM中的RCIMConnectionStatusDelegate监听消息接收,而不要使用此监听器,否则会导致IMKit中无法自动更新UI! + + * \~english + Listeners for IMLib connection status + + @ discussion + To set the connection status listener of IMLib, please refer to the setRCConnectionStatusChangeDelegate: method of RCIMClient. + + @ warning If you use IMLib, you can set and implement this Delegate to listen to connection status changes. + If you use IMKit, use RCIMConnectionStatusDelegate in RCIM to listen to message reception instead of using this listener, otherwise you will not be able to update UI automatically in IMKit! + */ +@protocol RCConnectionStatusChangeDelegate + +/*! + * \~chinese + IMLib连接状态的的监听器 + + @param status SDK与融云服务器的连接状态 + + @discussion 如果您设置了IMLib消息监听之后,当SDK与融云服务器的连接状态发生变化时,会回调此方法。 + + * \~english + Listeners for IMLib connection status + + @param status Connection status between SDK and CVM. + + @ discussion If you set IMLib message listening, this method will be called back when the connection status between SDK and the cloud server changes. + */ +- (void)onConnectionStatusChanged:(RCConnectionStatus)status; + +@end + +#pragma mark - RCTypingStatusDelegate + +/*! + * \~chinese + IMLib输入状态的的监听器 + + @discussion 设置IMLib的输入状态监听器,请参考RCIMClient的 setRCTypingStatusDelegate:方法。 + + @warning + 如果您使用IMLib,可以设置并实现此Delegate监听消息输入状态;如果您使用IMKit,请直接设置RCIM中的 + enableTypingStatus,而不要使用此监听器,否则会导致IMKit中无法自动更新UI! + + * \~english + Listeners for IMLib input status + + @ discussion Set the input status listener of IMLib. Please refer to the setRCTypingStatusDelegate: method of RCIMClient. + + @ warning + If you use IMLib, you can set and implement this Delegate listening message input status; if you use IMKit, please directly set the. + EnableTypingStatus, instead of using this listener, otherwise the UI cannot be updated automatically in IMKit! + */ +@protocol RCTypingStatusDelegate + +/*! + * \~chinese + 用户输入状态变化的回调 + + @param conversationType 会话类型 + @param targetId 会话目标ID + @param userTypingStatusList 正在输入的RCUserTypingStatus列表(nil标示当前没有用户正在输入) + + @discussion + 当客户端收到用户输入状态的变化时,会回调此接口,通知发生变化的会话以及当前正在输入的RCUserTypingStatus列表。 + + @warning 目前仅支持单聊。 + + * \~english + Callback for user input status change. + + @param conversationType Conversation type + @param targetId conversation destination ID. + @param userTypingStatusList List of RCUserTypingStatus being entered (nil indicates that no user is currently entering). + + @ discussion + When the client receives a change in the status of the user's input, it calls back this interface to notify the changed conversation and the RCUserTypingStatus list currently being entered. + + @ warning Currently only support single chat. + */ +- (void)onTypingStatusChanged:(RCConversationType)conversationType + targetId:(NSString *)targetId + status:(NSArray *)userTypingStatusList; + +@end + +#pragma mark - RCLogInfoDelegate +/*! + * \~chinese + IMLib日志的监听器 + + @discussion + 设置IMLib日志的监听器,请参考RCIMClient的setRCLogInfoDelegate:方法。 + + @discussion 您可以通过logLevel来控制日志的级别。 + + * \~english + Listeners for IMLib logs. + + @ discussion + To set the listener for IMLib logs, please refer to the setRCLogInfoDelegate: method of RCIMClient. + + @ discussion You can control the level of logs through logLevel. + */ +@protocol RCLogInfoDelegate + +/*! + * \~chinese + IMLib日志的回调 + + @param logInfo 日志信息 + + * \~english + Callback for IMLib log. + + @param logInfo Log information. + */ +- (void)didOccurLog:(NSString *)logInfo; + +@end + +#pragma mark - RCMessageDestructDelegate + +/** + * \~chinese + IMLib阅后即焚监听器 + @discussion 设置代理请参考 RCIMClient 的 setRCMessageDestructDelegate: 方法。 + + * \~english + IMLib burns listener after reading. + @ discussion Set the proxy. Please refer to RCIMClient's setRCMessageDestructDelegate:. Method. + */ +@protocol RCMessageDestructDelegate + +/** + * \~chinese + 消息正在焚烧 + + @param message 消息对象 + @param remainDuration 剩余焚烧时间 + + * \~english + The news is burning. + + @param message Message object. + @param remainDuration Remaining burning time. + */ +- (void)onMessageDestructing:(RCMessage *)message remainDuration:(long long)remainDuration; + +@end + +#pragma mark - RCConversationDelegate + +@protocol RCConversationDelegate + +- (void)conversationDidSync; + +@end + +#pragma mark - RCConversationStatusChangeDelegate + +/** + * \~chinese + IMLib 会话状态同步监听器 + @discussion 设置代理请参考 RCIMClient 的 setRCConversationStatusChangeDelegate: 方法。 + + * \~english + IMLib conversation state synchronization listener. + @ discussion For proxy setting, please refer to RCIMClient's setRCConversationStatusChangeDelegate:. Method. + */ +@protocol RCConversationStatusChangeDelegate + +/** + * \~chinese + IMLib 会话状态同步的回调 + + @param conversationStatusInfos 改变过的会话状态的数组 + + * \~english + Callback for IMLib conversation state synchronization. + + @param conversationStatusInfos An array of changed conversation states. + */ +- (void)conversationStatusDidChange:(NSArray *)conversationStatusInfos; + +@end + +#pragma mark - RCMessageExpansionDelegate +/** + * \~chinese + 消息扩展内容变化回调 + @discussion 设置代理请参考 RCIMClient 的 messageExpansionDelegate 方法 + @discussion 代理回调在非主线程 + + * \~english + Callback for message extension content change. + @ discussion To set the proxy, please refer to the messageExpansionDelegate method of RCIMClient. + @ discussion Proxy callback on non-main thread. + */ +@protocol RCMessageExpansionDelegate +/** + * \~chinese + 消息扩展信息更改的回调 + + @param expansionDic 消息扩展信息中更新的键值对 + @param message 消息 + + @discussion expansionDic 只包含更新的键值对,不是全部的数据。如果想获取全部的键值对,请使用 message 的 expansionDic 属性。 + + * \~english + Callback for message extension information change. + + @param expansionDic Updated key-value pairs in message extension information. + @param message Message. + + @ discussion expansionDic contains only updated key-value pairs, not all data. If you want to get all the key-value pairs, use the expansionDic property of message. +*/ +- (void)messageExpansionDidUpdate:(NSDictionary *)expansionDic + message:(RCMessage *)message; + +/** + * \~chinese + 消息扩展信息删除的回调 + + @param keyArray 消息扩展信息中删除的键值对 key 列表 + @param message 消息 + + * \~english + Callback for message extension information deletion. + + @param keyArray The key list of key-value pairs deleted in the message extension information. + @param message Message. +*/ +- (void)messageExpansionDidRemove:(NSArray *)keyArray + message:(RCMessage *)message; + +@end + +#pragma mark - RCMessageInterceptor + +/** + * \~chinese + 消息拦截器 + + * \~english + Message interceptor + */ +@protocol RCMessageInterceptor + +@optional + +/** + * \~chinese + 上传多媒体内容之前的回调 + + @param message 待上传的多媒体消息 + @return 处理后的消息 + @discussion 如果返回的 message 或 message.content 为 nil,该条消息不会上传到服务,状态设置为 SentStatus_FAILED, 并回调失败 + + * \~english + Callback before uploading multimedia content. + + @param message Multimedia messages to be uploaded. + @ return processed message. + @ discussion If the returned message or message.content is nil, the message will not be uploaded to the service, the status is set to SentStatus_FAILED, and the callback fails. + */ +- (RCMessage *)mediaMessageWillUpload:(RCMessage *)message; + +/** + * \~chinese + 消息保存到数据库,发送到服务前调用此回调 + + @param message 待发送的消息 + @return 处理后的消息 + @discussion 如果返回的 message 或 message.content 为 nil,该条消息不会上传到服务,状态设置为 SentStatus_FAILED, 并回调失败 + + * \~english + The message is saved to the database and this callback is called before it is sent to the service. + + @param message Messages to be sent. + @ return processed message. + @ discussion If the returned message or message.content is nil, the message will not be uploaded to the service, the status is set to SentStatus_FAILED, and the callback fails. + */ +- (RCMessage *)messageWillSendAfterDB:(RCMessage *)message; + +/** + * \~chinese + 接收到消息准备入库前的回调,开发者可以通过此回调对消息进行自定义处理。 + + @param message 待入库的消息 + @return 处理后的消息,SDK 会将返回的消息入库并通过 RCIMClientReceiveMessageDelegate 的 onReceived 方法回调给上层 + @discussion 如果返回的 message 或 message.content 为 nil, RCIMClientReceiveMessageDelegate 的 onReceived 方法会将待入库的消息回调给上层 + + * \~english + After receiving the callback before the message is ready for storage, the developer can customize the processing of the message through this callback. + + @param message Messages waiting for storage. + @ return For the processed messages, SDK will store the returned messages into the library and call back to the upper layer through the onReceived method of RCIMClientReceiveMessageDelegate. + @ discussion If the returned message or the onReceived method whose message.content is nil, RCIMClientReceiveMessageDelegate will call back the message to be stored in the upper layer. + */ +- (RCMessage *)messageDidReceiveBeforeDB:(RCMessage *)message; + +@end + +#pragma mark - RCDownloadInterceptor + +/** + * \~chinese + 媒体文件下载拦截器 + + * \~english + Media file download interceptor + */ +@protocol RCDownloadInterceptor + +/** + * \~chinese + 下载前的回调 + + @param request request 请求 + @return request 请求,返回值不能为 nil,否则无法正常下载 + + * \~english + Callback before download. + + @param request Request request. + @ return request, the returned value cannot be nil, otherwise it cannot be downloaded normally. + */ +- (NSMutableURLRequest *)onDownloadRequest:(NSMutableURLRequest *)request; + +@end + +#endif /* RCIMClientProtocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCImageCompressConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCImageCompressConfig.h new file mode 100644 index 0000000..a28e030 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCImageCompressConfig.h @@ -0,0 +1,45 @@ +// +// RCImageCompressConfig.h +// RongIMLibCore +// +// Created by liyan on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCImageCompressConfig : NSObject + +/*! + * \~chinese + 缩略图最大尺寸 + + * \~english + Maximum size of thumbnail + */ +@property (nonatomic, assign) CGFloat maxSize; + +/*! + * \~chinese + 缩略图最小尺寸 + + * \~english + Minimum size of thumbnail + */ +@property (nonatomic, assign) CGFloat minSize; + +/*! + * \~chinese + 缩略图质量压缩比 + * + * \~english + Thumbnail mass compression ratio + */ +@property (nonatomic, assign) CGFloat quality; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCImageMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCImageMessage.h new file mode 100644 index 0000000..384ab55 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCImageMessage.h @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCImageMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMediaMessageContent.h" +#import + +/*! + * \~chinese + 图片消息的类型名 + + * \~english + The type name of the image message + */ +#define RCImageMessageTypeIdentifier @"RC:ImgMsg" + +/*! + * \~chinese + 图片消息类 + + @discussion 图片消息类,此消息会进行存储并计入未读消息数。 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @remarks 内容类消息 + + * \~english + Image message class. + + @ discussion image message class, which is stored and counted as unread messages. + + @ discussion If you want to send the original image, set the property full to YES. + + @ remarks content class message. + */ +@interface RCImageMessage : RCMediaMessageContent + +/*! + * \~chinese + 图片消息的 URL 地址 + + @discussion 发送方此字段为图片的本地路径,接收方此字段为网络 URL 地址。 + + * \~english + URL address of the image message. + + @ discussion sender this field is the local path of the image, and receiver this field is the network URL address. + */ +@property (nonatomic, copy) NSString *imageUrl; + +/*! + * \~chinese + 图片的本地路径 + + * \~english + The local path of the image. + */ +@property (nonatomic, copy) NSString *localPath; + +/*! + * \~chinese + 图片消息的缩略图 + + * \~english + A thumbnail of a image message. + */ +@property (nonatomic, strong) UIImage *thumbnailImage; + +/*! + * \~chinese + 是否发送原图 + + @discussion 在发送图片的时候,是否发送原图,默认值为 NO。 + + * \~english + Whether to send the original image or not. + + @ discussion Whether to send the original image or not when sending the image. The default value is NO. + */ +@property (nonatomic, getter=isFull) BOOL full; + +/*! + * \~chinese + 图片消息的附加信息 + + * \~english + Additional information for image messages. + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese + 图片消息的原始图片信息 + + * \~english + The original image information of the image message. + */ +@property (nonatomic, strong) UIImage *originalImage; + +/*! + * \~chinese + 图片消息的原始图片信息 + + * \~english + The original image information of the image message. + */ +@property (nonatomic, strong, readonly) NSData *originalImageData; + +/*! + * \~chinese + 初始化图片消息 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @param image 原始图片 + @return 图片消息对象 + + * \~english + Initialize image message. + + @ discussion If you want to send the original image, set the property full to YES. + + @param image Original image. + @ return image message object. + */ ++ (instancetype)messageWithImage:(UIImage *)image; + +/*! + * \~chinese + 初始化图片消息 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @param imageURI 图片的本地路径 + @return 图片消息对象 + + * \~english + Initialize image message. + + @ discussion If you want to send the original image, set the property full to YES. + + @param imageURI The local path of the image. + @ return image message object. + */ ++ (instancetype)messageWithImageURI:(NSString *)imageURI; + +/*! + * \~chinese + 初始化图片消息 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @param imageData 图片的原始数据 + @return 图片消息对象 + + * \~english + Initialize image message. + + @ discussion If you want to send the original image, set the property full to YES. + + @param imageData The original data of the image. + @ return image message object + */ ++ (instancetype)messageWithImageData:(NSData *)imageData; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCInformationNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCInformationNotificationMessage.h new file mode 100644 index 0000000..b8fcea8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCInformationNotificationMessage.h @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCInformationNotificationMessage.h +// Created by xugang on 14/12/4. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 通知消息的类型名 + + * \~english + The type name of the notification message + */ +#define RCInformationNotificationMessageIdentifier @"RC:InfoNtf" + +/*! + * \~chinese + 通知消息类 + + @discussion 通知消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Notification message class. + + @ discussion notification message class that this message is stored but does not count as the number of unread messages. + + @ remarks notification message + */ +@interface RCInformationNotificationMessage : RCMessageContent + +/*! + * \~chinese + 通知的内容 + + * \~english + The content of the notice + */ +@property (nonatomic, copy) NSString *message; + +/*! + * \~chinese + 初始化通知消息 + + @param message 通知的内容 + @param extra 通知的附加信息 + @return 通知消息对象 + + * \~english + Initialize notification message. + + @param message The content of the notice. + @param extra Additional information for notification. + @ return Notification message object. + */ ++ (instancetype)notificationWithMessage:(NSString *)message extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMediaMessageContent.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMediaMessageContent.h new file mode 100644 index 0000000..296debd --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMediaMessageContent.h @@ -0,0 +1,56 @@ +// +// RCMediaMessageContent.h +// RongIMLib +// +// Created by lichenfeng on 2018/11/22. +// Copyright © 2018 RongCloud. All rights reserved. +// + +#import "RCMessageContent.h" + +/** + * \~chinese + 媒体类型消息的父类 + + @discussion + SDK 中所有媒体类型消息(图片、文件等)均继承此类。 + 开发者如需将自定义的媒体类型消息上传到融云默认的服务器时必须继承此类 ( SDK 负责媒体消息的上传及上传成功后的发送,开发者自行处理消息接收后的展示) 。 + 以下属性需要子类在 encode、decode 方法中和扩展的属性一同进行处理 + + * \~english + The parent class of the media type message. + + @ discussion + All media type messages (images, files, and so on) in SDK inherit this class. + Developers who shall upload custom media type messages to RongCloud's default server must inherit this class (SDK is responsible for uploading and sending media messages successfully, and developers handle the display after receiving messages). + The following properties shall be processed by subclasses in the encode and decode methods along with the extended properties. + */ +@interface RCMediaMessageContent : RCMessageContent + +/** + * \~chinese + 媒体内容的本地路径(此属性必须有值) + + * \~english + The local path to the media content (this property must have a value). + */ +@property (nonatomic, copy) NSString *localPath; + +/** + * \~chinese + 媒体内容上传服务器后的网络地址(上传成功后 SDK 会为该属性赋值) + + * \~english + The network address after the media content is uploaded to the server (SDK will assign a value to this attribute after the upload is successful). + */ +@property (nonatomic, copy) NSString *remoteUrl; + +/** + * \~chinese + 媒体内容的文件名(如不传使用 SDK 中 downloadMediaMessage 方法下载后会默认生成一个名称) + + * \~english + The file name of the media content (if not passed, a name will be generated by default after downloading using the downloadMediaMessage method in SDK). + */ +@property (nonatomic, copy) NSString *name; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMentionedInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMentionedInfo.h new file mode 100644 index 0000000..35c338a --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMentionedInfo.h @@ -0,0 +1,84 @@ +// +// RCMentionedInfo.h +// RongIMLib +// +// Created by RongCloud on 16/7/6. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCStatusDefine.h" +#import + +/*! + * \~chinese + 消息中的 @ 提醒信息对象 + + * \~english + @ reminder information object in message + */ +@interface RCMentionedInfo : NSObject + +/*! + * \~chinese + @ 提醒的类型 + + * \~english + @ Type of reminder + */ +@property (nonatomic, assign) RCMentionedType type; + +/*! + * \~chinese + @ 的用户 ID 列表 + + @discussion 如果 type 是 @ 所有人,则可以传 nil + + * \~english + @ user ID list. + + @ discussion If type is @ all, you can pass nil. + */ +@property (nonatomic, strong) NSArray *userIdList; + +/*! + * \~chinese + 包含 @ 提醒的消息,本地通知和远程推送显示的内容 + + * \~english + Message containing @ reminder, local notifications, and content displayed by remote push. + */ +@property (nonatomic, copy) NSString *mentionedContent; + +/*! + * \~chinese + 是否 @ 了我 + + * \~english + Do you @ me? + */ +@property (nonatomic, readonly) BOOL isMentionedMe; + +/*! + * \~chinese + 初始化 @ 提醒信息 + + @param type @ 提醒的类型 + @param userIdList @ 的用户 ID 列表 + @param mentionedContent @ Push 内容 + + @return @ 提醒信息的对象 + + * \~english + Initialize @ reminder message. + + @param type @ Type of reminder + @param userIdList @ user ID list + @param mentionedContent @ Push content + + @ return @ the object of the reminder message + */ +- (instancetype)initWithMentionedType:(RCMentionedType)type + userIdList:(NSArray *)userIdList + mentionedContent:(NSString *)mentionedContent; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessage.h new file mode 100644 index 0000000..99667c8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessage.h @@ -0,0 +1,296 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#ifndef __RCMessage +#define __RCMessage +#import "RCMessageContent.h" +#import "RCReadReceiptInfo.h" +#import "RCStatusDefine.h" +#import +#import "RCMessageConfig.h" +#import "RCMessagePushConfig.h" +#import "RCGroupReadReceiptInfoV2.h" +/*! + * \~chinese + 消息实体类 + + @discussion 消息实体类,包含消息的所有属性。 + + * \~english + Message entity class. + + @ discussion message entity class, which contains all the properties of the message. + */ +@interface RCMessage : NSObject + +/*! + * \~chinese + 会话类型 + + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType conversationType; + +/*! + * \~chinese + 会话 ID + + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 所属会话的业务标识,长度限制 20 字符 + + * \~english + Business identification of the conversation to which it belongs, with a length limit of 20 characters. + */ +@property (nonatomic, copy) NSString *channelId; + +/*! + * \~chinese + 消息的 ID + + @discussion 本地存储的消息的唯一值(数据库索引唯一值) + + * \~english + ID of the message. + + @ discussion Unique value of locally stored message (unique value of database index). + */ +@property (nonatomic, assign) long messageId; + +/*! + * \~chinese + 消息的方向 + + * \~english + The direction of the message. + */ +@property (nonatomic, assign) RCMessageDirection messageDirection; + +/*! + * \~chinese + 消息的发送者 ID + + * \~english + The sender ID of the message + */ +@property (nonatomic, copy) NSString *senderUserId; + +/*! + * \~chinese + 消息的接收状态 + + * \~english + The receiving status of the message + */ +@property (nonatomic, assign) RCReceivedStatus receivedStatus; + +/*! + * \~chinese + 消息的发送状态 + + * \~english + The sending status of the message + */ +@property (nonatomic, assign) RCSentStatus sentStatus; + +/*! + * \~chinese + 消息的接收时间(Unix 时间戳、毫秒) + + * \~english + The time the message is received (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long receivedTime; + +/*! + * \~chinese + 消息的发送时间(Unix 时间戳、毫秒) + + * \~english + The time the message is sent (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long sentTime; + +/*! + * \~chinese + 消息的类型名 + + * \~english + The type name of the message + */ +@property (nonatomic, copy) NSString *objectName; + +/*! + * \~chinese + 消息的内容 + + * \~english + The content of the message + */ +@property (nonatomic, strong) RCMessageContent *content; + +/*! + * \~chinese + 消息的附加字段 + + * \~english + Additional fields of the message + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese + 全局唯一 ID + + @discussion 服务器消息唯一 ID(在同一个 Appkey 下全局唯一) + + * \~english + Globally unique ID. + + @ discussion server message unique ID (globally unique under the same Appkey). + */ +@property (nonatomic, copy) NSString *messageUId; + +/*! + * \~chinese + 阅读回执状态 + + * \~english + Reading receipt status + */ +@property (nonatomic, strong) RCReadReceiptInfo *readReceiptInfo; + +/*! + * \~chinese + 群阅读回执状态 + @discussion 如果是调用 RCGroupReadReceiptV2Manager 中方法实现群已读回执功能,此参数才有效,否则请使用 readReceiptInfo 属性获取阅读回执状态 + @discussion 如果使用 IMKit,请用 readReceiptInfo 属性 + + * \~english + Group reading receipt status. + @ discussion This parameter is valid only if you call the method in RCGroupReadReceiptV2Manager to implement the group read receipt function. Otherwise, use the readReceiptInfo attribute to obtain the read receipt status. + @ discussion use the readReceiptInfo attribute if you use IMKit, + */ +@property (nonatomic, strong) RCGroupReadReceiptInfoV2 *groupReadReceiptInfoV2; + +/*! + * \~chinese + 消息配置 + + * \~english + Message configuration + */ +@property (nonatomic, strong) RCMessageConfig *messageConfig; + +/*! + * \~chinese + 消息推送配置 + + * \~english + Message push configuration + */ +@property (nonatomic, strong) RCMessagePushConfig *messagePushConfig; + +/*! + * \~chinese + 是否是离线消息,只在接收消息的回调方法中有效,如果消息为离线消息,则为 YES ,其他情况均为 NO + + * \~english + Whether it is an offline message is only valid in the callback method that receives the message. If the message is offline, it is YES. Otherwise, it is NO. + */ +@property(nonatomic, assign) BOOL isOffLine; + +/*! + * \~chinese + 消息是否可以包含扩展信息 + + @discussion 该属性在消息发送时确定,发送之后不能再做修改 + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + + * \~english + Whether the message can contain extended information. + + @ discussion This property is determined when the message is sent and cannot be modified after it is sent. + @ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information. +*/ +@property (nonatomic, assign) BOOL canIncludeExpansion; + +/*! + * \~chinese + 消息扩展信息列表 + + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + @discussion 默认消息扩展字典 key 长度不超过 32 ,value 长度不超过 64 ,单次设置扩展数量最大为 20,消息的扩展总数不能超过 300 + + * \~english + Message extension information list. + + @ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information. + @ discussion Default message extension dictionary key length does not exceed 32, value length does not exceed 64, the maximum number of extensions for a single setting is 20, and the total number of message extensions cannot exceed 300. +*/ +@property (nonatomic, strong) NSDictionary *expansionDic; + +/*! + * \~chinese + RCMessage初始化方法 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param messageDirection 消息的方向 + @param content 消息的内容 + + * \~english + RCMessage initialization method. + + @ param conversationType conversation type. + @ param targetId conversation ID. + @ param messageDirection message direction + @ param content message content. + */ +- (instancetype)initWithType:(RCConversationType)conversationType + targetId:(NSString *)targetId + direction:(RCMessageDirection)messageDirection + content:(RCMessageContent *)content; + + +/*! + * \~chinese + RCMessage初始化方法(已废弃,请不要使用该接口构造消息发送) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param messageDirection 消息的方向 + @param messageId 消息的 ID(如果是发送该消息初始值请设置为 -1) + @param content 消息的内容 + + * \~english + RCMessage initialization method. + + @ param conversationType conversation type. + @ param targetId conversation ID. + @ param messageDirection message direction + @ param messageId message ID + @ param content message content. + */ +- (instancetype)initWithType:(RCConversationType)conversationType + targetId:(NSString *)targetId + direction:(RCMessageDirection)messageDirection + messageId:(long)messageId + content:(RCMessageContent *)content __deprecated_msg("Use initWithType:targetId:direction:content:"); +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessageConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessageConfig.h new file mode 100644 index 0000000..c29a206 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessageConfig.h @@ -0,0 +1,29 @@ +// +// RCMessageConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/6/29. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +@interface RCMessageConfig : NSObject + +/*! + * \~chinese + 是否关闭通知 + YES: 关闭通知(不发送通知) + NO: 不关闭通知(发送通知) + 默认 NO + + * \~english + Whether to turn off notification. + YES: Turn off notifications (do not send notifications). + NO: Do not turn off notification (send notification). + Default NO + */ +@property (nonatomic, assign) BOOL disableNotification; + +@end + diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessageContent.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessageContent.h new file mode 100644 index 0000000..2b8b194 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessageContent.h @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCMessageContent.h +// Created by Heq.Shinoda on 14-6-13. + +#ifndef __RCMessageContent +#define __RCMessageContent + +#import "RCMentionedInfo.h" +#import "RCStatusDefine.h" +#import "RCUserInfo.h" +#import + +/*! + * \~chinese + 消息内容的编解码协议 + + @discussion 用于标示消息内容的类型,进行消息的编码和解码。 + 所有自定义消息必须实现此协议,否则将无法正常传输和使用。 + + * \~english + Codec protocol for message content. + + @ discussion It is used to identify the type of message content and to encode and decode the message. + All custom messages must implement this protocol, otherwise they will not be transmitted and used properly. + */ +@protocol RCMessageCoding +@required + +/*! + * \~chinese + 将消息内容序列化,编码成为可传输的json数据 + + @discussion + 消息内容通过此方法,将消息中的所有数据,编码成为json数据,返回的json数据将用于网络传输。 + + * \~english + Serialize the message content and encode it into transportable json data. + + @ discussion + Through this method, the message content encodes all the data in the message into json data, and the returned json data will be used for network transmission. + */ +- (NSData *)encode; + +/*! + * \~chinese + 将json数据的内容反序列化,解码生成可用的消息内容 + + @param data 消息中的原始json数据 + + @discussion + 网络传输的json数据,会通过此方法解码,获取消息内容中的所有数据,生成有效的消息内容。 + + * \~english + Deserialize the contents of json data and decode them to generate available message content. + + @param data Raw json data in the message. + + @ discussion + The json data transmitted over the network will be decoded by this method, all the data in the message content will be obtained, and the valid message content will be generated. + */ +- (void)decodeWithData:(NSData *)data; + +/*! + * \~chinese + 返回消息的类型名 + + @return 消息的类型名 + + @discussion 您定义的消息类型名,需要在各个平台上保持一致,以保证消息互通。 + + @warning 请勿使用@"RC:"开头的类型名,以免和SDK默认的消息名称冲突 + + * \~english + Return the type name of the message. + + @ return Type name of message. + + @ discussion The name of the message type you defined shall be consistent across platforms to ensure message interoperability. + + @ warning Do not use a type name that begins with @ "RC:", so as not to conflict with the default message name of SDK. + */ ++ (NSString *)getObjectName; + +/*! + * \~chinese + 返回可搜索的关键内容列表 + + @return 返回可搜索的关键内容列表 + + @discussion 这里返回的关键内容列表将用于消息搜索,自定义消息必须要实现此接口才能进行搜索。 + + * \~english + Return a list of searchable key content. + + @ return Return a list of key content that can be searched. + + @ discussion The list of key content returned here will be used for message search, and custom messages must implement this interface before searching. + */ +- (NSArray *)getSearchableWords; +@end + +/*! + * \~chinese + 消息内容的存储协议 + + @discussion 用于确定消息内容的存储策略。 + 所有自定义消息必须实现此协议,否则将无法正常存储和使用。 + + * \~english + Storage protocol for message content. + + @ discussion It is used to determine the storage policy for the content of the message. + All custom messages must implement this protocol, otherwise they will not be stored and used properly. + */ +@protocol RCMessagePersistentCompatible +@required + +/*! + * \~chinese + 返回消息的存储策略 + + @return 消息的存储策略 + + @discussion 指明此消息类型在本地是否存储、是否计入未读消息数。 + + * \~english + Return the storage policy of the message. + + @ return Storage policy for messages. + + @ discussion It indicates whether this message type is stored locally and counted as unread messages. + */ ++ (RCMessagePersistent)persistentFlag; +@end + +/*! + * \~chinese + 消息内容摘要的协议 + + @discussion 用于在会话列表和本地通知中显示消息的摘要。 + + * \~english + Protocol for message content digest. + + @ discussion It is used to display a digest of messages in the conversation list and in local notifications. + */ +@protocol RCMessageContentView +@optional + +/*! + * \~chinese + 返回在会话列表和本地通知中显示的消息内容摘要 + + @return 会话列表和本地通知中显示的消息内容摘要 + + @discussion + 如果您使用IMKit,当会话的最后一条消息为自定义消息时,需要通过此方法获取在会话列表展现的内容摘要; + 当App在后台收到消息时,需要通过此方法获取在本地通知中展现的内容摘要。 + + * \~english + Return a digest of the message contents displayed in the conversation list and local notifications. + + @ return conversation list and digest of messages displayed in local notifications. + + @ discussion + If you use IMKit, when the last message of the conversation is a custom message, you shall use this method to get the digest of the content displayed in the conversation list. + When App receives a message in the background, it uses this method to obtain a digest of the content presented in the local notification. + */ +- (NSString *)conversationDigest; + +@end + +/*! + * \~chinese + 消息内容的基类 + + @discussion 此类为消息实体类 RCMessage 中的消息内容 content 的基类。 + 所有的消息内容均为此类的子类,包括 SDK 自带的消息(如 RCTextMessage、RCImageMessage 等)和用户自定义的消息。 + 所有的自定义消息必须继承此类,并实现 RCMessageCoding 和 RCMessagePersistentCompatible、RCMessageContentView 协议。 + + * \~english + The base class of the message content. + + @ discussion This class is the base class for the message content in the message entity class RCMessage. + All message contents are subclasses of this class, including messages that come with SDK (such as RCTextMessage, RCImageMessage, etc.) and user-defined messages. + All custom messages must inherit this class and implement the RCMessageCoding and RCMessagePersistentCompatible, RCMessageContentView protocols. + */ +@interface RCMessageContent : NSObject + +/*! + * \~chinese + 消息内容中携带的发送者的用户信息 + + @discussion + 如果您使用IMKit,可以通过RCIM的enableMessageAttachUserInfo属性设置在每次发送消息中携带发送者的用户信息。 + + * \~english + User information of the sender carried in the message content. + + @ discussion + If you use IMKit, you can set the enableMessageAttachUserInfo property of RCIM to carry the sender's user information in each message sent. + */ +@property (nonatomic, strong) RCUserInfo *senderUserInfo; + +/*! + * \~chinese + 消息中的 @ 提醒信息 + + * \~english + @ reminder message in message. + */ +@property (nonatomic, strong) RCMentionedInfo *mentionedInfo; + +/** + * \~chinese + 设置焚烧时间 + + @discussion 默认是 0,0 代表该消息非阅后即焚消息。 + + * \~english + Set burning time. + + @ discussion The default value is 0, which means that the message will be burned immediately after it is read. + */ +@property (nonatomic, assign) NSUInteger destructDuration; + +/*! + * \~chinese + 消息的附加信息 + + * \~english + Additional information for messages. + */ +@property (nonatomic, copy) NSString *extra; + +/** + * \~chinese + 将用户信息编码到字典中 + + @param userInfo 要编码的用户信息 + @return 存有用户信息的 Dictionary + + * \~english + Encode user information into a dictionary. + + @param userInfo User information to be encoded. + @ return Dictionary with user information. + */ +- (NSDictionary *)encodeUserInfo:(RCUserInfo *)userInfo; + +/*! + * \~chinese + 将消息内容中携带的用户信息解码 + + @param dictionary 用户信息的Dictionary + + * \~english + Decode the user information carried in the message content. + + @param dictionary Dictionary of user information. + */ +- (void)decodeUserInfo:(NSDictionary *)dictionary; + +/** + * \~chinese + 将@提醒信息编码到字典中 + + @param mentionedInfo 要编码的@信息 + @return 存有@信息的 Dictionary + + * \~english + Encode @ reminder information into the dictionary. + + @param mentionedInfo @ information to be encoded. + @ return Dictionary with @ information. + */ +- (NSDictionary *)encodeMentionedInfo:(RCMentionedInfo *)mentionedInfo; + +/*! + * \~chinese + 将消息内容中携带的@提醒信息解码 + + @param dictionary @提醒信息的Dictionary + + * \~english + Decode the @ reminder information carried in the message content. + + @param dictionary @ Dictionary of reminder messages. + */ +- (void)decodeMentionedInfo:(NSDictionary *)dictionary; + +/*! + * \~chinese + 消息内容的原始json数据 + + @discussion 此字段存放消息内容中未编码的json数据。 + SDK内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为nil。 + + * \~english + The original json data of the message content. + + @ discussion This field stores unencoded json data in the message content. + The message built into SDK. If the message decoding fails, the default will store the contents of the message in this field; if the encoding and decoding are normal, this field will be set to nil. + */ +@property (nonatomic, strong, setter=setRawJSONData:) NSData *rawJSONData; + +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessagePushConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessagePushConfig.h new file mode 100644 index 0000000..355bc0c --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCMessagePushConfig.h @@ -0,0 +1,135 @@ +// +// RCMessagePushConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/9/15. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +#import "RCiOSConfig.h" +#import "RCAndroidConfig.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RCMessagePushConfig : NSObject + +/*! + * \~chinese + 是否屏蔽通知标题 + YES: 不显示通知标题 + NO: 显示通知标题 + + @discussion 默认情况下融云单聊消息通知标题为用户名、群聊消息为群名称,设置后不会再显示通知标题。 + @discussion 此属性只针目标用户为 iOS 平台时有效,Android 第三方推送平台的通知标题为必填项,所以暂不支持。 + + * \~english + Whether to block the notification title. + YES: Do not display notification title. + NO: Show notification title. + + @ discussion By default, the notification title of RongCloud single chat message is user name, and the group chat message is group name. After setting, the notification title will no longer be displayed. + @ discussion This attribute is valid only when the target user is iOS platform. The notification title of Android third-party push platform is required, so it is not supported for the time being. + */ +@property (nonatomic, assign) BOOL disablePushTitle; + +/*! + * \~chinese + 推送标题 + 如果没有设置,会使用下面的默认标题显示规则 + 默认标题显示规则: + 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。 + 自定义消息:默认不显示标题。 + + * \~english + Push title. + If it is not set, the following default title is used to display the rule. + The default title display rules: + Built-in message: The single chat notification title is displayed as the sender name, and the group chat notification title is displayed as the group name. + Custom message: the title is not displayed by default. + */ +@property (nonatomic, copy) NSString *pushTitle; + +/*! + * \~chinese + 推送内容 + 优先使用 MessagePushConfig 的 pushContent,如果没有,则使用 sendMessage 或者 sendMediaMessage 的 pushContent。 + + * \~english + Push content + Give priority to pushContent for MessagePushConfig, if not, use pushContent for sendMessage or sendMediaMessage. + */ +@property (nonatomic, copy) NSString *pushContent; + +/*! + * \~chinese + 远程推送附加信息 + 优先使用 MessagePushConfig 的 pushData,如果没有,则使用 sendMessage 或者 sendMediaMessage 的 pushData。 + + * \~english + Remotely push additional information. + Give priority to pushData for MessagePushConfig, if not, use pushData for sendMessage or sendMediaMessage. + */ +@property (nonatomic, copy) NSString *pushData; + +/*! + * \~chinese + 是否强制显示通知详情 + 当目标用户通过 RCPushProfile 中的 updateShowPushContentStatus 设置推送不显示消息详情时,可通过此参数,强制设置该条消息显示推送详情。 + + * \~english + Whether to force the display of notification details. + When the target user does not display the message details through the updateShowPushContentStatus setting in RCPushProfile, you can use this parameter to force the message to display the push details. + */ +@property (nonatomic, assign) BOOL forceShowDetailContent; + +/*! + * \~chinese + 推送模板 ID,设置后根据目标用户通过 SDK RCPushProfile 中的 setPushLauguageCode 设置的语言环境,匹配模板中设置的语言内容进行推送,未匹配成功时使用默认内容进行推送,模板内容在“开发者后台-自定义推送文案”中进行设置。 + 注:RCMessagePushConfig 中的 Title 和 PushContent 优先级高于模板 ID(templateId)中对应的标题和推送内容。 + + * \~english + After the ID of the push template is set, the language content set in the template is matched according to the locale set by the target user through the setPushLauguageCode in SDK RCPushProfile. If the match is not successful, the default content is pushed. The template content is set in "developer backend-Custom push copy". + Note: The Title and PushContent in RCMessagePushConfig take precedence over the corresponding title and push content in the template ID (templateId). + */ +@property (nonatomic, copy) NSString *templateId; + +/*! + * \~chinese + iOS 平台相关配置 + + * \~english + Configuration related to iOS platform + */ +@property (nonatomic, strong) RCiOSConfig *iOSConfig; + +/*! + * \~chinese + Android 平台相关配置 + + * \~english + Configuration related to Android platform + */ +@property (nonatomic, strong) RCAndroidConfig *androidConfig; + +/*! + * \~chinese + 将数组转成 messagePushConfig 的 iOSConfig 和 AndroidConfig + + * \~english + Convert arrays to iOSConfig and AndroidConfig of messagePushConfig. + */ +- (instancetype)arrayToConfig:(NSArray *)array; + +/*! + * \~chinese + 将 iOSConfig 和 AndroidConfig 转成数组 + + * \~english + Convert iOSConfig and AndroidConfig to an array. + */ +- (NSArray *)encodeIOSAndAndroidConfig; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCProfileNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCProfileNotificationMessage.h new file mode 100644 index 0000000..96cb4b1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCProfileNotificationMessage.h @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCProfileNotificationMessage.h +// Created by xugang on 14/11/28. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 公众服务账号信息变更消息的类型名 + + * \~english + The type name of the public service account information change message. + */ +#define RCProfileNotificationMessageIdentifier @"RC:ProfileNtf" + +/*! + * \~chinese + 公众服务账号信息变更消息类 + + @discussion 公众服务账号信息变更消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Public service account information change message class. + + @ discussion public service account information change message class, which will be stored, but will not be counted as the number of unread messages. + + @ remarks notification message + */ +@interface RCProfileNotificationMessage : RCMessageContent + +/*! + * \~chinese + 公众服务账号信息变更的操作名 + + * \~english + The operation name of the change of public service account information. + */ +@property (nonatomic, copy) NSString *operation; + +/*! + * \~chinese + 信息变更的数据,可以为任意格式,如 json 数据。 + + * \~english + Data with changed information, which can be in any format, e.g. json data. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 初始化公众服务账号信息变更消息 + + @param operation 信息变更的操作名 + @param data 信息变更的数据 + @param extra 信息变更的附加信息 + @return 公众服务账号信息变更消息的对象 + + * \~english + Initialize public service account information change message. + + @param operation Operation name of information change. + @param data Information changed data. + @param extra Additional information for information changes. + @ return the object of the change message for the account information of the public service. + */ ++ (instancetype)notificationWithOperation:(NSString *)operation data:(NSString *)data extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCPushProfile.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCPushProfile.h new file mode 100644 index 0000000..dba2820 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCPushProfile.h @@ -0,0 +1,118 @@ +// +// RCPushProfile.h +// RongIMLib +// +// Created by RongCloud on 16/12/26. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCStatusDefine.h" +#import + +@interface RCPushProfile : NSObject + +/** + * \~chinese + 是否显示远程推送的内容 + + * \~english + Whether to display the content of remote push + */ +@property (nonatomic, assign, readonly) BOOL isShowPushContent; + +/** + * \~chinese + 远程推送的语言 + + * \~english + The language of remote push + */ +@property (nonatomic, assign, readonly) RCPushLauguage pushLauguage; + +/** + * \~chinese + 其他端在线时,手机是否接收远程推送(多个手机端登录,最后一个会接收) + + * \~english + Whether the mobile phone receives remote push when the other end is online (multiple mobile phones log in, the last one will receive it) + */ +@property (nonatomic, assign, readonly) BOOL receiveStatus; + +/** + * \~chinese + 设置是否显示远程推送的内容 + + @param isShowPushContent 是否显示推送的具体内容( YES 显示 NO 不显示) + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set whether to display the contents of remote push. + + @param isShowPushContent Whether to display the specific content of the push (YES display NO does not display). + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)updateShowPushContentStatus:(BOOL)isShowPushContent + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 设置推送内容的自然语言 + + @param pushLauguage 设置推送内容的自然语言 + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set the natural language of push content. + + @param pushLauguage Set the natural language of push content. + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)setPushLauguage:(RCPushLauguage)pushLauguage + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock __deprecated_msg("Use setPushLauguageCode:success:error"); + + +/** + * \~chinese + 设置推送内容的自然语言 + + @param lauguage 通过 SDK 设置的语言环境,语言缩写内容格式为 (ISO-639 Language Code)_(ISO-3166 Country Codes),如:zh_CN。目前融云支持的内置推送语言为 zh_CN、en_US、ar_SA + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set the natural language of push content. + + @param lauguage Through the locale set by SDK, the format of the language abbreviation content is (ISO-639 Language Code) _ (ISO-3166 Country Codes),) such as: zh_CN. Currently, the built-in push languages supported by RongCloud are zh_CN, en_US and ar_SA. + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)setPushLauguageCode:(NSString *)lauguage + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 设置 Web 端在线时,手机端是否接收推送 + + @param receiveStatus 是否接收推送( YES 接收 NO 不接收) + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set whether the mobile phone will receive push when the Web terminal is online. + + @param receiveStatus Whether to receive push or not (YES receive NO does not receive). + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)setPushReceiveStatus:(BOOL)receiveStatus + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCReadReceiptInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCReadReceiptInfo.h new file mode 100644 index 0000000..67cce5b --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCReadReceiptInfo.h @@ -0,0 +1,40 @@ +// +// RCReadReceiptInfo.h +// RongIMLib +// +// Created by RongCloud on 16/8/29. +// Copyright © 2016 RongCloud. All rights reserved. +// +#import "RCStatusDefine.h" +#import + +@interface RCReadReceiptInfo : NSObject + +/*! + * \~chinese + 是否需要回执消息 + + * \~english + Do you need a receipt message? + */ +@property (nonatomic, assign) BOOL isReceiptRequestMessage; + +/** + * \~chinese + 是否已经发送回执 + + * \~english + Whether a receipt has been sent + */ +@property (nonatomic, assign) BOOL hasRespond; + +/*! + * \~chinese + 发送回执的用户 ID 列表 + + * \~english + ID list of users who send receipts + */ +@property (nonatomic, strong) NSMutableDictionary *userIdList; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRecallNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRecallNotificationMessage.h new file mode 100644 index 0000000..3d21e22 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRecallNotificationMessage.h @@ -0,0 +1,89 @@ +// +// RCRecallNotificationMessage.h +// RongIMLib +// +// Created by litao on 16/7/15. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 撤回通知消息的类型名 + + * \~english + The type name of the recall notification message + */ +#define RCRecallNotificationMessageIdentifier @"RC:RcNtf" + +/*! + * \~chinese + 撤回通知消息类 + @discussion 撤回通知消息,此消息会进行本地存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Recall notification message class + @ discussion Recall notification message, which is stored locally, but does not count as the number of unread messages. + + @ remarks notification message + */ +@interface RCRecallNotificationMessage : RCMessageContent + +/*! + * \~chinese + 发起撤回操作的用户 ID + + * \~english + ID of the user who initiates the recall operation + */ +@property (nonatomic, copy) NSString *operatorId; + +/*! + * \~chinese + 撤回的时间(毫秒) + + * \~english + Time to recall (milliseconds) + */ +@property (nonatomic, assign) long long recallTime; + +/*! + * \~chinese + 原消息的消息类型名 + + * \~english + Message type name of the original message + */ +@property (nonatomic, copy) NSString *originalObjectName; + +/*! + * \~chinese + 是否是管理员操作 + + * \~english + Whether it is an administrator operation + */ +@property (nonatomic, assign) BOOL isAdmin; + +/*! + * \~chinese + 撤回的文本消息的内容 + + * \~english + The contents of the recalled text message +*/ +@property (nonatomic, copy) NSString *recallContent; + +/*! + * \~chinese + 撤回动作的时间(毫秒) + + * \~english + Time to recall the action (milliseconds). +*/ +@property (nonatomic, assign) long long recallActionTime; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCReferenceMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCReferenceMessage.h new file mode 100644 index 0000000..99c6112 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCReferenceMessage.h @@ -0,0 +1,69 @@ +// +// RCReferenceMessage.h +// RongIMLib +// +// Created by RongCloud on 2020/2/26. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +/*! + * \~chinese + 引用消息的类型名 + + * \~english + The type name of the reference message + */ +#define RCReferenceMessageTypeIdentifier @"RC:ReferenceMsg" +/*! + * \~chinese +引用消息类 + +@discussion 引用消息类,此消息会进行存储并计入未读消息数。 + +@remarks 内容类消息 + + * \~english + Reference message class. + + @ discussion reference message class, which is stored and counted as unread messages. + + @ remarks content class message. +*/ +@interface RCReferenceMessage : RCMessageContent +/*! + * \~chinese + 引用文本 + + * \~english + Reference text + */ +@property (nonatomic, strong) NSString *content; +/*! + * \~chinese + 被引用消息的发送者 ID + + * \~english + ID of the sender of the referenced message + */ +@property (nonatomic, strong) NSString *referMsgUserId; + +/*! + * \~chinese + 被引用消息体 + + * \~english + Referenced message body + */ +@property (nonatomic, strong) RCMessageContent *referMsg; + +/*! + * \~chinese + 被引用消息的 messageUId。服务器消息唯一 ID(在同一个 Appkey 下全局唯一) + + * \~english + messageUId of refered + */ +@property (nonatomic, strong) NSString *referMsgUid; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRemoteHistoryMsgOption.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRemoteHistoryMsgOption.h new file mode 100644 index 0000000..2e0f1fd --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRemoteHistoryMsgOption.h @@ -0,0 +1,93 @@ +// +// RCRemoteHistoryMsgOption.h +// RongIMLib +// +// Created by Zhaoqianyu on 2019/7/31. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +/** + * \~chinese + 拉取顺序 + RCRemoteHistoryOrderDesc - 降序 + RCRemoteHistoryOrderAsc - 升序 + + * \~english + Pull sequence. + RCRemoteHistoryOrderDesc-descending. + RCRemoteHistoryOrderAsc-ascending order. + */ +typedef enum : NSUInteger { + RCRemoteHistoryOrderDesc = 0, + RCRemoteHistoryOrderAsc, +} RCRemoteHistoryOrder; + +NS_ASSUME_NONNULL_BEGIN + +/** + * \~chinese + RCIMClient - getRemoteHistoryMessage 接口对应的参数选项 + + * \~english + Parameter options for RCIMClient-getRemoteHistoryMessage interface. + */ +@interface RCRemoteHistoryMsgOption : NSObject + +/** + * \~chinese + 起始的消息发送时间戳,毫秒 + 默认 0 + + * \~english + Initial message sending timestamp, millisecond. + Default 0. + */ +@property (nonatomic, assign) long long recordTime; + +/** + * \~chinese + 需要获取的消息数量, 0 < count <= 20 + 默认 0 + + * \~english + The number of messages to be obtained, 0 < count < = 20. + Default 0. + */ +@property (nonatomic, assign) NSInteger count; + +/** + * \~chinese + 拉取顺序 + RCRemoteHistoryOrderDesc: 降序,结合传入的时间戳参数,获取发送时间递增的消息 + RCRemoteHistoryOrderAsc: 升序,结合传入的时间戳参数,获取发送时间递减的消息 + 默认降序 + + * \~english + Pull sequence. + RCRemoteHistoryOrderDesc: Descending order, the passed timestamp parameters are combined to get messages with an increasing sending time. + RCRemoteHistoryOrderAsc: + Ascending order, the passed timestamp parameters are combiend to get the message with decreasing sending time. + Default descending order. + */ +@property (nonatomic, assign) RCRemoteHistoryOrder order; + +/** + * \~chinese + 是否需要排重 + YES: 拉取回来的消息全部返回 + NO: 拉取回来的消息只返回本地数据库中不存在的 + 默认 NO + + * \~english + Does it shall be weighed? + YES: All the messages pulled back are returned. + NO: The pulled messages only return messages that do not exist in the local database. + Default NO + */ +@property (nonatomic, assign) BOOL includeLocalExistMessage; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCResumeableDownloader.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCResumeableDownloader.h new file mode 100644 index 0000000..a75d0ad --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCResumeableDownloader.h @@ -0,0 +1,107 @@ +// +// RCEResumeableDownloader.h +// RongEnterpriseApp +// +// Created by zhaobingdong on 2018/5/15. +// Copyright © 2018 rongcloud. All rights reserved. +// + +#import +#import "RCDownloadItem.h" + +NS_ASSUME_NONNULL_BEGIN +@class RCMessage; +@protocol RCResumeableDownloaderDelegate + +/** + * \~chinese + 下载完成后调用 + + @param item 下载任务实例 + @param path 下载任务完成后的文件路径 + @discussion 通过 itemWithMessageId: 方法获取到写下载项,不会调用该方法 + + * \~english + Called after the download is complete. + + @param item Download task instance. + @param path The file path after the download task is completed. + @ discussion through itemWithMessageId: Method Get the write download and will not call the method. + */ +- (void)downloadItem:(RCDownloadItem *)item filePath:(NSString *)path; + +@end + +@interface RCResumeableDownloader : NSObject + +/** + * \~chinese + 创建 RCResumeableDownloader 实例 + + @return 返回 RCResumeableDownloader 实例 + + * \~english + Create a RCResumeableDownloader instance. + + @return return RCResumeableDownloader instance. + */ ++ (instancetype)defaultInstance; + +/** + * \~chinese + 销毁 RCResumeableDownloader 实例 + @discussion 切换用户时调用,退出登录时调用。 + + * \~english + Destroy RCResumeableDownloader instance. + @ discussion It is called when you switch users and when you log out. + */ ++ (void)free; + +@property (nonatomic, weak) id delegate; + +/** + * \~chinese + 根据消息id 获取 RCDownloadItem 实例 + + @param msgId 消息id + @return 返回 RCDownloadItem 实例 + @discussion 仅支持文件消息,文件消息下载完成后,会自动更新消息的 content + * + * \~english + Get RCDownloadItem instance based on message id. + + @param msgId Message id. + @ return returns RCDownloadItem instance. + @ discussion Only file messages are supported. After the file messages are downloaded, the content of the messages will be updated automatically. + */ +- (RCDownloadItem *)itemWithMessageId:(long)msgId; + +/** + * \~chinese + 根据开发者指定的标识符来获取 RCDownloadItem 实例 + + @param identify 标识符 + @param url 下载地址 + @param name 文件名 + @return 返回 RCDownloadItem 的实例 + @discussion 开发者需要保证该标识符 identify 的唯一性,确保每一个存活的下载任务的标识符是不同的 + 实际下载后文件名可能会与不一致,如果存储下载文件目录下已有该文件,会在文件名后添加(1)。 + 例如 a.txt 最终下载的文件名会变为 a(1).txt 或者 a(2).txt + + * \~english + Get the RCDownloadItem instance according to the identifier specified by the developer. + + @param identify Identifier. + @param url Download address. + @param name File name. + @ return returns the instance of RCDownloadItem. + @ discussion Developers shall ensure that the identifier identify is unique and that the identifier for each surviving download task is different. + The file name may not match after the actual download. If the file already exists in the directory where the download file is stored, it will be added (1) after the file name. + For example, the file name downloaded by a.txt will change to a (1). Txt or a (2). Txt). + */ +- (RCDownloadItem *)itemWithIdentify:(NSString *)identify url:(NSString *)url fileName:(NSString *)name; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRichContentMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRichContentMessage.h new file mode 100644 index 0000000..0f2f612 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCRichContentMessage.h @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCRichContentMessage.h +// Created by Gang Li on 10/17/14. + +#import "RCMessageContent.h" +#import + +/*! + * \~chinese + 图文消息的类型名 + + * \~english + The type name of the image and text message. + */ +#define RCRichContentMessageTypeIdentifier @"RC:ImgTextMsg" + +/*! + * \~chinese + 图文消息类 + + @discussion 图文消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Image and text message class. + + @ discussion image and text message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCRichContentMessage : RCMessageContent + +/*! + * \~chinese + 图文消息的标题 + + * \~english + The title of the image-text message. + */ +@property (nonatomic, copy) NSString *title; + +/*! + * \~chinese + 图文消息的内容摘要 + + * \~english + Content digest of image and text messages + */ +@property (nonatomic, copy) NSString *digest; + +/*! + * \~chinese + 图文消息图片 URL + + * \~english + Image URL of image + */ +@property (nonatomic, copy) NSString *imageURL; + +/*! + * \~chinese + 图文消息中包含的需要跳转到的URL + + * \~english + The URL contained in the image and text message to which you shall jump to. + */ +@property (nonatomic, copy) NSString *url; + +/*! + * \~chinese + 初始化图文消息 + + @param title 图文消息的标题 + @param digest 图文消息的内容摘要 + @param imageURL 图文消息的图片URL + @param extra 图文消息的扩展信息 + @return 图文消息对象 + + * \~english + Initialize the image and text message. + + @param title The title of the image-text message. + @param digest Content digest of image and text messages. + @param imageURL image URL of image and text messages. + @param extra Extended information of image and text messages. + @ return Teletext message object. + */ ++ (instancetype)messageWithTitle:(NSString *)title + digest:(NSString *)digest + imageURL:(NSString *)imageURL + extra:(NSString *)extra; + +/*! + * \~chinese + 初始化图文消息 + + @param title 图文消息的标题 + @param digest 图文消息的内容摘要 + @param imageURL 图文消息的图片URL + @param url 图文消息中包含的需要跳转到的URL + @param extra 图文消息的扩展信息 + @return 图文消息对象 + + * \~english + Initialize the image and text message. + + @param title The title of the image-text message. + @param digest Content digest of image and text messages. + @param imageURL image URL of image and text messages. + @param url The URL contained in the image and text message to which you shall jump to. + @param extra Extended information of image and text messages. + @ return Teletext message object. + */ ++ (instancetype)messageWithTitle:(NSString *)title + digest:(NSString *)digest + imageURL:(NSString *)imageURL + url:(NSString *)url + extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSearchConversationResult.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSearchConversationResult.h new file mode 100644 index 0000000..4c260a3 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSearchConversationResult.h @@ -0,0 +1,38 @@ +// +// RCSearchConversationResult.h +// RongIMLib +// +// Created by RongCloud on 16/9/29. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCConversation.h" +#import + +/*! + * \~chinese + 搜索的会话结果 + + * \~english + conversation results of the search + */ +@interface RCSearchConversationResult : NSObject + +/*! + * \~chinese + 匹配的会话对象 + + * \~english + Matching conversation object. + */ +@property (nonatomic, strong) RCConversation *conversation; + +/* + * \~chinese + 会话匹配的消息条数 + + * \~english + Number of messages matched by the conversation + */ +@property (nonatomic, assign) int matchCount; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSendMessageOption.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSendMessageOption.h new file mode 100644 index 0000000..7e08047 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSendMessageOption.h @@ -0,0 +1,26 @@ +// +// RCSendMessageOption.h +// RongIMLib +// +// Created by liyan on 2019/4/29. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCSendMessageOption : NSObject + +/* + * \~chinese + 发送的消息,是否走 VOIP 推送 + + * \~english + The message sent, whether to use VOIP push or not + */ +@property (nonatomic, assign) BOOL isVoIPPush; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSightMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSightMessage.h new file mode 100644 index 0000000..cd6c479 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCSightMessage.h @@ -0,0 +1,111 @@ +// +// RCSightMessage.h +// RongIMLib +// +// Created by LiFei on 2016/12/1. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import +#import + +/*! + * \~chinese + 小视频消息的类型名 + + * \~english + The type name of the small video message. + */ +#define RCSightMessageTypeIdentifier @"RC:SightMsg" +@class AVAsset; +/** + * \~chinese + 小视频消息类 + + @discussion 小视频消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Small video message class. + + @ discussion small video message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCSightMessage : RCMediaMessageContent + +/*! + * \~chinese + 本地 URL 地址 + + * \~english + Local URL address + */ +@property (nonatomic, copy) NSString *localPath; + +/*! + * \~chinese + 网络 URL 地址 + + * \~english + Network URL address + */ +@property (nonatomic, readonly) NSString *sightUrl; + +/** + * \~chinese + 视频时长,以秒为单位 + + * \~english + Video duration (in seconds) + */ +@property (nonatomic, assign, readonly) NSUInteger duration; + +/** + * \~chinese + 小视频文件名 + + * \~english + Small video file name + */ +@property (nonatomic, copy) NSString *name; + +/** + * \~chinese + 文件大小 + + * \~english + File size + */ +@property (nonatomic, assign, readonly) long long size; + +/*! + * \~chinese + 缩略图 + + * \~english + Thumbnail image + */ +@property (nonatomic, strong, readonly) UIImage *thumbnailImage; + +/** + * \~chinese + 创建小视频消息的便利构造方法 + + @param path 视频文件本地路径 + @param image 视频首帧缩略图 + @param duration 视频时长, 以秒为单位 + @return 视频消息实例变量 + + * \~english + A convenient construction method for creating small video messages. + + @param path Local path of video file. + @param image Thumbnail of the first frame of the video. + @param duration Video duration (in seconds). + @ return video message instance variable. + */ ++ (instancetype)messageWithLocalPath:(NSString *)path thumbnail:(UIImage *)image duration:(NSUInteger)duration; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCStatusDefine.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCStatusDefine.h new file mode 100644 index 0000000..49a2dce --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCStatusDefine.h @@ -0,0 +1,2119 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCStatusDefine.h +// Created by Heq.Shinoda on 14-4-21. + +#import + +#ifndef __RCStatusDefine +#define __RCStatusDefine + +#pragma mark - Error Code + +#pragma mark RCConnectErrorCode +/*! + * \~chinese + 建立连接返回的错误码 + + * \~english + Error code returned by establishing a connection + */ +typedef NS_ENUM(NSInteger, RCConnectErrorCode) { + + /*! + * \~chinese + AppKey 错误 + + @discussion 请检查您使用的 AppKey 是否正确。 + + * \~english + AppKey error. + + @ discussion Please check that you are using the correct AppKey. + */ + RC_CONN_ID_REJECT = 31002, + + /*! + * \~chinese + Token 无效 + + @discussion 请检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey 是否一致。 + @discussion 您可能需要请求您的服务器重新获取 token,并使用新的 token 建立连接。 + + * \~english + Invalid Token. + + @ discussion Token is generally invalid for two reasons. + The first is the token error. Please check whether the AppKey used by the client initialization is consistent with the AppKey used by your server to obtain the token. + Second, the token expires because you set the token expiration time in the developer background. You shall request your server to retrieve the token and use the new token again to establish a connection. + */ + RC_CONN_TOKEN_INCORRECT = 31004, + + /*! + * \~chinese + App 校验未通过 + + @discussion 您开通了 App 校验功能,但是校验未通过 + + * \~english + AppKey does not match Token. + + @ discussion + Please check that the AppKey and Token you are using are correct and match. Generally there are three reasons. + */ + RC_CONN_NOT_AUTHRORIZED = 31005, + + /*! + * \~chinese + BundleID 不正确 + + @discussion 请检查您 App 的 BundleID 是否正确。 + + * \~english + Incorrect BundleID. + + @ discussion Please check that the BundleID of your App is correct. + */ + RC_CONN_PACKAGE_NAME_INVALID = 31007, + + /*! + * \~chinese + AppKey 被封禁或已删除 + + @discussion 请检查您使用的 AppKey 是否被封禁或已删除。 + + * \~english + AppKey is blocked or deleted. + + @ discussion Please check whether the AppKey you are using is blocked or deleted. + */ + RC_CONN_APP_BLOCKED_OR_DELETED = 31008, + + /*! + * \~chinese + 用户被封禁 + + @discussion 请检查您使用的 Token 是否正确,以及对应的 UserId 是否被封禁。 + + * \~english + Users are blocked. + + @ discussion Please check whether the Token you are using is correct and whether the corresponding UserId is blocked. + */ + RC_CONN_USER_BLOCKED = 31009, + + /*! + * \~chinese + 用户被踢下线 + + @discussion 当前用户在其他设备上登录,此设备被踢下线 + + * \~english + The user is kicked offline. + + @ discussion The current user logs in on another device, and this device is kicked offline. + */ + RC_DISCONN_KICK = 31010, + + /*! + * \~chinese + token 已过期 + + @discussion 您可能需要请求您的服务器重新获取 token,并使用新的 token 建立连接。 + + * \~english + The token has expired + + @Discussion you may need to request your server to retrieve the token and establish a connection with the new token. + */ + RC_CONN_TOKEN_EXPIRE = 31020, + + /*! + * \~chinese + 用户在其它设备上登录 + + @discussion 重连过程中当前用户在其它设备上登录 + + * \~english + The user logs in on another device. + + @ discussion The current user logs in on another device during the reconnection process. + */ + RC_CONN_OTHER_DEVICE_LOGIN = 31023, + + /*! + * \~chinese + 连接总数量超过服务设定的并发限定值 + + @discussion 私有云专属 + + * \~english + The connection exceeds the concurrency limit. + @discussion private cloud only + */ + CONCURRENT_LIMIT_ERROR = 31024, + + /*! + * \~chinese + 环境校验失败 + + @discussion 请检查 AppKey 和连接环境(开发环境/生产环境)是否匹配 + + * \~english + Environment verification failed + + @Discussion please check whether the appkey matches the connection environment (development environment / production environment) + */ + RC_CONN_CLUSTER_ERROR = 31026, + + /*! + * \~chinese + SDK 没有初始化 + + @discussion 在使用 SDK 任何功能之前,必须先 Init。 + + * \~english + SDK is not initialized. + + @ discussion It must Init before using any SDK functionality. + */ + RC_CLIENT_NOT_INIT = 33001, + + /*! + * \~chinese + 开发者接口调用时传入的参数错误 + + @discussion 请检查接口调用时传入的参数类型和值。 + + * \~english + The parameter passed in when the developer interface is called is incorrect. + + @ discussion Please check the parameter types and values passed in when the interface is called. + */ + RC_INVALID_PARAMETER = 33003, + + /*! + * \~chinese + Connection 已经存在 + + @discussion + 调用过connect之后,只有在 token 错误或者被踢下线或者用户 logout 的情况下才需要再次调用 connect。其它情况下 SDK + 会自动重连,不需要应用多次调用 connect 来保持连接。 + + * \~english + Connection already exists. + + @ discussion + After calling connect, connect is called again only if there is a token error, or the user is kicked off, or the user logs out. In other cases, SDK will automatically reconnect, and an application need not call connect multiple times to maintain the connection. + */ + RC_CONNECTION_EXIST = 34001, + + /*! + * \~chinese + 连接环境不正确(融云公有云 SDK 无法连接到私有云环境) + + @discussion 融云公有云 SDK 无法连接到私有云环境。请确认需要连接的环境,使用正确 SDK 版本。 + + * \~english + Incorrect connection environment (RongCloud public cloud SDK cannot connect to private cloud environment). + + @ discussion RongCloud Public Cloud SDK cannot connect to the private cloud environment. Please confirm the environment to which you shall connect and use the correct SDK version. + */ + RC_ENVIRONMENT_ERROR = 34005, + + /*! + * \~chinese + 连接超时。 + + @discussion 当调用 connectWithToken:timeLimit:dbOpened:success:error: 接口,timeLimit 为有效值时,SDK 在 timeLimit 时间内还没连接成功返回此错误。 + + * \~english + The connection timed out. + + @ discussion When connectWithToken:timeLimit:dbOpened:success:error: Interface is called, if timeLimit is a valid value and SDK has not been connected successfully within timeLimit time. This error is returned. + */ + RC_CONNECT_TIMEOUT = 34006, + + /*! + * \~chinese + 开发者接口调用时传入的参数错误 + + @discussion 请检查接口调用时传入的参数类型和值。 + + * \~english + The parameter passed in when the developer interface is called is incorrect. + + @ discussion Please check the parameter types and values passed in when the interface is called. + */ + RC_INVALID_ARGUMENT = -1000 +}; + +#pragma mark RCErrorCode +/*! + * \~chinese + 具体业务错误码 + + * \~english + Specific business error code + */ +typedef NS_ENUM(NSInteger, RCErrorCode) { + /*! + * \~chinese + 成功 + + * \~english + Success + */ + RC_SUCCESS = 0, + + /*! + * \~chinese + 未知错误(预留) + + * \~english + Unknown error (reserved) + */ + ERRORCODE_UNKNOWN = -1, + + /*! + * \~chinese + 已被对方加入黑名单,消息发送失败。 + + * \~english + It has been blacklisted by the other party, and the message failed to be sent. + */ + REJECTED_BY_BLACKLIST = 405, + + + /*! + * \~chinese + 上传媒体文件格式不支持 + + * \~english + Upload media file format is not supported + */ + RC_MEDIA_FILETYPE_INVALID = 34019, + + /*! + * \~chinese + 超时 + + * \~english + Timeout + */ + ERRORCODE_TIMEOUT = 5004, + + /*! + * \~chinese + 发送消息频率过高,1 秒钟最多只允许发送 5 条消息 + + * \~english + The frequency of sending messages is too high and a maximum of 5 messages are allowed to be sent per second + */ + SEND_MSG_FREQUENCY_OVERRUN = 20604, + + /*! + * \~chinese + 请求超出了调用频率限制,请稍后再试 + + @discussion 接口调用过于频繁,请稍后再试。 + + * \~english + The request exceeds the limit of call frequency. Please try again later. + + @ discussion The interface is called too frequently. Please try again later. + */ + RC_REQUEST_OVERFREQUENCY = 20607, + + /*! + * \~chinese + 当前用户不在该讨论组中 + + * \~english + The current user is not in this discussion group. + */ + NOT_IN_DISCUSSION = 21406, + + /*! + * \~chinese + 当前用户不在该群组中 + + * \~english + The current user is not in this group + */ + NOT_IN_GROUP = 22406, + + /*! + * \~chinese + 当前用户在群组中已被禁言 + + * \~english + The current user has been banned in the group + */ + FORBIDDEN_IN_GROUP = 22408, + + /*! + * \~chinese + 当前用户不在该聊天室中 + + * \~english + The current user is not in this chatroom + */ + NOT_IN_CHATROOM = 23406, + + /*! + * \~chinese + 当前用户在该聊天室中已被禁言 + + * \~english + The current user has been banned in this chatroom + */ + FORBIDDEN_IN_CHATROOM = 23408, + + /*! + * \~chinese + 当前用户已被踢出并禁止加入聊天室。被禁止的时间取决于服务端调用踢出接口时传入的时间。 + + * \~english + The current user has been kicked out and banned from the chatroom. The prohibited time depends on the time passed in when the server invokes kicking out of the interface + */ + KICKED_FROM_CHATROOM = 23409, + + /*! + * \~chinese + 聊天室不存在 + + * \~english + chatroom does not exist + */ + RC_CHATROOM_NOT_EXIST = 23410, + + /*! + * \~chinese + 聊天室成员超限,默认聊天室成员没有人数限制,但是开发者可以提交工单申请针对 App Key + 进行聊天室人数限制,在限制人数的情况下,调用加入聊天室的接口时人数超限,就会返回此错误码 + + * \~english + chatroom membership exceeds the limit. By default, there is no limit on the number of chatroom members, but developers can submit a ticket to apply for App Key. + Limit the number of people in a chatroom. In the case of a limit, if the number of people exceeds the limit when calling the interface to join the chatroom, this error code will be returned. + */ + RC_CHATROOM_IS_FULL = 23411, + + /*! + * \~chinese + 聊天室接口参数无效。请确认参数是否为空或者有效。 + + * \~english + The chatroom interface parameter is invalid. Please confirm that the parameter is empty or valid. + */ + RC_PARAMETER_INVALID_CHATROOM = 23412, + + /*! + * \~chinese + 聊天室云存储业务未开通 + + * \~english + The chatroom cloud storage service has not been activated. + */ + RC_ROAMING_SERVICE_UNAVAILABLE_CHATROOM = 23414, + + /*! + * \~chinese + 超过聊天室的最大状态设置数,1 个聊天室默认最多设置 100 个 + + * \~english + The maximum number of status settings for a chatroom is exceeded and a maximum of 100 status settings can be set for 1 chatroom by default. + */ + RC_EXCCED_MAX_KV_SIZE = 23423, + + /*! + * \~chinese + 聊天室中非法覆盖状态值,状态已存在,没有权限覆盖 + + * \~english + The status value is illegally overwritten in the chatroom. The status already exists and there is no permission to overwrite it. + */ + RC_TRY_OVERWRITE_INVALID_KEY = 23424, + + /*! + * \~chinese + 超过聊天室中状态设置频率,1 个聊天室 1 秒钟最多设置和删除状态 100 次 + + * \~english + The maximum frequency of status setting in a chatroom is exceeded. The status for a chatroom can be set and deleted for up to 100 times per second. + */ + RC_EXCCED_MAX_CALL_API_SIZE = 23425, + + /*! + * \~chinese + 聊天室状态存储功能没有开通,请联系商务开通 + + * \~english + The chatroom status storage function is not enabled, please contact commerce person to open. + */ + RC_KV_STORE_NOT_AVAILABLE = 23426, + + /*! + * \~chinese + 聊天室状态值不存在 + + * \~english + The chatroom status value does not exist. + */ + RC_KEY_NOT_EXIST = 23427, + + /*! + * \~chinese + 操作跟服务端同步时出现问题,有可能是操作过于频繁所致。如果出现该错误,请延时 0.5s 再试 + + * \~english + There is a problem when the operation is synchronized with the server, which may be caused by the frequent operation. If this error occurs, please delay 0.5s and try again + */ + RC_SETTING_SYNC_FAILED = 26002, + + /*! + * \~chinese + 小视频服务未开通。可以在融云开发者后台中开启该服务。 + + * \~english + Small video service is not enabled. The service can be started in the background of rongyun developers. + */ + RC_SIGHT_SERVICE_UNAVAILABLE = 26101, + + /*! + * \~chinese + 聊天室状态未同步完成 + 刚加入聊天室时调用获取 KV 接口,极限情况下会存在本地数据和服务器未同步完成的情况,建议延时一段时间再获取 + + * \~english + chatroom status is not completed synchronously. + Call the interface to get KV when you just join the chatroom. In extreme cases, the local data and the server are not completed synchronously. It is recommended to delay the acquisition for a period of time. + */ + RC_KV_STORE_NOT_SYNC = 34004, + + /*! + * \~chinese + 聊天室被重置 + + * \~english + The chatroom is reset + */ + RC_CHATROOM_RESET = 33009, + + /*! + * \~chinese + 当前连接不可用(连接已经被释放) + + * \~english + The current connection is not available (the connection has been released). + */ + RC_CHANNEL_INVALID = 30001, + + /*! + * \~chinese + 当前连接不可用 + + * \~english + The current connection is not available. + */ + RC_NETWORK_UNAVAILABLE = 30002, + + /*! + * \~chinese + 客户端发送消息请求,融云服务端响应超时。 + + * \~english + The client sends a message request, and the RongCloud server responds to a timeout. + */ + RC_MSG_RESPONSE_TIMEOUT = 30003, + + /*! + * \~chinese + SDK 没有初始化 + + @discussion 在使用 SDK 任何功能之前,必须先 Init。 + + * \~english + SDK is not initialized. + + @ discussion It must Init before using any SDK functionality. + */ + CLIENT_NOT_INIT = 33001, + + /*! + * \~chinese + 数据库错误 + + @discussion 连接融云的时候 SDK 会打开数据库,如果没有连接融云就调用了业务接口,因为数据库尚未打开,有可能出现该错误。 + @discussion 数据库路径中包含 userId,如果您获取 token 时传入的 userId 包含特殊字符,有可能导致该错误。userId + 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 64 字节。 + + * \~english + Database error. + + @ discussion The database will be opened when connecting to the cloud melting. If you do not connect to the cloud melting, the business interface will be called because the database has not been opened yet, and this error may occur. + @ discussion The database path contains userId, if the userId passed in when you get the token contains special characters, which may cause this error. UserId. + The combination of uppercase and lowercase letters, numbers and some special symbols + =-_ is supported, with a maximum length of 64 bytes. + */ + DATABASE_ERROR = 33002, + + /*! + * \~chinese + 开发者接口调用时传入的参数错误 + + @discussion 请检查接口调用时传入的参数类型和值。 + + * \~english + The parameter passed in when the developer interface is called is incorrect. + + @ discussion Please check the parameter types and values passed in when the interface is called. + */ + INVALID_PARAMETER = 33003, + + /*! + * \~chinese + 历史消息云存储业务未开通。可以在融云开发者后台中开启该服务。 + + * \~english + The cloud storage service of historical messages has not been activated. You can enable this service in the backend of RongCloud developer. + */ + MSG_ROAMING_SERVICE_UNAVAILABLE = 33007, + + /*! + * \~chinese + 标签不存在 + + * \~english + Tag does not exist + */ + RC_TAG_NOT_EXIST = 33100, + + /*! + * \~chinese + 标签已存在 + + * \~english + Tag already exists + */ + RC_TAG_ALREADY_EXISTS = 33101, + + /*! + * \~chinese + 会话中不存在对应标签 + + * \~english + There is no corresponding tag in the conversation + */ + RC_TAG_INVALID_FOR_CONVERSATION = 33102, + + /*! + * \~chinese + 公众号非法类型,针对会话类型:ConversationType_APPSERVICE + + * \~english + Illegal official account type, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_ERROR_TYPE = 29201, + + /*! + * \~chinese + 公众号默认已关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account has been followed by default, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_DEFFOLLOWED = 29102, + + /*! + * \~chinese + 公众号已关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account has been followed, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_FOLLOWED = 29103, + + /*! + * \~chinese + 公众号默认已取消关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account has been unfollowed by default, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_DEFUNFOLLOWED = 29104, + + /*! + * \~chinese + 公众号已经取消关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + The official account has been unfollowed, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_UNFOLLOWED = 29105, + + /*! + * \~chinese + 公众号未关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account is not followed, for conversation type: ConversationType_APPSERVICE. + */ + RC_APP_PUBLICSERVICE_UNFOLLOW = 29106, + + /*! + * \~chinese + 公众号非法类型,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Illegal official account type, for conversation type: ConversationType_PUBLICSERVICE + */ + INVALID_PUBLIC_NUMBER = 29201, + + /*! + * \~chinese + 公众号默认已关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account has been followed by default, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_DEFFOLLOWED = 29202, + + /*! + * \~chinese + 公众号已关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account has been following, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_FOLLOWED = 29203, + + /*! + * \~chinese + 公众号默认已取消关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account has been unfollowed by default, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_DEFUNFOLLOWED = 29204, + + /*! + * \~chinese + 公众号已经取消关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + The official account has been unfollowed, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_UNFOLLOWED = 29205, + + /*! + * \~chinese + 公众号未关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account is not followed, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_UNFOLLOW = 29206, + + /*! + * \~chinese + 消息大小超限,消息体(序列化成 json 格式之后的内容)最大 128k bytes。 + + * \~english + The message size exceeds the limit, and the message body (the content after serialization into json format) is up to 128k bytes + */ + RC_MSG_SIZE_OUT_OF_LIMIT = 30016, + + /*! + * \~chinese + 撤回消息参数无效。请确认撤回消息参数是否正确的填写。 + + * \~english + The recall message parameter is invalid. Please make sure that the recall message parameters are filled in correctly. + */ + RC_RECALLMESSAGE_PARAMETER_INVALID = 25101, + + /*! + * \~chinese + push 设置参数无效。请确认是否正确的填写了 push 参数。 + + * \~english + Invalid push setting parameter. Please make sure that the push parameter is entered correctly. + */ + RC_PUSHSETTING_PARAMETER_INVALID = 26001, + + /*! + * \~chinese + 用户标签个数超限,最多支持添加 20 个标签 + + * \~english + The number of user tags exceeds the limit and a maximum of 20 tags can be added. + */ + RC_TAG_LIMIT_EXCEED = 26004, + + /*! + * \~chinese + 操作被禁止。 此错误码已被弃用。 + + * \~english + The operation is prohibited. This error code has been deprecated. + */ + RC_OPERATION_BLOCKED = 20605, + + /*! + * \~chinese + 操作不支持。仅私有云有效,服务端禁用了该操作。 + + * \~english + The operation is not supported. Only the private cloud is valid, and the server disables this operation. + */ + RC_OPERATION_NOT_SUPPORT = 20606, + + /*! + * \~chinese + 发送的消息中包含敏感词 (发送方发送失败,接收方不会收到消息) + + * \~english + The message sent contains sensitive words (the sender fails to send, and the receiver does not receive the message). + */ + RC_MSG_BLOCKED_SENSITIVE_WORD = 21501, + + /*! + * \~chinese + 消息中敏感词已经被替换 (接收方可以收到被替换之后的消息) + + * \~english + The sensitive words in the message have been replaced (the receiver can receive the message after the replacement). + */ + RC_MSG_REPLACED_SENSITIVE_WORD = 21502, + + /*! + * \~chinese + 小视频时间长度超出限制,默认小视频时长上限为 2 分钟 + + * \~english + The length of small video exceeds the limit. By default, the maximum length of small video is 2 minutes. + */ + RC_SIGHT_MSG_DURATION_LIMIT_EXCEED = 34002, + + /*! + * \~chinese + GIF 消息文件大小超出限制, 默认 GIF 文件大小上限是 2 MB + + * \~english + The size of the GIF message file exceeds the limit and the maximum size of the default GIF file is 2 MB + */ + RC_GIF_MSG_SIZE_LIMIT_EXCEED = 34003, + + /** + * \~chinese + * 查询的公共服务信息不存在。 + *

请确认查询的公共服务的类型和公共服务 id 是否匹配。

+ + * \~english + * The public service information queried does not exist. + *

Please make sure that the type of public service queried matches the public service id.

+ */ + RC_PUBLIC_SERVICE_PROFILE_NOT_EXIST = 34007, + + /** + * \~chinese + * 消息不能被扩展。 + *

消息在发送时,RCMessage 对象的属性 canIncludeExpansion 置为 YES 才能进行扩展。

+ + * \~english + * Messages cannot be extended. + *

When a message is sent, the property canIncludeExpansion of the RCMessage object is set to YES before it can be extended. + */ + RC_MESSAGE_CANT_EXPAND = 34008, + + /** + * \~chinese + * 消息扩展失败。 + *

一般是网络原因导致的,请确保网络状态良好,并且融云 SDK 连接正常

+ + * \~english + * Message expansion failed. + *

Usually it is caused by the network. Make sure the network is in good condition and the cloud SDK connection is normal

. + */ + RC_MESSAGE_EXPAND_FAIL = 34009, + + /*! + * \~chinese + 消息扩展大小超出限制, 默认消息扩展字典 key 长度不超过 32 ,value 长度不超过 64 ,单次设置扩展数量最大为 20,消息的扩展总数不能超过 300 + + * \~english + The message extension size exceeds the limit. The default message extension dictionary key length does not exceed 32, the value length does not exceed 64, the maximum number of extensions set at a time is 20, and the total number of message extensions cannot exceed 300. + */ + RC_MSG_EXPANSION_SIZE_LIMIT_EXCEED = 34010, + + /*! + * \~chinese + 媒体消息媒体文件 http 上传失败 + + * \~english + Media message media file http upload failed + */ + RC_FILE_UPLOAD_FAILED = 34011, + + /*! + * \~chinese + 指定的会话类型不支持标签功能,会话标签仅支持单群聊会话、系统会话 + + * \~english + The specified conversation type does not support tag function, and conversation tag only supports single group chat conversation and system conversation + */ + RC_CONVERSATION_TAG_INVALID_CONVERSATION_TYPE = 34012, + + /*! + * \~chinese + 批量处理指定标签的会话个数超限,批量处理会话个数最大为 1000 + + * \~english + The number of conversations for batch processing of specified tags exceeds the limit, and the maximum number of conversations for batch processing is 1000 + */ + RC_CONVERSATION_TAG_LIMIT_EXCEED = 34013, + + /*! + * \~chinese + 群已读回执版本不支持 + + * \~english + Group read receipt version is not supported + */ + RC_Group_Read_Receipt_Version_Not_Support = 34014, + + /*! + * \~chinese + 视频消息压缩失败 + + * \~english + Video message compression failed + */ + RC_SIGHT_COMPRESS_FAILED = 34015, + + /*! + * \~chinese + 用户级别设置未开通 + + * \~english + User level settings are not enabled + */ + RC_USER_SETTING_DISABLED = 34016, + + /*! + * \~chinese + 消息处理失败 + *

一般是消息处理为 nil

+ + * \~english + Message processing failed. + *

Generally, messages are handled as nil

+ */ + RC_MESSAGE_NULL_EXCEPTION = 34017, + + /*! + * \~chinese + 媒体文件上传异常,媒体文件不存在或文件大小为 0 + + * \~english + Media file upload exception, media file does not exist or file size is 0 + */ + RC_MEDIA_EXCEPTION = 34018, +}; + +typedef NS_ENUM(NSInteger, RCDBErrorCode) { + RCDBOpenSuccess = 0, + RCDBOpenFailed = 33002, +}; + +#pragma mark - RCConnectionStatus + +#pragma mark RCConnectionStatus +/*! + * \~chinese + 网络连接状态码 + + * \~english + Network connection status code. + */ +typedef NS_ENUM(NSInteger, RCConnectionStatus) { + /*! + * \~chinese + 未知状态 + + @discussion 建立连接中出现异常的临时状态,SDK 会做好自动重连,开发者无须处理。 + + * \~english + Unknown state. + + @ discussion If an abnormal temporary state occurs during the connection establishment, SDK will reconnect automatically and developers need not deal with it. + */ + ConnectionStatus_UNKNOWN = -1, + + /*! + * \~chinese + 连接成功 + + * \~english + Connected successfully + */ + ConnectionStatus_Connected = 0, + + /*! + * \~chinese + 连接过程中,当前设备网络不可用 + + @discussion 当网络恢复可用时,SDK 会做好自动重连,开发者无须处理。 + + * \~english + The current device network is not available during connection. + + @ discussion When the network is available, SDK will reconnect automatically, so developers don't have to deal with it. + */ + ConnectionStatus_NETWORK_UNAVAILABLE = 1, + + /*! + * \~chinese + 当前用户在其他设备上登录,此设备被踢下线 + + * \~english + The current user is logged in on another device, and this device is kicked off the line. + */ + ConnectionStatus_KICKED_OFFLINE_BY_OTHER_CLIENT = 6, + + /*! + * \~chinese + 连接中 + + * \~english + Connecting + */ + ConnectionStatus_Connecting = 10, + + /*! + * \~chinese + 连接失败或未连接 + + * \~english + Connection failed or not connected. + */ + ConnectionStatus_Unconnected = 11, + + /*! + * \~chinese + 已登出 + + * \~english + Logged out. + */ + ConnectionStatus_SignOut = 12, + + /*! + * \~chinese + 连接暂时挂起(多是由于网络问题导致),SDK 会在合适时机进行自动重连 + + * \~english + Connection is temporarily suspended (mostly due to network problems that cause) and SDK will reconnect automatically at the appropriate time. + */ + ConnectionStatus_Suspend = 13, + + /*! + * \~chinese + 自动连接超时,SDK 将不会继续连接,用户需要做超时处理,再自行调用 connectWithToken 接口进行连接 + + * \~english + Automatic connection timeout, SDK will not continue to connect, users shall do timeout handling, and the connectWithToken interface is called to connect. + */ + ConnectionStatus_Timeout = 14, + + /*! + * \~chinese + Token无效 + + @discussion + Token 无效一般有两种原因。一是 token 错误,请您检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey + 是否一致;二是 token 过期,是因为您在开发者后台设置了 token 过期时间,您需要请求您的服务器重新获取 token + 并再次用新的 token 建立连接。 + + * \~english + Invalid Token. + + @ discussion + Generally there are two reasons why Token is invalid. One is the token error. Please check the AppKey used by the client initialization and the AppKey used by your server to obtain the token. + Whether it is consistent; Second, the token expires because you set the token expiration time in the developer background, and you shall request your server to retrieve the token and establish a connection with the new token again. + */ + ConnectionStatus_TOKEN_INCORRECT = 15, + + /*! + * \~chinese + 与服务器的连接已断开,用户被封禁 + + * \~english + The connection to the server has been disconnected and the user is blocked. + */ + ConnectionStatus_DISCONN_EXCEPTION = 16 +}; + +#pragma mark RCNetworkStatus +/*! + * \~chinese + 当前所处的网络 + + * \~english + Current network + */ +typedef NS_ENUM(NSUInteger, RCNetworkStatus) { + /*! + * \~chinese + 当前网络不可用 + + * \~english + The current network is not available + */ + RC_NotReachable = 0, + + /*! + * \~chinese + 当前处于 WiFi 网络 + + * \~english + Currently on WiFi network + */ + RC_ReachableViaWiFi = 1, + + /*! + * \~chinese + 移动网络 + + * \~english + Mobile network + */ + RC_ReachableViaWWAN = 2, +}; + +#pragma mark RCSDKRunningMode +/*! + * \~chinese + SDK 当前所处的状态 + + * \~english + The current state of SDK + */ +typedef NS_ENUM(NSUInteger, RCSDKRunningMode) { + /*! + * \~chinese + 后台运行状态 + + * \~english + Background running status + */ + RCSDKRunningMode_Background = 0, + + /*! + * \~chinese + 前台运行状态 + + * \~english + Foreground operation status + */ + RCSDKRunningMode_Foreground = 1 +}; + +#pragma mark - Conversation + +#pragma mark RCConversationType +/*! + * \~chinese + 会话类型 + + * \~english + Conversation type + */ +typedef NS_ENUM(NSUInteger, RCConversationType) { + /*! + * \~chinese + 单聊 + + * \~english + Chat alone + */ + ConversationType_PRIVATE = 1, + + /*! + * \~chinese + 讨论组 + + * \~english + Discussion group + */ + ConversationType_DISCUSSION = 2, + + /*! + * \~chinese + 群组 + + * \~english + Group + */ + ConversationType_GROUP = 3, + + /*! + * \~chinese + 聊天室 + + * \~english + chatroom + */ + ConversationType_CHATROOM = 4, + + /*! + * \~chinese + 客服 + + * \~english + Customer Service + */ + ConversationType_CUSTOMERSERVICE = 5, + + /*! + * \~chinese + 系统会话 + + * \~english + System conversation + */ + ConversationType_SYSTEM = 6, + + /*! + * \~chinese + 应用内公众服务会话 + + @discussion + 客服 2.0 使用应用内公众服务会话(ConversationType_APPSERVICE)的方式实现。 + 即客服 2.0 会话是其中一个应用内公众服务会话, 这种方式我们目前不推荐, + 请尽快升级到新客服,升级方法请参考官网的客服文档。文档链接 + https://docs.rongcloud.cn/services/public/app/prepare/ + + * \~english + In-application public service conversation. + + @ discussion + Customer service 2. 0 is implemented using an in-application public service conversation (ConversationType_APPSERVICE). + That is, customer service 2.0 conversation is one of the public service conversations in the application, which we do not recommend at this time. + Please upgrade to the new customer service as soon as possible. For upgrade methods, please refer to the customer service documentation on the official website. Document link. + https://docs.rongcloud.cn/services/public/app/prepare/ + */ + ConversationType_APPSERVICE = 7, + + /*! + * \~chinese + 跨应用公众服务会话 + + * \~english + Cross-application public service conversation + */ + ConversationType_PUBLICSERVICE = 8, + + /*! + * \~chinese + 推送服务会话 + + * \~english + Push service conversation + */ + ConversationType_PUSHSERVICE = 9, + + /*! + * \~chinese + 加密会话(仅对部分私有云用户开放,公有云用户不适用) + + * \~english + Encrypted conversation (only available to some private cloud users, not public cloud users) + */ + ConversationType_Encrypted = 11, + /** + * \~chinese + * RTC 会话 + + * \~english + * RTC conversation + */ + ConversationType_RTC = 12, + + /*! + * \~chinese + 无效类型 + + * \~english + Invalid type + */ + ConversationType_INVALID + +}; + +#pragma mark RCConversationNotificationStatus +/*! + * \~chinese + 会话提醒状态 + + * \~english + Conversation reminder status + */ +typedef NS_ENUM(NSUInteger, RCConversationNotificationStatus) { + /*! + * \~chinese + 免打扰 + + * \~english + Do not disturb + */ + DO_NOT_DISTURB = 0, + + /*! + * \~chinese + 新消息提醒 + + * \~english + New message reminder + */ + NOTIFY = 1, +}; + +#pragma mark RCReadReceiptMessageType +/*! + * \~chinese + 已读状态消息类型 + + * \~english + Read status message type + */ +typedef NS_ENUM(NSUInteger, RCReadReceiptMessageType) { + /*! + * \~chinese + 根据会话来更新未读消息状态 + + * \~english + Update the status of unread messages based on the conversation + */ + RC_ReadReceipt_Conversation = 1, +}; + +#pragma mark - Message + +#pragma mark RCMessagePersistent +/*! + * \~chinese + 消息的存储策略 + + * \~english + Storage strategy of messages + */ +typedef NS_ENUM(NSUInteger, RCMessagePersistent) { + /*! + * \~chinese + 在本地不存储,不计入未读数 + + * \~english + It is not stored locally and is not counted as unread number + */ + MessagePersistent_NONE = 0, + + /*! + * \~chinese + 在本地只存储,但不计入未读数 + + * \~english + Only stored locally, but not counted as unread number + */ + MessagePersistent_ISPERSISTED = 1, + + /*! + * \~chinese + 在本地进行存储并计入未读数 + + * \~english + Store locally and count as unread number + */ + MessagePersistent_ISCOUNTED = 3, + + /*! + * \~chinese + 在本地不存储,不计入未读数,并且如果对方不在线,服务器会直接丢弃该消息,对方如果之后再上线也不会再收到此消息。 + + @discussion 一般用于发送输入状态之类的消息,该类型消息的messageUId为nil。 + + * \~english + It is not stored locally and is not counted into unread number. If the other party is not online, the server will directly discard the message, and the other party will not receive the message if it goes online later. + + @ discussion It is typically used to send messages such as input status, and the messageUId for this type of message is nil. + */ + MessagePersistent_STATUS = 16 +}; + +#pragma mark RCMessageDirection +/*! + * \~chinese + 消息的方向 + + * \~english + The direction of the message. + */ +typedef NS_ENUM(NSUInteger, RCMessageDirection) { + /*! + * \~chinese + 发送 + + * \~english + Send + */ + MessageDirection_SEND = 1, + + /*! + * \~chinese + 接收 + + * \~english + Receive + */ + MessageDirection_RECEIVE = 2 +}; + +#pragma mark RCSentStatus +/*! + * \~chinese + 消息的发送状态 + + * \~english + The sending status of the message + */ +typedef NS_ENUM(NSUInteger, RCSentStatus) { + /*! + * \~chinese + 发送中 + + * \~english + Sending + */ + SentStatus_SENDING = 10, + + /*! + * \~chinese + 发送失败 + + * \~english + Failed to send + */ + SentStatus_FAILED = 20, + + /*! + * \~chinese + 已发送成功 + + * \~english + Sent successfully + */ + SentStatus_SENT = 30, + + /*! + * \~chinese + 对方已接收 + + * \~english + The other party has received + */ + SentStatus_RECEIVED = 40, + + /*! + * \~chinese + 对方已阅读 + + * \~english + The other party has read + */ + SentStatus_READ = 50, + + /*! + * \~chinese + 对方已销毁 + + * \~english + The other party has been destroyed + */ + SentStatus_DESTROYED = 60, + + /*! + * \~chinese + 发送已取消 + + * \~english + Sending is canceled + */ + SentStatus_CANCELED = 70, + + /*! + * \~chinese + 无效类型 + + * \~english + Invalid type + */ + SentStatus_INVALID +}; + +#pragma mark RCReceivedStatus +/*! + * \~chinese + 消息的接收状态 + + * \~english + The receiving status of the message + */ +typedef NS_ENUM(NSUInteger, RCReceivedStatus) { + /*! + * \~chinese + 未读 + + * \~english + Unread + */ + ReceivedStatus_UNREAD = 0, + + /*! + * \~chinese + 已读 + + * \~english + Read + */ + ReceivedStatus_READ = 1, + + /*! + * \~chinese + 已听 + + @discussion 仅用于语音消息 + + * \~english + Heard. + + @ discussion It is for voice messages only + */ + ReceivedStatus_LISTENED = 2, + + /*! + * \~chinese + 已下载 + + * \~english + Downloaded + */ + ReceivedStatus_DOWNLOADED = 4, + + /*! + * \~chinese + 该消息已经被其他登录的多端收取过。(即该消息已经被其他端收取过后。当前端才登录,并重新拉取了这条消息。客户可以通过这个状态更新 + UI,比如不再提示)。 + + * \~english + This message has been received by other logins. (That is, after the message has been received by other parties. The current side just logs in and pulls the message again. Customers can update UI through this status, for example, no more prompts). + */ + ReceivedStatus_RETRIEVED = 8, + + /*! + * \~chinese + 该消息是被多端同时收取的。(即其他端正同时登录,一条消息被同时发往多端。客户可以通过这个状态值更新自己的某些 UI + 状态)。 + + * \~english + The message is received by multiple parties at the same time. (That is, other terminals log in at the same time, and a message is sent to multiple terminals at the same time. Customers can update some of their UI status with this status value). + */ + ReceivedStatus_MULTIPLERECEIVE = 16, + +}; + +#pragma mark RCMediaType +/*! + * \~chinese + 消息内容中多媒体文件的类型 + + * \~english + The type of multimedia file in the message content + */ +typedef NS_ENUM(NSUInteger, RCMediaType) { + /*! + * \~chinese + 图片 + + * \~english + Image + */ + MediaType_IMAGE = 1, + + /*! + * \~chinese + 语音 + + * \~english + Voice + */ + MediaType_AUDIO = 2, + + /*! + * \~chinese + 视频 + + * \~english + Video + */ + MediaType_VIDEO = 3, + + /*! + * \~chinese + 其他文件 + + * \~english + Other documents + */ + MediaType_FILE = 4, + + /*! + * \~chinese + 小视频 + + * \~english + Small video + */ + MediaType_SIGHT = 5, + + /*! + * \~chinese + 合并转发 + + * \~english + Merge and forward + */ + MediaType_HTML = 6 +}; + +#pragma mark RCMentionedType +/*! + * \~chinese + @提醒的类型 + + * \~english + @ Type of reminder + */ +typedef NS_ENUM(NSUInteger, RCMentionedType) { + /*! + * \~chinese + @ 所有人 + + * \~english + @ Everyone + */ + RC_Mentioned_All = 1, + + /*! + * \~chinese + @ 部分指定用户 + + * \~english + @ Part of the specified user + */ + RC_Mentioned_Users = 2, +}; + +/** + * \~chinese + 语音消息采样率 + + - RCSample_Rate_8000: 8KHz + - RCSample_Rate_16000: 16KHz + + * \~english + Voice message sampling rate. + + -RCSample_Rate_8000: 8KHz. + -RCSample_Rate_16000: 16KHz + */ +typedef NS_ENUM(NSInteger, RCSampleRate) { + RCSample_Rate_8000 = 1, // 8KHz + RCSample_Rate_16000 = 2, // 16KHz +}; + +/** + * \~chinese + 语音消息类型 + + - RCVoiceMessageTypeOrdinary: 普通音质语音消息 + - RCVoiceMessageTypeHighQuality: 高音质语音消息 + + * \~english + Voice message type. + + -RCVoiceMessageTypeOrdinary: Normal sound quality voice message. + -RCVoiceMessageTypeHighQuality: High quality voice message. + */ +typedef NS_ENUM(NSInteger, RCVoiceMessageType) { + RCVoiceMessageTypeOrdinary = 1, + RCVoiceMessageTypeHighQuality = 2, +}; + +#pragma mark - PublicService + +#pragma mark RCPublicServiceType +/*! + * \~chinese + 公众服务账号类型 + + * \~english + Type of public service account + */ +typedef NS_ENUM(NSUInteger, RCPublicServiceType) { + /*! + * \~chinese + 应用内公众服务账号 + + * \~english + Public service account in the application + */ + RC_APP_PUBLIC_SERVICE = 7, + + /*! + * \~chinese + 跨应用公众服务账号 + + * \~english + Cross-application public service account + */ + RC_PUBLIC_SERVICE = 8, +}; + +#pragma mark RCPublicServiceMenuItemType +/*! + * \~chinese + 公众服务菜单类型 + + * \~english + Public service menu type + */ +typedef NS_ENUM(NSUInteger, RCPublicServiceMenuItemType) { + /*! + * \~chinese + 包含子菜单的一组菜单 + + * \~english + A set of menus containing submenus + */ + RC_PUBLIC_SERVICE_MENU_ITEM_GROUP = 0, + + /*! + * \~chinese + 包含查看事件的菜单 + + * \~english + Menu containing view events + */ + RC_PUBLIC_SERVICE_MENU_ITEM_VIEW = 1, + + /*! + * \~chinese + 包含点击事件的菜单 + + * \~english + Menu containing click events + */ + RC_PUBLIC_SERVICE_MENU_ITEM_CLICK = 2, +}; + +#pragma mark RCSearchType +/*! + * \~chinese + 公众服务查找匹配方式 + + * \~english + Public service search matching mode + */ +typedef NS_ENUM(NSUInteger, RCSearchType) { + /*! + * \~chinese + 精确匹配 + + * \~english + Exact matching + */ + RC_SEARCH_TYPE_EXACT = 0, + + /*! + * \~chinese + 模糊匹配 + + * \~english + Fuzzy matching + */ + RC_SEARCH_TYPE_FUZZY = 1, + /*! + * \~chinese + 无效类型 + + * \~english + Invalid type + */ + RCSearchType_INVALID +}; + +/*! + * \~chinese + 客服服务方式 + + * \~english + Customer service mode + */ +typedef NS_ENUM(NSUInteger, RCCSModeType) { + /*! + * \~chinese + 无客服服务 + + * \~english + No customer service + */ + RC_CS_NoService = 0, + + /*! + * \~chinese + 机器人服务 + + * \~english + Robot service + */ + RC_CS_RobotOnly = 1, + + /*! + * \~chinese + 人工服务 + + * \~english + Manual service + */ + RC_CS_HumanOnly = 2, + + /*! + * \~chinese + 机器人优先服务 + + * \~english + Robot priority service + */ + RC_CS_RobotFirst = 3, +}; + +/*! + * \~chinese + 客服评价时机 + + * \~english + Timing of customer service evaluation + */ +typedef NS_ENUM(NSUInteger, RCCSEvaEntryPoint) { + /*! + * \~chinese + 离开客服评价 + + * \~english + Leave customer service evaluation + */ + RCCSEvaLeave = 0, + + /*! + * \~chinese + 在扩展中展示客户主动评价按钮,离开客服不评价 + + * \~english + Show the customer active evaluation button in the expansion and leave the customer service without evaluation + */ + RCCSEvaExtention = 1, + + /*! + * \~chinese + 无评价入口 + + * \~english + No evaluation entrance + */ + RCCSEvaNone = 2, + + /*! + * \~chinese + 坐席结束会话评价 + + * \~english + Evaluation of the end of the conversation at the end of the seat + */ + RCCSEvaCSEnd = 3, +}; + +/*! + * \~chinese + 客服留言类型 + + * \~english + Customer service message type + */ +typedef NS_ENUM(NSUInteger, RCCSLMType) { + /*! + * \~chinese + 本地 Native 页面留言 + + * \~english + Local Native page message + */ + RCCSLMNative = 0, + + /*! + * \~chinese + web 页面留言 + + * \~english + Web page message + */ + RCCSLMWeb = 1, +}; + +/*! + * \~chinese + 客服问题解决状态 + + * \~english + Resolution status of customer service problem + */ +typedef NS_ENUM(NSUInteger, RCCSResolveStatus) { + /*! + * \~chinese + 未解决 + + * \~english + Unresolved + */ + RCCSUnresolved = 0, + + /*! + * \~chinese + 已解决 + + * \~english + Resolved + */ + RCCSResolved = 1, + + /*! + * \~chinese + 解决中 + + * \~english + Solving + */ + RCCSResolving = 2, +}; + +/*! + * \~chinese + 客服评价类型 + + * \~english + Type of customer service evaluation + */ +typedef NS_ENUM(NSUInteger, RCCSEvaType) { + /*! + * \~chinese + 人工机器人分开评价 + + * \~english + Separate evaluation of manual and robot + */ + RCCSEvaSeparately = 0, + + /*! + * \~chinese + 人工机器人统一评价 + + * \~english + Unified evaluation of manual and robot + */ + EVA_UNIFIED = 1, +}; + +#pragma mark RCLogLevel +/*! + * \~chinese + 日志级别 + + * \~english + Log level + */ +typedef NS_ENUM(NSUInteger, RCLogLevel) { + + /*! + * \~chinese + * 不输出任何日志 + + * \~english + * Do not output any logs + */ + RC_Log_Level_None = 0, + + /*! + * \~chinese + * 只输出错误的日志 + + * \~english + * Output only error logs + */ + RC_Log_Level_Error = 1, + + /*! + * \~chinese + * 输出错误和警告的日志 + + * \~english + * Output logs of errors and warnings + */ + RC_Log_Level_Warn = 2, + + /*! + * \~chinese + * 输出错误、警告和一般的日志 + + * \~english + * Output errors, warnings, and general logs + */ + RC_Log_Level_Info = 3, + + /*! + * \~chinese + * 输出输出错误、警告和一般的日志以及 debug 日志 + + * \~english + * Output errors, warnings and general logs as well as debug logs + */ + RC_Log_Level_Debug = 4, + + /*! + * \~chinese + * 输出所有日志 + + * \~english + * Output all logs + */ + RC_Log_Level_Verbose = 5, +}; + +#pragma mark RCTimestampOrder +/*! + * \~chinese + 时间戳顺序 + + * \~english + Timestamp Order + */ +typedef NS_ENUM(NSUInteger, RCTimestampOrder) { + /*! + * \~chinese + * 降序, 按照时间戳从大到小 + + * \~english + * Descending order, from large to small according to timestamp + */ + RC_Timestamp_Desc = 0, + + /*! + * \~chinese + * 升序, 按照时间戳从小到大 + + * \~english + * In ascending order, from small to large according to the timestamp + */ + RC_Timestamp_Asc = 1, +}; + +#pragma mark RCPlatform +/*! + * \~chinese + 在线平台 + + * \~english + Online platform + */ +typedef NS_ENUM(NSUInteger, RCPlatform) { + /*! + * \~chinese + 其它平台 + + * \~english + Other platforms + */ + RCPlatform_Other = 0, + + /*! + iOS + */ + RCPlatform_iOS = 1, + + /*! + Android + */ + RCPlatform_Android = 2, + + /*! + Web + */ + RCPlatform_Web = 3, + + /*! + PC + */ + RCPlatform_PC = 4 +}; + +#pragma mark RCPushLauguageType +/*! + * \~chinese + push 语言设置 + + * \~english + Push language Settings + */ +typedef NS_ENUM(NSUInteger, RCPushLauguage) { + /*! + * \~chinese + 英文 + + * \~english + English + */ + RCPushLauguage_EN_US = 1, + /*! + * \~chinese + 中文 + + * \~english + Chinese + */ + RCPushLauguage_ZH_CN = 2, + /*! + * \~chinese + 阿拉伯文 + + * \~english + Arabic + */ + RCPushLauguage_AR_SA +}; + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCStatusMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCStatusMessage.h new file mode 100644 index 0000000..d02e03f --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCStatusMessage.h @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCStatusMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" +/** + * \~chinese + 状态消息的抽象基类,表示某种状态,不会存入消息历史记录。 + 此类消息不保证一定到达接收方(但只是理论上存在丢失的可能),但是速度最快,所以通常用来传递状态信息。 + + * \~english + The abstract base class of a status message that represents a state and is not stored in the message history. + Such messages are not guaranteed to reach the receiver (but there is only the possibility of loss in theory), but they are the fastest, so they are usually used to convey status information. +*/ +@interface RCStatusMessage : RCMessageContent + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTSMutableDictionary.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTSMutableDictionary.h new file mode 100644 index 0000000..385a6e1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTSMutableDictionary.h @@ -0,0 +1,13 @@ +// +// RCTSMutableDictionary.h +// RongIMKit +// +// Created by RongCloud on 16/5/12. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +@interface RCTSMutableDictionary : NSMutableDictionary + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTagInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTagInfo.h new file mode 100644 index 0000000..cbca854 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTagInfo.h @@ -0,0 +1,69 @@ +// +// RCTagInfo.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +/*! + * \~chinese + 标签信息 + + * \~english + Tag information + */ +@interface RCTagInfo : NSObject +/*! + * \~chinese + 标签 ID + + * \~english + tag ID + */ +@property (nonatomic, copy) NSString *tagId; + +/*! + * \~chinese + 标签名称 + + * \~english + Tag name + */ +@property (nonatomic, copy) NSString *tagName; + +/*! + * \~chinese + 该标签下的会话个数 + + * \~english + The number of conversations under this tag + */ +@property (nonatomic, assign) NSInteger count; + +/*! + * \~chinese + 标签创建时间 + + * \~english + Tag creation time + */ +@property (nonatomic, assign) long long timestamp; + +/*! + * \~chinese + RCTagInfo 初始化方法 + + @param tagId 标签 id + @param tagName 标签名称 + + * \~english + RCTagInfo initialization method. + + @ param tagId tag id. + @ param tagName tag name. + */ +- (instancetype)initWithTagInfo:(NSString *)tagId + tagName:(NSString *)tagName; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTagProtocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTagProtocol.h new file mode 100644 index 0000000..6d85545 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTagProtocol.h @@ -0,0 +1,47 @@ +// +// RCTagProtocol.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#ifndef RCTagProtocol_h +#define RCTagProtocol_h + +@protocol RCTagDelegate + +/*! + * \~chinese + 标签变化 + + @discussion 本端添加删除更新标签,不会触发不会触发此回调方法,在相关调用方法的 block 块直接回调 + + * \~english + Tag change. + + @ discussion Local label addition, deletion and update will not trigger or trigger this callback method, which will be called back directly in the block of the relevant calling method. + */ +- (void)onTagChanged; + +@end + + +@protocol RCConversationTagDelegate + +/*! + * \~chinese + 会话标签变化 + + @discussion 本端添加删除更新会话标签,不会触发此回调方法,在相关调用方法的 block 块直接回调 + + * \~english + Conversation tag change. + + @ discussion Local addition, deletion and update of conversation tag will not trigger this callback method, and will be called back directly in the block of the relevant calling method. + */ + +- (void)onConversationTagChanged; + +@end +#endif /* RCTagProtocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTextMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTextMessage.h new file mode 100644 index 0000000..99b16fe --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCTextMessage.h @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCTextMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 文本消息的类型名 + + * \~english + The type name of the text message + */ +#define RCTextMessageTypeIdentifier @"RC:TxtMsg" + +/*! + * \~chinese + 文本消息类 + + @discussion 文本消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Text message class. + + @ discussion Text message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCTextMessage : RCMessageContent + +/*! + * \~chinese + 文本消息的内容 + + * \~english + The content of a text message + */ +@property (nonatomic, copy) NSString *content; + +/*! + * \~chinese + 初始化文本消息 + + @param content 文本消息的内容 + @return 文本消息对象 + + * \~english + Initialize text message. + + @param content The content of a text message. + @ return text message object. + */ ++ (instancetype)messageWithContent:(NSString *)content; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUnknownMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUnknownMessage.h new file mode 100644 index 0000000..35568da --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUnknownMessage.h @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCUnknownMessage.h +// Created by xugang on 15/1/24. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 未知消息的类型名 + + * \~english + Type name of unknown message + */ +#define RCUnknownMessageTypeIdentifier @"RC:UnknownMsg" + +/*! + * \~chinese + 未知消息类 + + @discussion 所有未注册的消息类型,在 IMKit 中都会作为此类消息处理和显示。 + + * \~english + Unknown message class. + + @ discussion All unregistered message types are processed and displayed as such messages in IMKit. + */ +@interface RCUnknownMessage : RCMessageContent + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUploadImageStatusListener.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUploadImageStatusListener.h new file mode 100644 index 0000000..9860606 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUploadImageStatusListener.h @@ -0,0 +1,90 @@ +// +// RCUploadImageStatusListener.h +// RongIMLib +// +// Created by litao on 15/8/28. +// Copyright (c) 2015 RongCloud. All rights reserved. +// + +#import "RCMessage.h" +#import + +/*! + * \~chinese + 图片上传进度更新的IMKit监听 + + @discussion 此监听用于 IMKit 发送图片消息(上传到指定服务器)。 + App 在上传图片时,需要在监听中调用 updateBlock、successBlock 与 errorBlock,通知 IMKit + SDK 当前上传图片的进度和状态,SDK 会更新 UI。 + + * \~english + IMKit listening of image upload progress update. + + @ discussion This listening is used for IMKit to send image messages (uploaded to the specified server). + When uploading images, App shall call updateBlock, successBlock and errorBlock to notify IMKit SDK to upload the progress and status of the image during listening and SDK will update the UI. + */ +@interface RCUploadImageStatusListener : NSObject + +/*! + * \~chinese + 上传的图片消息的消息实体 + + * \~english + The message entity of the uploaded image message + */ +@property (nonatomic, strong) RCMessage *currentMessage; + +/*! + * \~chinese + 更新上传进度需要调用的 block [progress:当前上传的进度,0 <= progress < 100] + + * \~english + The block that shall be called to update the upload progress [progress: current upload progress, 0 < = progress < 100]. + */ +@property (nonatomic, strong) void (^updateBlock)(int progress); + +/*! + * \~chinese + 上传成功需要调用的 block [imageUrl:图片的网络 URL] + + * \~english + Block to be called for successful upload [imageUrl:network URL of image] + */ +@property (nonatomic, strong) void (^successBlock)(NSString *imageUrl); + +/*! + * \~chinese + 上传成功需要调用的 block [errorCode:上传失败的错误码,非 0 整数] + + * \~english + Block to be called for successful upload [errorCode: error code for failed upload, non-0 integer]. + */ +@property (nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode); + +/*! + * \~chinese + 初始化图片上传进度更新的IMKit监听 + + @param message 图片消息的消息实体 + @param progressBlock 更新上传进度需要调用的 block + @param successBlock 上传成功需要调用的 block + @param errorBlock 上传失败需要调用的 block + + @return 图片上传进度更新的 IMKit 监听对象 + + * \~english + Initialize IMKit listening for image upload progress updates. + + @param message The message entity of the image message. + @param message The block that shall be called to update the upload progress. + @param message The block to be called for successful upload. + @param message The block that shall be called for upload failure. + + @ return IMKit listener object for update of image upload progress. + */ +- (instancetype)initWithMessage:(RCMessage *)message + uploadProgress:(void (^)(int progress))progressBlock + uploadSuccess:(void (^)(NSString *imageUrl))successBlock + uploadError:(void (^)(RCErrorCode errorCode))errorBlock; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUploadMediaStatusListener.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUploadMediaStatusListener.h new file mode 100644 index 0000000..b377ca0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUploadMediaStatusListener.h @@ -0,0 +1,146 @@ +// +// RCUploadMediaStatusListener.h +// RongIMLib +// +// Created by litao on 15/8/28. +// Copyright (c) 2015 RongCloud. All rights reserved. +// + +#import "RCMessage.h" +#import + +/*! + * \~chinese + 媒体文件上传进度更新的 IMKit 监听 + + @discussion 此监听用于 IMKit 发送媒体文件消息(上传到指定服务器)。 + App 在上传媒体文件时,需要在监听中调用 updateBlock、successBlock 与 errorBlock,通知 IMKit + SDK 当前上传媒体文件的进度和状态,SDK 会更新 UI。 + + * \~english + IMKit listening of media file upload progress updates. + + @ discussion This listening is used for IMKit to send media file messages (uploaded to the specified server). + When uploading media files, App shall call updateBlock, successBlock and errorBlock to notify IMKit + SDK of the progress and status of the media file currently uploaded during listening and SDK will update the UI. + */ +@interface RCUploadMediaStatusListener : NSObject + +/*! + * \~chinese + 上传的媒体文件消息的消息实体 + + * \~english + The message entity of the uploaded media file message. + */ +@property (nonatomic, strong) RCMessage *currentMessage; + +/*! + * \~chinese + 更新上传进度需要调用的 block [progress:当前上传的进度,0 <= progress < 100] + + * \~english + The block that shall be called to update the upload progress [progress: current upload progress, 0 < = progress < 100]. + */ +@property (nonatomic, strong) void (^updateBlock)(int progress); + +/*! + * \~chinese + 上传成功需要调用的 block。 + content:上传成功之后,需要发送的消息内容。 + 您可以使用 currentMessage,把其中content属性对应的 url 字段设置成您上传成功的网络 URL。 + 请参考下面代码。 + + 升级说明:如果您之前使用了此接口,请参考下面代码把参数从 url 替换成 message。 + if ([currentMessage.content isKindOfClass:[RCImageMessage class]]) { + RCImageMessage *content = (RCImageMessage *)currentMessage.content; + content.imageUrl = remoteUrl; + successBlock(content); + } else if ([currentMessage.content isKindOfClass:[RCFileMessage class]]) { + RCFileMessage *content = (RCFilemessage *)currentMessage.content; + content.fileUrl = remoteUrl; + successBlock(content); + } + + * \~english + The block that shall be called for successful upload. + The content of the message to be sent after the content: is uploaded successfully. + You can use currentMessage to set the url field corresponding to the content attribute to the network URL that you successfully upload. + Please refer to the following code. + + Upgrade instructions: If you used this interface before, please refer to the following code to replace the parameter from url to message. + if ([currentMessage.content isKindOfClass:[RCImageMessage class]]) { + RCImageMessage *content = (RCImageMessage *)currentMessage.content; + content.imageUrl = remoteUrl; + successBlock(content); + } else if ([currentMessage.content isKindOfClass:[RCFileMessage class]]) { + RCFileMessage *content = (RCFilemessage *)currentMessage.content; + content.fileUrl = remoteUrl; + successBlock(content); + } + */ +@property (nonatomic, strong) void (^successBlock)(RCMessageContent *content); + +/*! + * \~chinese + 上传成功需要调用的 block [errorCode:上传失败的错误码,非 0 整数] + + * \~english + Block to be called for successful upload [errorCode: error code for failed upload, non-0 integer]. + */ +@property (nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode); + +/*! + * \~chinese + 上传取消需要调用的 block + + * \~english + The block that shall be called to cancel upload + */ +@property (nonatomic, strong) void (^cancelBlock)(void); + +/*! + * \~chinese + 初始化媒体文件上传进度更新的 IMKit 监听 + + @param message 媒体文件消息的消息实体 + @param progressBlock 更新上传进度需要调用的 block + @param successBlock 上传成功需要调用的 block + @param errorBlock 上传失败需要调用的 block + @param cancelBlock 上传取消需要调用的 block( 如果未实现,传 nil 即可) + + @return 媒体文件上传进度更新的 IMKit 监听对象 + + * \~english + Initialize IMKit listening for media file upload progress updates. + + @param message The message entity of the media file message. + @param progressBlock The block that shall be called to update the upload progress. + @param successBlock Block to be called for successful upload. + @param errorBlock The block that shall be called for upload failure. + @param cancelBlock The block that shall be called to cancel upload (if it is not implemented, you can send it to nil). + + @ return IMKit listener object for media file upload progress updates. + */ +- (instancetype)initWithMessage:(RCMessage *)message + uploadProgress:(void (^)(int progress))progressBlock + uploadSuccess:(void (^)(RCMessageContent *content))successBlock + uploadError:(void (^)(RCErrorCode errorCode))errorBlock + uploadCancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 取消当前上传 + + @discussion 如果您实现取消正在上传的媒体消息功能,则必须实现此回调。 + 您需要在取消成功之后,调用 cancelBlock 通知 SDK,SDK 会自动更新 UI。 + + * \~english + Cancel the current upload. + + @ discussion If you implement the ability to cancel media messages being uploaded, you must implement this callback. + You shall call cancelBlock to notify SDK and SDK will update automatically UI after the cancellation is successful. + */ +- (void)cancelUpload; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserInfo.h new file mode 100644 index 0000000..bbee08c --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserInfo.h @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCUserInfo.h +// Created by Heq.Shinoda on 14-6-16. + +#import + +/*! + * \~chinese + 用户信息类 + + * \~english + User information class + */ +@interface RCUserInfo : NSObject + +/*! + * \~chinese + 用户 ID + + * \~english + User ID + */ +@property (nonatomic, copy) NSString *userId; + +/*! + * \~chinese + 用户名称 + + * \~english + User name + */ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 用户头像的 URL + + * \~english + The URL of the user's portrait + */ +@property (nonatomic, copy) NSString *portraitUri; + +/** + * \~chinese + 用户信息附加字段 + + * \~english + Additional fields of user information + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese + 用户信息的初始化方法 + + @param userId 用户 ID + @param username 用户名称 + @param portrait 用户头像的 URL + @return 用户信息对象 + + * \~english + Initialization method of user information. + + @param userId User ID. + @param username User name. + @param portrait The URL of the user's portrait. + @ return user Information object. + */ +- (instancetype)initWithUserId:(NSString *)userId name:(NSString *)username portrait:(NSString *)portrait; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserOnlineStatusInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserOnlineStatusInfo.h new file mode 100644 index 0000000..04a60c1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserOnlineStatusInfo.h @@ -0,0 +1,58 @@ +// +// RCUserOnlineStatusInfo.h +// RongIMLib +// +// Created by RongCloud on 16/9/26. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCStatusDefine.h" +#import + +/*! + * \~chinese + 用户在线状态 + + * \~english + User online status + */ +@interface RCUserOnlineStatusInfo : NSObject + +/*! + * \~chinese + 在线的平台 + + * \~english + Online platform +*/ +@property (nonatomic, assign) RCPlatform platform; + +/*! + * \~chinese + 融云服务在线状态 + + @discussion 0 表示离线,1 表示在线 + + * \~english + Online status of financial cloud service. + + @ discussion 0 means offline, 1 means online. + */ +@property (nonatomic, assign) int rcServiceStatus; + +/*! + * \~chinese + 用户自定义的在线状态(1 < customerStatus <= 255) + + @discussion + 如果没有通过 RCIMClient 的 setUserOnlineStatus:success:error: 设置自定义的在线状态,默认的在线状态值为 1,若离线则为 0。 + + * \~english + User-defined presence status (1 < customerStatus < = 255). + + @ discussion + If failed, perform setUserOnlineStatus:success:error: of RCIMClient. Set the custom online status. The default online status value is 1. if offline, it is 0. + */ +@property (nonatomic, assign) int customerStatus; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserTypingStatus.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserTypingStatus.h new file mode 100644 index 0000000..5bbb7f0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUserTypingStatus.h @@ -0,0 +1,65 @@ +// +// RCUserTypingStatus.h +// RongIMLib +// +// Created by RongCloud on 16/1/8. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 用户输入状态类 + + * \~english + User input status class. + */ +@interface RCUserTypingStatus : NSObject + +/*! + * \~chinese + 当前正在输入的用户 ID + + * \~english + The user ID that is currently being entered. + */ +@property (nonatomic, copy) NSString *userId; + +/*! + * \~chinese + 当前正在输入的消息类型名 + + @discussion + contentType 为用户当前正在编辑的消息类型名,即 RCMessageContent 中 getObjectName 的返回值。 + 如文本消息,应该传类型名"RC:TxtMsg"。 + + * \~english + The name of the message type currently being entered. + + @ discussion + ContentType is the name of the message type that the user is currently editing, that is, the return value of getObjectName in RCMessageContent. + E.g. for a text message, pass the type name "RC:TxtMsg". + */ +@property (nonatomic, copy) NSString *contentType; + +/*! + * \~chinese + 初始化用户输入状态对象 + + @param userId 当前正在输入的用户ID + @param objectName 当前正在输入的消息类型名 + + @return 用户输入状态对象 + + * \~english + Initialize user input status object. + + @param userId The user ID that is currently being entered. + @param objectName The name of the message type currently being entered. + + @ return user input status object. + */ +- (instancetype)initWithUserId:(NSString *)userId contentType:(NSString *)objectName; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUtilities.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUtilities.h new file mode 100644 index 0000000..7035dc8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCUtilities.h @@ -0,0 +1,545 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCUtilities.h +// Created by Heq.Shinoda on 14-5-15. + +#ifndef __RCUtilities +#define __RCUtilities + +#import "RCMessage.h" +#import + +/*! + * \~chinese + 工具类 + + * \~english + Tool class + */ +@interface RCUtilities : NSObject + +/*! + * \~chinese + 将 base64 编码的字符串解码并转换为 NSData 数据 + + @param string base64 编码的字符串 + @return 解码后的 NSData 数据 + + @discussion 此方法主要用于 iOS6 解码 base64。 + + * \~english + Decode and convert base64-encoded strings into NSData data. + + @param string Base64 encoded string. + @ return decoded NSData data. + + @ discussion This method is mainly used for iOS6 decoding base64. + */ ++ (NSData *)dataWithBase64EncodedString:(NSString *)string; + +/*! + * \~chinese + 将 NSData 数据转化并编码为 base64 的字符串 + + @param data 未编码的 NSData 数据 + @return 编码后的 base64 字符串 + + @discussion 此方法主要用于 iOS6 编码 base64。 + + * \~english + Convert and encode NSData data into base64 strings. + + @param data Unencoded NSData data. + @ return encoded base64 string. + + @ discussion This method is mainly used for iOS6 encoding base64. + */ ++ (NSString *)base64EncodedStringFrom:(NSData *)data; + +/*! + * \~chinese + scaleImage + + @param image image + @param scaleSize scaleSize + + @return scaled image + + * \~english + ScaleImage. + + @param image Image. + @param scaleSize ScaleSize. + + @ return scaled image. + */ ++ (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize; + +/*! + * \~chinese + imageByScalingAndCropSize + + @param image image + @param targetSize targetSize + + @return image + + * \~english + ImageByScalingAndCropSize. + + @param image Image. + @param targetSize TarGetize. + + @ return image. + */ ++ (UIImage *)imageByScalingAndCropSize:(UIImage *)image targetSize:(CGSize)targetSize; + +/*! + * \~chinese +根据配置压缩图片,如果设置了[RCCoreClient sharedCoreClient].imageCompressConfig ,就按照此设置进行压缩。如果没有设置,就按照RCConfigg.plis文件中的配置进行压缩。 + + @param image 原图片 + @return 压缩后的图片 + + * \~english + Compress the image according to the configuration, and compress the image according to this setting if [RCCoreClient sharedCoreClient]. ImageCompressConfig, is set. If it is not set, compress it according to the configuration in the RCConfigg.plis file. + + @param image Original image. + @ return compressed image. + */ ++ (UIImage *)generateThumbnailByConfig:(UIImage *)image; + +/*! + generate thumbnail from image + + @param image image + @param targetSize targetSize + + @return image + */ ++ (UIImage *)generateThumbnail:(UIImage *)image targetSize:(CGSize)targetSize; + +/*! + generate thumbnail from image + + @param image image + @param targetSize targetSize + @param percent percent + + @return image + */ ++ (UIImage *)generateThumbnail:(UIImage *)image targetSize:(CGSize)targetSize percent:(CGFloat)percent; +/*! + compressedImageWithMaxDataLength + + @param image image + @param maxDataLength maxDataLength + + @return nsdate + */ ++ (NSData *)compressedImageWithMaxDataLength:(UIImage *)image maxDataLength:(CGFloat)maxDataLength; + +/*! + compressedImageAndScalingSize + + @param image image + @param targetSize targetSize + @param maxDataLen maxDataLen + + @return image nsdata + */ ++ (NSData *)compressedImageAndScalingSize:(UIImage *)image targetSize:(CGSize)targetSize maxDataLen:(CGFloat)maxDataLen; + +/*! + compressedImageAndScalingSize + + @param image image + @param targetSize targetSize + @param percent percent + + @return image nsdata + */ ++ (NSData *)compressedImageAndScalingSize:(UIImage *)image targetSize:(CGSize)targetSize percent:(CGFloat)percent; +/*! + compressedImage + + @param image image + @param percent percent + + @return image nsdata + */ ++ (NSData *)compressedImage:(UIImage *)image percent:(CGFloat)percent; + +/*! + * \~chinese + 获取文字显示的尺寸 + + @param text 文字 + @param font 字体 + @param constrainedSize 文字显示的容器大小 + + @return 文字显示的尺寸 + + @discussion 该方法在计算 iOS 7 以下系统显示的时候默认使用 NSLineBreakByTruncatingTail 模式。 + + * \~english + Get the size of the text display. + + @param text Words. + @param font Font. + @param constrainedSize Container size for text display. + + @ return The size of text display. + + @ discussion This method uses NSLineBreakByTruncatingTail mode by default when the system display below iOS 7 is calculated. + */ ++ (CGSize)getTextDrawingSize:(NSString *)text font:(UIFont *)font constrainedSize:(CGSize)constrainedSize; + +/*! + * \~chinese + 判断是否是本地路径 + + @param path 路径 + + @return 是否是本地路径 + + * \~english + Determine whether it is a local path. + + @param path Path. + + @ return Whether it is a local path. + */ ++ (BOOL)isLocalPath:(NSString *)path; + +/*! + * \~chinese + 判断是否是网络地址 + + @param url 地址 + + @return 是否是网络地址 + + * \~english + Determine whether it is a network address. + + @param url Address. + + @ return Whether it is a network address. + */ ++ (BOOL)isRemoteUrl:(NSString *)url; + +/*! + * \~chinese + 获取沙盒修正后的文件路径 + + @param localPath 本地路径 + + @return 修正后的文件路径 + + * \~english + Get the revised file path of sandboxes + + @param localPath Local path. + + @ return revised file path. + */ ++ (NSString *)getCorrectedFilePath:(NSString *)localPath; + +/*! + * \~chinese + * 获取文件存储路径 + + * \~english + * Obtain the file storage path + */ ++ (NSString *)getFileStoragePath; + +/*! + excludeBackupKeyForURL + + @param storageURL storageURL + + @return BOOL + */ ++ (BOOL)excludeBackupKeyForURL:(NSURL *)storageURL; + +/*! + * \~chinese + 获取 App 的文件存放路径 + + @return App 的文件存放路径 + + * \~english + Get the file storage path of App. + + @ return App's file storage path. + */ ++ (NSString *)applicationDocumentsDirectory; + +/*! + * \~chinese + 获取融云 SDK 的文件存放路径 + + @return 融云 SDK 的文件存放路径 + + * \~english + Get the file storage path of the RongCloud SDK. + + @ return the file storage path of RongCloud SDK. + */ ++ (NSString *)rongDocumentsDirectory; + +/*! + * \~chinese + 获取融云 SDK 的缓存路径 + + @return 融云 SDK 的缓存路径 + + * \~english + Get the cache path of RongCloud SDK. + + @ return the cache path of RongCloud SDK. + */ ++ (NSString *)rongImageCacheDirectory; + +/*! + * \~chinese + 获取当前系统时间 + + @return 当前系统时间 + + * \~english + Get the current system time. + + @ return current system time. + */ ++ (NSString *)currentSystemTime; + +/*! + * \~chinese + 获取当前运营商名称 + + @return 当前运营商名称 + + * \~english + Get the current operator name. + + @ return current operator name. + */ ++ (NSString *)currentCarrier; + +/*! + * \~chinese + 获取当前网络类型 + + @return 当前网络类型 + + * \~english + Get the current network type. + + @ return current network type. + */ ++ (NSString *)currentNetWork; + +/*! + * \~chinese + 获取当前网络类型 + + @return 当前网络类型 + + * \~english + Get the current network type. + + @ return current network type. + */ ++ (NSString *)currentNetworkType; + +/*! + * \~chinese + 获取系统版本 + + @return 系统版本 + + * \~english + Get system version. + + @ return system version. + */ ++ (NSString *)currentSystemVersion; + +/*! + * \~chinese + 获取设备型号 + + @return 设备型号 + + * \~english + Get the device model. + + @ return device model. + */ ++ (NSString *)currentDeviceModel; + +/*! + * \~chinese + 获取非换行的字符串 + + @param originalString 原始的字符串 + + @return 非换行的字符串 + + @discussion 所有换行符将被替换成单个空格 + + * \~english + Get a string that is not a newline. + + @param originalString Original string. + + @ return non-newline string. + + @ discussion All newline characters will be replaced with a single space. + */ ++ (NSString *)getNowrapString:(NSString *)originalString; + +/** + * \~chinese + 获取消息类型对应的描述 + + @param mediaType 消息类型 + @return 描述 + + * \~english + Get the description corresponding to the message type. + + @param mediaType Message type. + @ return description. + */ ++ (NSString *)getMediaTypeString:(RCMediaType)mediaType; + +/** + * \~chinese + 获取消息内容对应的媒体类型 + + @param content 消息内容 + @return 媒体类型,如果是不支持的媒体类型或者消息,将返回 -1 + + * \~english + Get the media type corresponding to the message content. + + @param content Message content. + @ return media type. If it is an unsupported media type or message,-1 will be returned. + */ ++ (RCMediaType)getMediaType:(RCMessageContent *)content; + +/** + * \~chinese + 判断一张照片是否是含透明像素的照片 + + @param image 原始照片 + @return 是否包含透明像素,YES 包含, NO 不包含 + + * \~english + Determine whether a image is a image with transparent pixels. + + @param image Original image. + Whether @ return contains transparent pixels, YES does, and NO does not. + */ ++ (BOOL)isOpaque:(UIImage *)image; + +/** + * \~chinese + URL 编码 + + @return 编码后的 URL + + * \~english + URL coding. + + @ return encoded URL. + */ ++ (NSString *)encodeURL:(NSString *)url; + ++ (NSData *)compressImage:(UIImage *)sourceImage; + +/** + * \~chinese + 检查字符串是否符合聊天室属性名称的格式 + + @param key 聊天室属性名称 + @return 是否符合聊天室属性名称的格式,YES 符合, NO 不符合 + + @discussion Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式 + + * \~english + Check whether the string matches the format of the chat room attribute name. + + @param key Chat room attribute name. + Whether @ return conforms to the format of chat room attribute names, YES does, but NO does not. + + @ discussion Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. + */ ++ (BOOL)checkChatroomKey:(NSString *)key; + +/** + * \~chinese +生成 22 位的 UUID + +@return 22 位的 UUID + + * \~english + Generate 22-bit UUID. + + @ return 22-bit UUID. +*/ ++ (NSString *)get22bBitUUID; + +/** + * \~chinese +生成 UUID + +@return UUID + + * \~english + Generate UUID. + + @ return UUID. +*/ ++ (NSString *)getUUID; + +/** + * \~chinese +生成 DeviceId + +@return DeviceId 连接改造使用的 + + * \~english + Generate DeviceId. + + @ return DeviceId connection transformation. + */ ++ (NSString *)getDeviceId:(NSString *)appKey; + +/** + * \~chinese +获取手机型号 + +@return 手机型号 + + * \~english + Get the phone model. + + @ return mobile phone model + */ ++ (NSString *)iphoneType; + +@end + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCVoiceMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCVoiceMessage.h new file mode 100644 index 0000000..c8e1eec --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCVoiceMessage.h @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCVoiceMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 语音消息的类型名 + + * \~english + The type name of the voice message + */ +#define RCVoiceMessageTypeIdentifier @"RC:VcMsg" + +/*! + * \~chinese + 语音消息类 + + @discussion 语音消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Voice message class. + + @ discussion voice message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCVoiceMessage : RCMessageContent + +/*! + * \~chinese + wav 格式的音频数据 + + * \~english + Audio data in wav format. + */ +@property (nonatomic, strong) NSData *wavAudioData; + +/*! + * \~chinese + 语音消息的时长, 以秒为单位 + + * \~english + The duration of the voice message, in seconds. + */ +@property (nonatomic, assign) long duration; + + +/*! + * \~chinese + 初始化语音消息 + + @param audioData wav格式的音频数据 + @param duration 语音消息的时长,以秒为单位 + @return 语音消息对象 + + @discussion + 如果您不是使用IMKit中的录音功能,则在初始化语音消息的时候,需要确保以下几点。 + 1. audioData 必须是单声道的 wav 格式音频数据; + 2. audioData 的采样率必须是 8000Hz,采样位数(精度)必须为 16 位。 + + 您可以参考 IMKit 中的录音参数: + NSDictionary *settings = @{AVFormatIDKey: @(kAudioFormatLinearPCM), + AVSampleRateKey: @8000.00f, + AVNumberOfChannelsKey: @1, + AVLinearPCMBitDepthKey: @16, + AVLinearPCMIsNonInterleaved: @NO, + AVLinearPCMIsFloatKey: @NO, + AVLinearPCMIsBigEndianKey: @NO}; + + * \~english + Initialize voice messages. + + @param audioData Audio data in wav format. + @param duration The duration of the voice message, in seconds. + @ return voice message object. + + @ discussion + If you are not using the recording feature in IMKit, you shall ensure the following when initializing voice messages. + 1. AudioData must be mono wav format audio data. + 2. The sampling rate of audioData must be 8000Hz and the number of sampling bits (precision) must be 16 bits. + + You can refer to the recording parameters in IMKit: + NSDictionary *settings = @{AVFormatIDKey: @(kAudioFormatLinearPCM), + AVSampleRateKey: @8000.00f, + AVNumberOfChannelsKey: @1, + AVLinearPCMBitDepthKey: @16, + AVLinearPCMIsNonInterleaved: @NO, + AVLinearPCMIsFloatKey: @NO, + AVLinearPCMIsBigEndianKey: @NO}; + */ ++ (instancetype)messageWithAudio:(NSData *)audioData duration:(long)duration; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCWatchKitStatusDelegate.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCWatchKitStatusDelegate.h new file mode 100644 index 0000000..364957f --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCWatchKitStatusDelegate.h @@ -0,0 +1,272 @@ +// +// RCWatchKitStatusDelegate.h +// RongIMLib +// +// Created by litao on 15/6/4. +// Copyright (c) 2015 RongCloud. All rights reserved. +// + +#ifndef RongIMLib_RCwatchKitStatusDelegate_h +#define RongIMLib_RCwatchKitStatusDelegate_h + +/*! + * \~chinese + 用于 Apple Watch 的 IMLib 事务监听器 + + @discussion 此协议定义了 IMLib 在状态变化和各种活动时的回调,主要用于 Apple + Watch。 + + * \~english + IMLib transaction listener for Apple Watch. + + @ discussion This protocol defines the callback for IMLib in case of state changes and various activities, and is mainly used for Apple. + Watch . + */ +@protocol RCWatchKitStatusDelegate + +@optional + +#pragma mark Connection status +/*! + * \~chinese + 连接状态发生变化的回调 + + @param status SDK 与融云服务器的连接状态 + + * \~english + Callback for a change in connection status. + + @param status Connection status between SDK and CVM. + */ +- (void)notifyWatchKitConnectionStatusChanged:(RCConnectionStatus)status; + +#pragma mark Message Receive + +/*! + * \~chinese + 收到消息的回调 + + @param receivedMsg 收到的消息实体 + + * \~english + Callback for receiving message. + + @param receivedMsg Received message entity. + */ +- (void)notifyWatchKitReceivedMessage:(RCMessage *)receivedMsg; + +/*! + * \~chinese + 向外发送消息的回调 + + @param message 待发送消息 + + * \~english + Callback for sending messages out. + + @param message Message to be sent. + */ +- (void)notifyWatchKitSendMessage:(RCMessage *)message; + +/*! + * \~chinese + 发送消息完成的回调 + + @param messageId 消息 ID + @param status 完成的状态吗。0 表示成功,非 0 表示失败 + + * \~english + Callback for sending message completely + + @param messageId Message ID. + @param status The state of completion. 0 indicates success, and non-0 indicates failure. + */ +- (void)notifyWatchKitSendMessageCompletion:(long)messageId status:(RCErrorCode)status; + +/*! + * \~chinese + 上传图片进度更新的回调 + + @param progress 进度 + @param messageId 消息 ID + + * \~english + Callback for progress update for uploading images. + + @param progress Progress. + @param messageId Message ID. + */ +- (void)notifyWatchKitUploadFileProgress:(int)progress messageId:(long)messageId; + +#pragma mark Message & Conversation +/*! + * \~chinese + 删除会话的回调 + + @param conversationTypeList 会话类型的数组 + + * \~english + Callback for deleting the conversation. + + @param conversationTypeList An array of conversation types. + */ +- (void)notifyWatchKitClearConversations:(NSArray *)conversationTypeList; + +/*! + * \~chinese + 删除消息的回调 + + @param conversationType 会话类型 + @param targetId 会话 ID + + * \~english + Callback for deleting the message. + + @param conversationType Conversation type + @param targetId Conversation ID. + */ +- (void)notifyWatchKitClearMessages:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 删除消息的回调 + + @param messageIds 消息 ID 的数组 + + * \~english + Callback for deleting the message. + + @param messageIds Array of message ID. + */ +- (void)notifyWatchKitDeleteMessages:(NSArray *)messageIds; + +/*! + * \~chinese + 清除未读消息数的回调 + + @param conversationType 会话类型 + @param targetId 会话 ID + + * \~english + Callback for clearing the number of unread messages. + + @param conversationType Conversation type + @param targetId Conversation ID. + */ +- (void)notifyWatchKitClearUnReadStatus:(RCConversationType)conversationType targetId:(NSString *)targetId; + +#pragma mark Discussion + +/*! + * \~chinese + 创建讨论组的回调 + + @param name 讨论组名称 + @param userIdList 成员的用户 ID 列表 + + * \~english + Callback for creating a discussion group. + + @param name Discussion Group name. + @param userIdList User ID list of members. + */ +- (void)notifyWatchKitCreateDiscussion:(NSString *)name userIdList:(NSArray *)userIdList; + +/*! + * \~chinese + 创建讨论组成功的回调 + + @param discussionId 讨论组的 ID + + * \~english + Callback for creating a discussion group successfully + + @param discussionId ID of the discussion group. + */ +- (void)notifyWatchKitCreateDiscussionSuccess:(NSString *)discussionId; + +/*! + * \~chinese + 创建讨论组失败 + + @param errorCode 创建失败的错误码 + + * \~english + Failed to create discussion group. + + @param errorCode Create a failed error code. + */ +- (void)notifyWatchKitCreateDiscussionError:(RCErrorCode)errorCode; + +/*! + * \~chinese + 讨论组加人的回调 + + @param discussionId 讨论组的 ID + @param userIdList 添加成员的用户 ID 列表 + + @discussion 加人的结果可以通过 notifyWatchKitDiscussionOperationCompletion 获得。 + + * \~english + Callback for discussion group members. + + @param discussionId ID of the discussion group. + @param userIdList ID list of users who add members. + + @ discussion The added results can be obtained through notifyWatchKitDiscussionOperationCompletion. + */ +- (void)notifyWatchKitAddMemberToDiscussion:(NSString *)discussionId userIdList:(NSArray *)userIdList; + +/*! + * \~chinese + 讨论组踢人的回调 + + @param discussionId 讨论组 ID + @param userId 用户 ID + + @discussion 踢人的结果可以通过 notifyWatchKitDiscussionOperationCompletion 获得。 + + * \~english + Callback for kicking in the discussion group. + + @param discussionId Discussion group ID. + @param userId User ID. + + @ discussion The result of kicking can be obtained through notifyWatchKitDiscussionOperationCompletion. + */ +- (void)notifyWatchKitRemoveMemberFromDiscussion:(NSString *)discussionId userId:(NSString *)userId; + +/*! + * \~chinese + 退出讨论组的回调 + + @param discussionId 讨论组 ID + + @discussion 创建的结果可以通过 notifyWatchKitDiscussionOperationCompletion 获得。 + + * \~english + Callback for exiting the discussion group. + + @param discussionId Discussion group ID. + + @ discussion The results created can be obtained through notifyWatchKitDiscussionOperationCompletion. + */ +- (void)notifyWatchKitQuitDiscussion:(NSString *)discussionId; + +/*! + * \~chinese + 讨论组操作的回调。tag:100-邀请;101-踢人;102-退出。status:0 成功,非 0 失败 + + @param tag 讨论组的操作类型。100 为加人,101 为踢人,102 为退出 + @param status 操作的结果。0表示成功,非0表示失败 + + * \~english + Callback for discussion group operation. Tag:100- invitation; 101-kick; 102-quit. Status:0 for success, non-zero for failure + + @param tag The type of operation for the discussion group. 100 for joining, 101 for kicking and 102 for quitting. + @param status The result of the operation. 0 indicates success, and non-0 indicates failure. + */ +- (void)notifyWatchKitDiscussionOperationCompletion:(int)tag status:(RCErrorCode)status; + +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCiOSConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCiOSConfig.h new file mode 100644 index 0000000..3cc4a64 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RCiOSConfig.h @@ -0,0 +1,63 @@ +// +// RCiOSConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/9/17. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCiOSConfig : NSObject + +/*! + * \~chinese + iOS 平台通知栏分组 ID + 相同的 thread-id 推送分为一组 + iOS10 开始支持 + + * \~english + Group ID of iOS platform notification bar + The push with same thread-id is divided into a group. + IOS10 starts to support. + */ +@property (nonatomic, copy) NSString *threadId; + +/*! + * \~chinese + iOS 标识推送的类型 + 如果不设置后台默认取消息类型字符串,如 RC:TxtMsg + + * \~english + Type of pushed iOS identifier + If you do not set the background to take the message type string by default, such as RC:TxtMsg. + */ +@property (nonatomic, copy) NSString *category; + +/*! + * \~chinese + iOS 平台通知覆盖 ID + apnsCollapseId 相同时,新收到的通知会覆盖老的通知,最大 64 字节 + iOS10 开始支持 + + * \~english + Overriding ID of iOS platform notification + When the apnsCollapseId is the same, the new notification will overwrite the old notification with maximum of 64 bytes. + iOS10 starts to support it + */ +@property (nonatomic, copy) NSString *apnsCollapseId; + +/*! + * \~chinese + iOS 富文本推送内容 + + * \~english + Content of pushed iOS rich text + */ +@property (nonatomic, copy) NSString *richMediaUri; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RongIMLibCore.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RongIMLibCore.h new file mode 100644 index 0000000..a019146 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/RongIMLibCore.h @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RongIMLibCore.h +// Created by xugang on 14/12/11. + +#import + +//! Project version number for RongIMLibCore. +FOUNDATION_EXPORT double RongIMLibCoreVersionNumber; + +//! Project version string for RongIMLibCore. +FOUNDATION_EXPORT const unsigned char RongIMLibCoreVersionString[]; + +/// IMLib +#import +#import +#import +#import +/// Conversation +#import +#import +#import +/// Message +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +/// Util +#import +#import +#import +#import +#import + +/// Other +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import + +// log +#import + +// Downlad +#import +#import diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/interf_dec.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/interf_dec.h new file mode 100644 index 0000000..5edba0c --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/interf_dec.h @@ -0,0 +1,34 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 2009 Martin Storsjo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ + +#ifndef OPENCORE_AMRNB_INTERF_DEC_H +#define OPENCORE_AMRNB_INTERF_DEC_H + +#ifdef __cplusplus +extern "C" { +#endif + +void *Decoder_Interface_init(void); +void Decoder_Interface_exit(void *state); +void Decoder_Interface_Decode(void *state, const unsigned char *in, short *out, int bfi); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/interf_enc.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/interf_enc.h new file mode 100644 index 0000000..781e2fe --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Headers/interf_enc.h @@ -0,0 +1,50 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 2009 Martin Storsjo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ + +#ifndef OPENCORE_AMRNB_INTERF_ENC_H +#define OPENCORE_AMRNB_INTERF_ENC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef AMRNB_WRAPPER_INTERNAL +/* Copied from enc/src/gsmamr_enc.h */ +enum Mode { + MR475 = 0, /* 4.75 kbps */ + MR515, /* 5.15 kbps */ + MR59, /* 5.90 kbps */ + MR67, /* 6.70 kbps */ + MR74, /* 7.40 kbps */ + MR795, /* 7.95 kbps */ + MR102, /* 10.2 kbps */ + MR122, /* 12.2 kbps */ + MRDTX, /* DTX */ + N_MODES /* Not Used */ +}; +#endif + +void *Encoder_Interface_init(int dtx); +void Encoder_Interface_exit(void *state); +int Encoder_Interface_Encode(void *state, enum Mode mode, const short *speech, unsigned char *out, int forceSpeech); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Info.plist b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Info.plist new file mode 100644 index 0000000..b5d0788 Binary files /dev/null and b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Info.plist differ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Modules/module.modulemap b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Modules/module.modulemap new file mode 100644 index 0000000..ee665e7 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RongIMLibCore { + umbrella header "RongIMLibCore.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/RongIMLibCore b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/RongIMLibCore new file mode 100644 index 0000000..3f81ab3 Binary files /dev/null and b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/RongIMLibCore differ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..bd9ce14 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-arm64_armv7/RongIMLibCore.framework/_CodeSignature/CodeResources @@ -0,0 +1,1092 @@ + + + + + files + + Headers/RCAMRDataConverter.h + + z82A8pT37Su0Trz2TFD8JnoBsV8= + + Headers/RCAndroidConfig.h + + CUfttSZyDOOH7r8GP1P+YeKZC6w= + + Headers/RCChannelClient.h + + DVHXzbtlt0amNwt7mMBbXllGAAU= + + Headers/RCCommandMessage.h + + 9J3Uk3CXXhn8BBJbMxZ4Niq0f9Y= + + Headers/RCCommandNotificationMessage.h + + zJ2Q6SxBDESNqrJkM9phu5wUB4A= + + Headers/RCContactNotificationMessage.h + + 4ZdwrYySNZVNOahxOB4WTWa/vHs= + + Headers/RCConversation.h + + EcFFJIdI9YQPOnVF0wzhcPvTHuA= + + Headers/RCConversationChannelProtocol.h + + Eqk7tzNzQm++TWxcEMriP+rZ9x0= + + Headers/RCConversationIdentifier.h + + ev9iFFAllQdMtrfh8qayGy02FKE= + + Headers/RCConversationStatusInfo.h + + zd4EzEDoRoS6JOQVEuEdBKTVXVc= + + Headers/RCConversationTagInfo.h + + JPMapGS1Bt2DgsLltG9gAssYHzs= + + Headers/RCCoreClient.h + + fTLKTGAKjUqNjqMMDkAbSZWHIik= + + Headers/RCDownloadItem.h + + uUxMJPJUub3kI+D9XIZmQZwSqWQ= + + Headers/RCFileMessage.h + + ETYYNnrA/I/Z9r3BPHPoI7K7pEA= + + Headers/RCFileUtility.h + + /fYWIopRzVhBM36CRnKEYZVVGuc= + + Headers/RCFwLog.h + + z2xBa7jqDb+D3akVfDtwqgue1HA= + + Headers/RCGIFMessage.h + + THA3P3rAxO/GiMWunSbSb4Lf/mc= + + Headers/RCGroup.h + + QPHfV6mabNlczy0x1IAUoPFTm44= + + Headers/RCGroupMessageReaderV2.h + + 9AQw+VUYIiG6L0IWuo3lj4mjphI= + + Headers/RCGroupNotificationMessage.h + + E4wgZxjkrjt9mvQk4FLZvw5dS/A= + + Headers/RCGroupReadReceiptInfoV2.h + + CqwAC233kpRqdjiVGt89FYLjDzg= + + Headers/RCGroupReadReceiptV2Manager.h + + cH7nAU7sn64Hpm9kd0Xciezf4p0= + + Headers/RCGroupReadReceiptV2Protocol.h + + gCPcphSMWIbWW7ZiODSOEMpe5xo= + + Headers/RCHQVoiceMessage.h + + aTWhNDyi4LYX19dWxpPba/1+9ZE= + + Headers/RCHistoryMessageOption.h + + SQkiWf4YCOZdlg1LstTUQzOD9Z0= + + Headers/RCIMClientProtocol.h + + Xv0xB9mt8aI9fjCXyarayKvtMOY= + + Headers/RCImageCompressConfig.h + + 5Ptf+r4cwJvCpO5DZVsYNcmC54I= + + Headers/RCImageMessage.h + + 04AQ8vxkxDdXTgVh2Tjhs569P2Y= + + Headers/RCInformationNotificationMessage.h + + tDVzRchCtUOCjJGGyOEoETG+LYE= + + Headers/RCMediaMessageContent.h + + Bu2mIpcp9X7QT+V59QtkhUG9jFA= + + Headers/RCMentionedInfo.h + + 9tXPz4Z1hka5gIcelfjtO72nW5I= + + Headers/RCMessage.h + + uuzZsXJXKrosslhRLGkW+idmnUE= + + Headers/RCMessageConfig.h + + Yk1r8WDG89nlb3VIhIXL8jJuHic= + + Headers/RCMessageContent.h + + zYqmSrMMSBYb0qiZ5uJX+NzvfBA= + + Headers/RCMessagePushConfig.h + + u6mC8WshompDwLB9ZdGX5n2zWdo= + + Headers/RCProfileNotificationMessage.h + + kiMXoQRArMJ3VSbdHneHZprk8NA= + + Headers/RCPushProfile.h + + KBit+jgr57aAV10diEmSMHAjWpM= + + Headers/RCReadReceiptInfo.h + + l3NBqKg7HSnjPzJreZjVf2JDoT8= + + Headers/RCRecallNotificationMessage.h + + /RNRVAcZ3RgUhrmxjj30R0/pznQ= + + Headers/RCReferenceMessage.h + + X2uSK2dFnznjfnuESlcCyh4sxRc= + + Headers/RCRemoteHistoryMsgOption.h + + tnuLbn79PpBdTycpLVkM4rySD6k= + + Headers/RCResumeableDownloader.h + + bW/Auhycaaw/4MT+5IKfouFLr74= + + Headers/RCRichContentMessage.h + + mYTdThRKCzLB+VWwV9UJYwB3hjQ= + + Headers/RCSearchConversationResult.h + + utf6uw3R6xtotm/Andtx1qSakdg= + + Headers/RCSendMessageOption.h + + 1dHvdStFceNuPq45TViSUWQoulI= + + Headers/RCSightMessage.h + + QWa7aqsLta1ECa4gYWZkFUC6HCE= + + Headers/RCStatusDefine.h + + XBA7WyFWNS175j2CjwIEhYsFluM= + + Headers/RCStatusMessage.h + + 6dil9GAidLcFuZ5fwVi0DAeHlu4= + + Headers/RCTSMutableDictionary.h + + MwNWvK9j99I3xgzLTBtsA42A2GM= + + Headers/RCTagInfo.h + + jNixmJoIkWcx78PSzrST/WAouR8= + + Headers/RCTagProtocol.h + + AR3j2+AoAKtnBK92D0/9P95RzaI= + + Headers/RCTextMessage.h + + N62GZuK0LvSK9roYAqNnK+i2zcE= + + Headers/RCUnknownMessage.h + + soda3kJO++dj39d1hl37j0MllIs= + + Headers/RCUploadImageStatusListener.h + + 7mI4F0fgpJqFTAy3aWDIom5XB5I= + + Headers/RCUploadMediaStatusListener.h + + 8OGHirviQMc5pB2uRNR5lsZSyjw= + + Headers/RCUserInfo.h + + 64MgB0F1T81Wm1hXlyz/ghbNNCI= + + Headers/RCUserOnlineStatusInfo.h + + k1AnrSuyz/8FMiIN74mn2BCO+Wc= + + Headers/RCUserTypingStatus.h + + XKFBM07pnNcxEYVX1u6LxFszFWc= + + Headers/RCUtilities.h + + Kpvr8ncpWpM2L80yrARwRJ8MxSA= + + Headers/RCVoiceMessage.h + + FtyDE2/GPPGgJW+xg6aBDBvEN4Y= + + Headers/RCWatchKitStatusDelegate.h + + g4z9xfDM4W5528EDfIOe8udx+J0= + + Headers/RCiOSConfig.h + + u7YYwtKNxnAkL6WclNy6uilNCfI= + + Headers/RongIMLibCore.h + + JtRkl4ECMMNwctJfNt6k9scWTTw= + + Headers/interf_dec.h + + UCTkStJiMKHFE7G0UoVGa1SjAhY= + + Headers/interf_enc.h + + 6wK3TxTgoBKfb5BhHXn/uThe7og= + + Info.plist + + jZng4iCAdmeu8VR1lxrZlnRTZSU= + + Modules/module.modulemap + + H1rer/SL6j8CPbSoGiUA4HpEz6Q= + + + files2 + + Headers/RCAMRDataConverter.h + + hash + + z82A8pT37Su0Trz2TFD8JnoBsV8= + + hash2 + + di3CLYRYWBJuru7J1h/8WOa1+y5TZ9x6LMGB/UKCtUo= + + + Headers/RCAndroidConfig.h + + hash + + CUfttSZyDOOH7r8GP1P+YeKZC6w= + + hash2 + + Ig7IaQVhryGth11RaVW8ykFxB+7thNseWiD+bDw9mKw= + + + Headers/RCChannelClient.h + + hash + + DVHXzbtlt0amNwt7mMBbXllGAAU= + + hash2 + + QTmPNeSMS/w/Qasbut4mi7zwmuNbTo/N7KHQrZl0+Ds= + + + Headers/RCCommandMessage.h + + hash + + 9J3Uk3CXXhn8BBJbMxZ4Niq0f9Y= + + hash2 + + wrvo6wAikwDTRxXOaf0hEi6qTbcXjrmzAKpa+CTYbdE= + + + Headers/RCCommandNotificationMessage.h + + hash + + zJ2Q6SxBDESNqrJkM9phu5wUB4A= + + hash2 + + j85vKqViVZOBaSNrVGM7fV3IoPVBojUgAWwIzPaSafw= + + + Headers/RCContactNotificationMessage.h + + hash + + 4ZdwrYySNZVNOahxOB4WTWa/vHs= + + hash2 + + oak/WE98vh8bGMjdJB2Ip7Fzj4wqKC9HcFbUC2WXZf0= + + + Headers/RCConversation.h + + hash + + EcFFJIdI9YQPOnVF0wzhcPvTHuA= + + hash2 + + Na1jfJdhd+7JCTNz7NiQsr0/6UoXGeJhIDgWZshlN20= + + + Headers/RCConversationChannelProtocol.h + + hash + + Eqk7tzNzQm++TWxcEMriP+rZ9x0= + + hash2 + + UlJVje4z9HhrRBNZDdUmTDF/GKgzFnhtu9pQtqLV09g= + + + Headers/RCConversationIdentifier.h + + hash + + ev9iFFAllQdMtrfh8qayGy02FKE= + + hash2 + + hS9qnRR7mc769LzP16jy0iT1Y/2wLkIfY4xuONucNxk= + + + Headers/RCConversationStatusInfo.h + + hash + + zd4EzEDoRoS6JOQVEuEdBKTVXVc= + + hash2 + + IgPJEEpMr8XGJ99auXkdhSmBIdnWOVW6ExJ1wZSJaec= + + + Headers/RCConversationTagInfo.h + + hash + + JPMapGS1Bt2DgsLltG9gAssYHzs= + + hash2 + + ZZxR5dIZn+9vD7UnBrxxJGi1Qi7eAJqOMdcUY35/kDU= + + + Headers/RCCoreClient.h + + hash + + fTLKTGAKjUqNjqMMDkAbSZWHIik= + + hash2 + + vyrxnF+Kd8p0Xz1zwOletEbKpTWHGcpLI4cmXBmfMus= + + + Headers/RCDownloadItem.h + + hash + + uUxMJPJUub3kI+D9XIZmQZwSqWQ= + + hash2 + + kAyNs/2EEJ34k3aj3Uq485Yz7FWlus+Ui+Gbw7tc8J0= + + + Headers/RCFileMessage.h + + hash + + ETYYNnrA/I/Z9r3BPHPoI7K7pEA= + + hash2 + + pFV+qSUF+ZuGZu7I//IH4Ys5j7FINHZXYs21KqWMcqQ= + + + Headers/RCFileUtility.h + + hash + + /fYWIopRzVhBM36CRnKEYZVVGuc= + + hash2 + + /Qzub2EUx24k0Wae4n+LopJxk/S1/GfzJKVbmHRRywY= + + + Headers/RCFwLog.h + + hash + + z2xBa7jqDb+D3akVfDtwqgue1HA= + + hash2 + + ANCO/UmVzEt5aOsHDVjhp73AAL/+zEViSHrnw2+4Ce0= + + + Headers/RCGIFMessage.h + + hash + + THA3P3rAxO/GiMWunSbSb4Lf/mc= + + hash2 + + ds0izXVARahr7HMXe74qRrvpdIYvwg6BQ7aqM1MzFzg= + + + Headers/RCGroup.h + + hash + + QPHfV6mabNlczy0x1IAUoPFTm44= + + hash2 + + 36vP8YEPSXIA8YIamFIQFSvZoqAYgTS9B/OPvQoyT4k= + + + Headers/RCGroupMessageReaderV2.h + + hash + + 9AQw+VUYIiG6L0IWuo3lj4mjphI= + + hash2 + + WNjq45wCW6AuIaBBOKhb3vkNUJFDcJy/fUWK7YdhwzM= + + + Headers/RCGroupNotificationMessage.h + + hash + + E4wgZxjkrjt9mvQk4FLZvw5dS/A= + + hash2 + + AQ920K9Vr+cFvtNxOLBK0HHhhW3zjOkAy/uYsuFWgOs= + + + Headers/RCGroupReadReceiptInfoV2.h + + hash + + CqwAC233kpRqdjiVGt89FYLjDzg= + + hash2 + + 5OuEVg2QL0K4KBxM7t+b6opSYkto1Gs8qYGtwBdlBBY= + + + Headers/RCGroupReadReceiptV2Manager.h + + hash + + cH7nAU7sn64Hpm9kd0Xciezf4p0= + + hash2 + + kh3yXIIcjFU+O4DBgLwRb+nDKf6/u2Om3cG6LGR2tAo= + + + Headers/RCGroupReadReceiptV2Protocol.h + + hash + + gCPcphSMWIbWW7ZiODSOEMpe5xo= + + hash2 + + 9nPTIPwfKnjJrnJXFrgUwSC6Dg6Z7TEssXM6bttc08s= + + + Headers/RCHQVoiceMessage.h + + hash + + aTWhNDyi4LYX19dWxpPba/1+9ZE= + + hash2 + + qbjRFMN+mDJQ1TdQVhqmS1UTniXmgMbrSKRaill4vQI= + + + Headers/RCHistoryMessageOption.h + + hash + + SQkiWf4YCOZdlg1LstTUQzOD9Z0= + + hash2 + + av7UDHGEth1779i+f6vktpFHCKAaAlxZZD4Tx5cdAzQ= + + + Headers/RCIMClientProtocol.h + + hash + + Xv0xB9mt8aI9fjCXyarayKvtMOY= + + hash2 + + VcUEkjCYbSVQKN5R/SLdRjRq5YakCiCkgbbfV9OPI3E= + + + Headers/RCImageCompressConfig.h + + hash + + 5Ptf+r4cwJvCpO5DZVsYNcmC54I= + + hash2 + + wbJTWq9TRcEQmCB2xqjUsjuagQGSE2v9NiN0/zSk/lE= + + + Headers/RCImageMessage.h + + hash + + 04AQ8vxkxDdXTgVh2Tjhs569P2Y= + + hash2 + + oFiWap56BFntqOfAV/2ML3Kt9gUnEtPW7jRoXa7S+N0= + + + Headers/RCInformationNotificationMessage.h + + hash + + tDVzRchCtUOCjJGGyOEoETG+LYE= + + hash2 + + A8uTHs/Glh1RyAkcS9dDh6VZgaKItRhhXwVf1JIR8a8= + + + Headers/RCMediaMessageContent.h + + hash + + Bu2mIpcp9X7QT+V59QtkhUG9jFA= + + hash2 + + tiWLO0PDe1+NtJ4nJArite2f51Vgt3tCasa65x7psLo= + + + Headers/RCMentionedInfo.h + + hash + + 9tXPz4Z1hka5gIcelfjtO72nW5I= + + hash2 + + ivQzLUhJ1cEA2HN0fkGSIzFVWqlFgnQTjPABmWggDQY= + + + Headers/RCMessage.h + + hash + + uuzZsXJXKrosslhRLGkW+idmnUE= + + hash2 + + NSGzonmNXXQAsToZvSRhUIAl7Trm4JPBg2sqyb67mj8= + + + Headers/RCMessageConfig.h + + hash + + Yk1r8WDG89nlb3VIhIXL8jJuHic= + + hash2 + + IEkQnXVZbKDv0ss6pO4I+Bb70Ksd5SjdMd6c4r3sLDM= + + + Headers/RCMessageContent.h + + hash + + zYqmSrMMSBYb0qiZ5uJX+NzvfBA= + + hash2 + + YeC8fV9ofsDUvnv91f+nx+PnfBNnlnT+eR3Ebte5rA8= + + + Headers/RCMessagePushConfig.h + + hash + + u6mC8WshompDwLB9ZdGX5n2zWdo= + + hash2 + + mb2Wc726MefGU+LKaIOnpIbwXrhGytxoF9UT+Jmicz4= + + + Headers/RCProfileNotificationMessage.h + + hash + + kiMXoQRArMJ3VSbdHneHZprk8NA= + + hash2 + + VImo7oQe3BEfthK5gpQcCU9eMgKSEzsRBjpom2ku9co= + + + Headers/RCPushProfile.h + + hash + + KBit+jgr57aAV10diEmSMHAjWpM= + + hash2 + + AWm9KZy954uAyEtA+nqLtq+/DFLPzKZibs96MBRc5/E= + + + Headers/RCReadReceiptInfo.h + + hash + + l3NBqKg7HSnjPzJreZjVf2JDoT8= + + hash2 + + PDv6FlRFe2AwVA+fk4y/MysdYwTAtFRR3vqdtPoFCM4= + + + Headers/RCRecallNotificationMessage.h + + hash + + /RNRVAcZ3RgUhrmxjj30R0/pznQ= + + hash2 + + gRtpWW01ztdHusDOrMa9MiPhIV0WKuHjyZAeZq4iZeI= + + + Headers/RCReferenceMessage.h + + hash + + X2uSK2dFnznjfnuESlcCyh4sxRc= + + hash2 + + rpV7Wru8tEH1D8g4iQQuZ4zgB/M7AJdzPQbaddT9dWk= + + + Headers/RCRemoteHistoryMsgOption.h + + hash + + tnuLbn79PpBdTycpLVkM4rySD6k= + + hash2 + + 6Iu+VuUNslXkuPbZpzCW/nHH8jrDKhwaGgN/7u87n/E= + + + Headers/RCResumeableDownloader.h + + hash + + bW/Auhycaaw/4MT+5IKfouFLr74= + + hash2 + + lpJJhAGIj1rgggzPfAHejpoO4d/iXyD7P+jf6wZiJQU= + + + Headers/RCRichContentMessage.h + + hash + + mYTdThRKCzLB+VWwV9UJYwB3hjQ= + + hash2 + + 5G3CuQc8DQP+eaU21e2YsSb2QVbRx0Fs/oEENldHRxA= + + + Headers/RCSearchConversationResult.h + + hash + + utf6uw3R6xtotm/Andtx1qSakdg= + + hash2 + + UJn1QSDtIr8gch/pho/MH2EbMhgLh+gAL41myb1qTc0= + + + Headers/RCSendMessageOption.h + + hash + + 1dHvdStFceNuPq45TViSUWQoulI= + + hash2 + + Xda9KNi+NupRHS4jlV4m2jcnM2iMk7d1mdqhslzCFKI= + + + Headers/RCSightMessage.h + + hash + + QWa7aqsLta1ECa4gYWZkFUC6HCE= + + hash2 + + m0q/TVTMAiqmW9QuieHciq1nFoBKVMvcI3/UVDRznnc= + + + Headers/RCStatusDefine.h + + hash + + XBA7WyFWNS175j2CjwIEhYsFluM= + + hash2 + + wHNzkSW918BE8ws7RFQb/tzmYI3UYH172Zaa/TSBGkA= + + + Headers/RCStatusMessage.h + + hash + + 6dil9GAidLcFuZ5fwVi0DAeHlu4= + + hash2 + + cBdmKolJ/sv4/XwnzGR4qpGikXY0voEjXUYCSOFqN5E= + + + Headers/RCTSMutableDictionary.h + + hash + + MwNWvK9j99I3xgzLTBtsA42A2GM= + + hash2 + + Y8iXI+OLVsmY+7PVp2HrNH68m7FIKrZc75449pGSjDc= + + + Headers/RCTagInfo.h + + hash + + jNixmJoIkWcx78PSzrST/WAouR8= + + hash2 + + 53UEDchQZ9hrKYpggnWh0E9AsyJsuwjUKV3lfnaihPo= + + + Headers/RCTagProtocol.h + + hash + + AR3j2+AoAKtnBK92D0/9P95RzaI= + + hash2 + + 4V3mdGUWeyEOLwCV2xTn3fJUj8CXNlxfLFzRSmFLR3U= + + + Headers/RCTextMessage.h + + hash + + N62GZuK0LvSK9roYAqNnK+i2zcE= + + hash2 + + DE0ccr39N0kLE1kw35SDhSJua9wpSFZ/hu+t31Zn1pQ= + + + Headers/RCUnknownMessage.h + + hash + + soda3kJO++dj39d1hl37j0MllIs= + + hash2 + + mNVbKD5KzOOsVJHXSj3vVN/E1wJh8izARME19eNvkYY= + + + Headers/RCUploadImageStatusListener.h + + hash + + 7mI4F0fgpJqFTAy3aWDIom5XB5I= + + hash2 + + U4WTYWCSCYOjOOxdtQa/d4wg1lUYlGuyqZAuWup96aY= + + + Headers/RCUploadMediaStatusListener.h + + hash + + 8OGHirviQMc5pB2uRNR5lsZSyjw= + + hash2 + + J2pFtDw8P7A0y65jOhIzwvy1UgUMMD0VcUT6pnVPDYU= + + + Headers/RCUserInfo.h + + hash + + 64MgB0F1T81Wm1hXlyz/ghbNNCI= + + hash2 + + a7vQicqh2mjSJpOgPASy3thBb2h0BrP7/0Mbn+1lLkw= + + + Headers/RCUserOnlineStatusInfo.h + + hash + + k1AnrSuyz/8FMiIN74mn2BCO+Wc= + + hash2 + + ruxnzMsLvzAjBbU/NgUgrN78XYgI77OXver2QENR4lo= + + + Headers/RCUserTypingStatus.h + + hash + + XKFBM07pnNcxEYVX1u6LxFszFWc= + + hash2 + + F5pMbOL9Adk+DWxiQrw5f6AksA/jJtz72nng8zzEwZU= + + + Headers/RCUtilities.h + + hash + + Kpvr8ncpWpM2L80yrARwRJ8MxSA= + + hash2 + + TIvU7ckXV3oPtmMAyo92HvxRoub413eM6TOLm8uJHCo= + + + Headers/RCVoiceMessage.h + + hash + + FtyDE2/GPPGgJW+xg6aBDBvEN4Y= + + hash2 + + X237clUTkA1QVbJFRTp6R/2bDghM5/w46xZGuEuYSHg= + + + Headers/RCWatchKitStatusDelegate.h + + hash + + g4z9xfDM4W5528EDfIOe8udx+J0= + + hash2 + + VuQkwGMCZFoD2hzCTycrgDyiTGzKNY/aNuCi+cbI4VE= + + + Headers/RCiOSConfig.h + + hash + + u7YYwtKNxnAkL6WclNy6uilNCfI= + + hash2 + + eIizqKA/zraVdtVK2K11GHwpSkP+8yGOxGCl0vWjPys= + + + Headers/RongIMLibCore.h + + hash + + JtRkl4ECMMNwctJfNt6k9scWTTw= + + hash2 + + h1VQ58aqy/uSXChgT9kHj3rmV4yPGDmA9yVoZCg9UEQ= + + + Headers/interf_dec.h + + hash + + UCTkStJiMKHFE7G0UoVGa1SjAhY= + + hash2 + + g9dPxTpPMYzmqspWl8kjlYO8W0zKrGAuOVA5I9v3ai4= + + + Headers/interf_enc.h + + hash + + 6wK3TxTgoBKfb5BhHXn/uThe7og= + + hash2 + + aU92pNvAQ0pIhvtSGkCjKMU7BxZyS6FJb08rMcI+Few= + + + Modules/module.modulemap + + hash + + H1rer/SL6j8CPbSoGiUA4HpEz6Q= + + hash2 + + SmT6rIo46jrL5oVu0v0y8QH83cqHbgW6VoKiosRQ8RQ= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCAMRDataConverter.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCAMRDataConverter.h new file mode 100644 index 0000000..e247fe7 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCAMRDataConverter.h @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCAMRDataConverter.h +// Created by Heq.Shinoda on 14-6-17. + +#ifndef __RCAMRDataConverter +#define __RCAMRDataConverter + +#include "interf_dec.h" +#include "interf_enc.h" +#import +#include +#include +#include + +/*! + * \~chinese + AMR 格式与 WAV 格式音频转换工具类 + * \~english + AMR format and WAV format audio conversion tool class + */ +@interface RCAMRDataConverter : NSObject + +/*! + * \~chinese + 获取 AMR 格式与 WAV 格式音频转换工具类单例 + + @return AMR 格式与 WAV 格式音频转换工具类单例 + + * \~english + Get a single example of the audio conversion tool class between AMR format and WAV format. + + @ return Single example of AMR format and WAV format Audio conversion tool class. + */ ++ (RCAMRDataConverter *)sharedAMRDataConverter; + +/*! + * \~chinese + 将 AMR 格式的音频数据转化为 WAV 格式的音频数据 + + @param data AMR 格式的音频数据,可以是 AMR-NB 或者 AMR-WB 格式 + @return WAV 格式的音频数据 + + * \~english + Convert audio data in AMR format to audio data in WAV format. + + @param data Audio data in AMR format, which can be AMR-NB or AMR-WB format. + @ return WAV format audio data. + */ +- (NSData *)decodeAMRToWAVE:(NSData *)data; + +/*! + * \~chinese + 将 AMR 格式的音频数据转化为 WAV 格式的音频数据 + + @param data AMR格式的音频数据,必须是 AMR-NB 的格式 + @return WAV格式的音频数据 + + * \~english + Convert audio data in AMR format to audio data in WAV format. + + @param data Audio data in AMR format, must be in AMR-NB format. + @ return WAV format audio data. + */ +- (NSData *)decodeAMRToWAVEWithoutHeader:(NSData *)data; + +/*! + * \~chinese + 将 WAV 格式的音频数据转化为 AMR 格式的音频数据(8KHz/16KHz 采样) + + @param data WAV 格式的音频数据 + @return AMR-NB/AMR-WB 格式的音频数据 + @discussion 如果采样率为 8KHz 则返回 AMR-NB 格式数据,如果采样率为 16KHz 则返回 AMR-WB 格式数据。 + + * \~english + Convert audio data in WAV format to audio data in AMR format (8KHz/16KHz sampling). + + @param data Audio data in WAV format. + @ return AMR-NB/AMR-WB format audio data. + @ discussion Return data in AMR-NB format if the sampling rate is 8KHz and AMR-WB format if the sampling rate is 16KHz. + */ +- (NSData *)encodeWAVEToAMR:(NSData *)data; + +@end + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCAndroidConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCAndroidConfig.h new file mode 100644 index 0000000..ce18892 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCAndroidConfig.h @@ -0,0 +1,124 @@ +// +// RCAndroidConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/9/17. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + * \~chinese + 华为推送消息级别 + * \~english + Huawei push level + */ +typedef NSString *RCImportanceHw NS_STRING_ENUM; + +/*! + * \~chinese + 华为推送消息级别 NORMAL + * \~english + Huawei push level : NORMAL + */ +FOUNDATION_EXPORT RCImportanceHw const RCImportanceHwNormal; + +/*! + * \~chinese + 华为推送消息级别 LOW + * \~english + Huawei push level : LOW + */ +FOUNDATION_EXPORT RCImportanceHw const RCImportanceHwLow; + + + +@interface RCAndroidConfig : NSObject + +/*! + * \~chinese + Android 平台 Push 唯一标识 + 目前支持小米、华为推送平台,默认开发者不需要进行设置,当消息产生推送时,消息的 messageUId 作为 notificationId 使用。 + + * \~english + Unique identification of Android platform Push. + Currently, Xiaomi and Huawei push platforms are supported. Developers need not set them by default. When a message generates a push, the messageUId of the message is used as a notificationId. + */ +@property (nonatomic, copy) NSString *notificationId; + +/*! + * \~chinese + 小米的渠道 ID + 该条消息针对小米使用的推送渠道,如开发者集成了小米推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。 + + * \~english + Xiaomi's channel ID. + This message is aimed at the push channel used by Xiaomi. If the developer integrates Xiaomi push and shall specify a channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer. + */ +@property (nonatomic, copy) NSString *channelIdMi; + +/*! + * \~chinese + 华为的渠道 ID + 该条消息针对华为使用的推送渠道,如开发者集成了华为推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。 + + * \~english + Huawei's channel ID. + This message is aimed at the push channel used by Huawei. If the developer integrates Huawei push and shall specify a channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer. + */ +@property (nonatomic, copy) NSString *channelIdHW; + +/*! + * \~chinese + OPPO 的渠道 ID + 该条消息针对 OPPO 使用的推送渠道,如开发者集成了 OPPO 推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。 + + * \~english + OPPO Channel ID. + This message is aimed at the push channel used by OPPO. For example, if the developer integrates OPPO push and shall specify the channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer. + */ +@property (nonatomic, copy) NSString *channelIdOPPO; + +/*! + * \~chinese + VIVO 推送通道类型 + 开发者集成了 VIVO 推送,需要指定推送类型时,可进行设置。 + 目前可选值 "0"(运营消息) 和 "1"(系统消息) + + * \~english + VIVO push channel type. + Developers have integrated VIVO push, which can be set when you shall specify the push type. + Currently available values "0" (operation message) and "1" (system message) + */ +@property (nonatomic, copy) NSString *typeVivo; + +/*! + * \~chinese + FCM 通知类型推送时所使用的分组 id + * \~english + Packet id used in FCM notification type push + */ +@property (nonatomic, copy) NSString *fcmCollapseKey; + +/*! + * \~chinese + FCM 通知类型的推送所使用的通知图片 url + * \~english + Notification image url used for push of FCM notification type + */ +@property (nonatomic, copy) NSString *fcmImageUrl; + +/*! + * \~chinese + 华为推送消息级别 + * \~english + Huawei push level + */ +@property (nonatomic, copy) RCImportanceHw importanceHW; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCChannelClient.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCChannelClient.h new file mode 100644 index 0000000..dae1ddf --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCChannelClient.h @@ -0,0 +1,2047 @@ +// +// RCConversationChannelManager.h +// RongIMLibCore +// +// Created by RongCloud on 2021/1/29. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCConversation.h" +#import "RCMessage.h" +#import "RCSearchConversationResult.h" +#import "RCStatusDefine.h" +#import "RCUploadImageStatusListener.h" +#import "RCUploadMediaStatusListener.h" +#import "RCUserInfo.h" +#import "RCSendMessageOption.h" +#import "RCRemoteHistoryMsgOption.h" +#import "RCConversationChannelProtocol.h" +#import "RCHistoryMessageOption.h" +/*! + * \~chinese + 融云 ConversationChannel 核心类 + + @discussion 您需要通过 sharedChannelManager 方法,获取单例对象。 + + * \~english + ConversationChannel core class + + @discussion You shall get the single instance object through the sharedChannelManager method. + */ +@interface RCChannelClient : NSObject + +/*! + * \~chinese + 获取核心类单例 + + @return 核心单例类 + + * \~english + Get a single instance of the core class + + @return single instance of the core class + */ ++ (instancetype)sharedChannelManager; + +#pragma mark Delegate +/*! + * \~chinese + 设置消息接收监听器 + + @param delegate RCChannelClient 消息已读回执监听器 + + @discussion + 设置 IMLibCore 的消息接收监听器请参考 RCChannelClient 的 setChannelMessageReceiptDelegate:object:方法。 + + @remarks 功能设置 + * \~english + */ +- (void)setChannelMessageReceiptDelegate:(id)delegate; + + +/*! + * \~chinese + 设置输入状态的监听器 + + @param delegate RCChannelClient 输入状态的的监听器 + + @warning 目前仅支持单聊。 + + @remarks 功能设置 + + * \~english + Set the listener for the input status for channel client + + @param delegate Listeners for IMLibCore channel client input status + + @ warning currently only support single chat + + @ remarks function setting + */ +- (void)setRCConversationChannelTypingStatusDelegate:(id)delegate; + +#pragma mark Message Send + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId:消息的ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent ,用于显示;二是 pushData ,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil ,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for failed message sending [nErrorCode: Error code for sending failure. + MessageId: message ID] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom message, you shall set pushContent and pushData to define the push content yourself, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it by using this method. + + If you use this method to send a file message, you should upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it by using this method. + + @ warning If you use IMLibCore, you can use this method to send messages; + If you use IMKit, please use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId: 消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message. + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param option Related configuration of messages. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for message sending failure [nErrorCode: Error code for sending failure, + messageId: ID of the message] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it using this method. + + If you use this method to send a file message, you shall upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it using this method. + + @ warning you can use this method to send messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送媒体消息(图片消息或文件消息) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的 ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您需要上传图片到自己的服务器,需要构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送媒体消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送媒体消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send media messages (image messages or file messages) + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation in which the message is sent + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID] + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock callback for failed message sending [errorCode: error code for sending failure. messageId: message ID] + @param cancelBlock Callback for the user canceling message sending [messageId: message ID] + @ return message entity sent . + + @ discussion A remote push can be received when the receiver is offline and allows remote push. + The remote push consists of two parts, one is pushContent for display and the other is pushData for carrying data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format will be used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you need to upload images to your own server, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful uploading, and then use the RCCoreClient's + sendMessage:targetId:content:pushContent:pushData:success:error: method or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload files to your own server, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method. + or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ warning If you use IMLibCore, you can use this method to send meida messages; + If you use IMKit, please use the method of the same name in RCIM to send a media message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 发送媒体消息(上传图片或文件等媒体信息到指定的服务器) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param uploadPrepareBlock 媒体文件上传进度更新的 IMKit 监听 + [uploadListener:当前的发送进度监听,SDK 通过此监听更新 IMKit UI] + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 此方法仅用于 IMKit。 + 如果您需要上传图片到自己的服务器并使用 IMLibCore,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器并使用 IMLibCore,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @remarks 消息操作 + * + * \~english + Send media messages (upload media information such as images or files to the specified server) + + @param conversationType Type of conversation in which the message is sent. + @param targetId ID of conversation in which the message is sent + @param channelId Business ID of the session to which it belongs + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param uploadPrepareBlock IMKit listening of media file uploading progress updates. + [uploadListener: current sending progress listening, which is used by SDK to update IMKit UI] + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID]. + @param successBlock Callback for successful message sending [ messageId: message ID]. + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure + messageId: message ID]. + @param cancelBlock Callback for the user canceling message sending [messageId: message ID]. + @ return message entity sent. + + @ discussion This method is for IMKit only. + If you need to upload pictures to your own server and use IMLibCore, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload a file to your own server and use IMLibCore, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + uploadPrepare:(void (^)(RCUploadMediaStatusListener *uploadListener))uploadPrepareBlock + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 插入向外发送的、指定时间的消息(此方法如果 sentTime 有问题会影响消息排序,慎用!!) +(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param sentStatus 发送状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒(传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。如果 sentTime<=0,则被忽略,会以插入时的时间为准。 + + @remarks 消息操作 + + * \~english + Insert a message sent outward at a specified time (this method will affect message sorting if there is a problem with sentTime and shall be used with caution!!) + (The message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID. + @param channelId Business ID of the session to which it belongs + @param sentStatus Sending status. + @param content Content of the message. + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. If sentTime < = 0, it will be ignored and the time at which it is inserted shall prevail. + + @ remarks message operation + */ +- (RCMessage *)insertOutgoingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + +/*! + * \~chinese + 插入接收的消息(此方法如果 sentTime + 有问题会影响消息排序,慎用!!)(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param senderUserId 发送者 ID + @param receivedStatus 接收状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒 (传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + * \~english + Insert the received message (the message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param senderUserId Sender ID + @param receivedStatus Receiving status + @param content Content of the message + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertIncomingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + senderUserId:(NSString *)senderUserId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + +/*! + * \~chinese + 发送定向消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param userIdList 接收消息的用户 ID 列表 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + 如果您使用 IMLibCore,可以使用此方法发送定向消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送定向消息,否则不会自动更新 UI。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param conversationType Type of conversation in which the message is sent + @param targetId Conversation ID that sends the message + @param channelId Business ID of the session to which it belongs + @param userIdList List of user ID receiving messages + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure, + messageId: message ID] + + @ return Message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + If you use IMLibCore, you can use this method to send directed messages. + If you use IMKit, please use the method of the same name in RCIM to send a directed message, otherwise the UI will not be updated automatically. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + toUserIdList:(NSArray *)userIdList + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送定向消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param channelId 所属会话的业务标识 + @param userIdList 接收消息的用户 ID 列表 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + 如果您使用 IMLibCore,可以使用此方法发送定向消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送定向消息,否则不会自动更新 UI。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param conversationType Type of conversation in which the message is sent + @param targetId Conversation ID that sends the message + @param channelId Business ID of the session to which it belongs + @param userIdList List of user ID receiving messages + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure, + messageId: message ID] + + @ return Message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + If you use IMLibCore, you can use this method to send directed messages. + If you use IMKit, please use the method of the same name in RCIM to send a directed message, otherwise the UI will not be updated automatically. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + toUserIdList:(NSArray *)userIdList + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; +#pragma mark Message Read Receipt + +/*! + * \~chinese + 发送某个会话中消息阅读的回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param timestamp 该会话中已阅读的最后一条消息的发送时间戳 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 此接口只支持单聊, 如果使用 IMLibCore 可以注册监听 + RCLibDispatchReadReceiptNotification 通知,使用 IMKit 直接设置RCIM.h + 中的 enabledReadReceiptConversationTypeList。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send a message reading receipt in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param timestamp The sending timestamp of the last message read by the conversation. + @param successBlock Callback for successful sending + @param errorBlock Callback for sending failure [nErrorCode: error code for failure] + + @ discussion This interface only supports single chat. If you use IMLibCore, you can register to listen to + RCLibDispatchReadReceiptNotification notification, and use IMKit to set directly + enabledReadReceiptConversationTypeList in RCIM.h. + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendReadReceiptMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 发送阅读回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param messageList 已经阅读了的消息列表 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 当用户阅读了需要阅读回执的消息,可以通过此接口发送阅读回执,消息的发送方即可直接知道那些人已经阅读。 + + @remarks 高级功能 + + * \~english + Send a reading receipt + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param messageList List of messages that have been read + @param successBlock Callback for successful sending + @param errorBlock Callback for failed sending [nErrorCode: Error code of failure] + + @ discussion When a user reads a message that needs to be read, a reading receipt cane be sent through this interface, and the sender of the message can directly know who has read the message. + + @ remarks advanced functions + */ +- (void)sendReadReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageList:(NSArray *)messageList + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 同步会话阅读状态(把指定会话里所有发送时间早于 timestamp 的消息置为已读) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param timestamp 已经阅读的最后一条消息的 Unix 时间戳(毫秒) + @param successBlock 同步成功的回调 + @param errorBlock 同步失败的回调[nErrorCode: 失败的错误码] + + @remarks 高级功能 + + * \~english + Synchronize conversation reading status (set all messages sent before timestamp in a specified conversation to be read) + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param timestamp Unix timestamp of the last message read (in milliseconds) + @param successBlock Callback for successful synchronization + @param errorBlock Callback for failed synchronization [nErrorCode: Error code for failure]. + + @ remarks advanced functions + */ +- (void)syncConversationReadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +#pragma mark - Message Operation + +/*! + * \~chinese + 获取某个会话中指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get the specified number of latest message entities in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param count Number of messages to be obtained + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getLatestMessages:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + 如: + oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param oldestMessageId ID of due message. + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + E.g. + If the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的、指定消息类型的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量和消息类型的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应的那条消息,如果会话中的消息数量小于参数 count + 的值,会将该会话中的所有消息返回。 + 如:oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number and specified message types before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil + @param oldestMessageId ID of due message + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + For example, if the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + objectName:(NSString *)objectName + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定消息、指定数量、指定消息类型、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param baseMessageId 当前的消息 ID + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,baseMessageId + 之前或之后的、指定数量、消息类型和查询方向的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 baseMessageId 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with specified messages, specified number and specified message type in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil. + @param baseMessageId Current message ID. + @param isForward Query direction: true indicates forward and false indicates backward. + @param count Number of messages to be obtained + @ return object list of message entity RCMessage + + @ discussion + This method gets the latest message entities before or after baseMessageId with the specified number, message type, and query direction, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to baseMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + objectName:(NSString *)objectName + baseMessageId:(long)baseMessageId + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定时间、指定数量、指定消息类型(多个)、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param objectNames 消息内容的类型名称列表 + @param sentTime 当前的消息时间戳 + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,sentTime + 之前或之后的、指定数量、指定消息类型(多个)的消息实体列表,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 sentTime 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with a specified time, a specified number and a specified message type (multiple) in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param objectNames List of type names for message content + @param sentTime Current message timestamp + @param isForward Query direction: true indicates forward and false indicates backward + @param count Number of messages to be obtained. + @ return object list of message entity RCMessage + + @ discussion + This method gets a list of message entities before and after the sentTime with a specified number and a specified message type (multiple) in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to sentTime. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + objectNames:(NSArray *)objectNames + sentTime:(long long)sentTime + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 在会话中搜索指定消息的前 beforeCount 数量和后 afterCount + 数量的消息。返回的消息列表中会包含指定的消息。消息列表时间顺序从新到旧。 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param sentTime 消息的发送时间 + @param beforeCount 指定消息的前部分消息数量 + @param afterCount 指定消息的后部分消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 获取该会话的这条消息及这条消息前 beforeCount 条和后 afterCount 条消息,如前后消息不够则返回实际数量的消息。 + + @remarks 消息操作 + + * \~english + Searches the the number of beforeCount and afterCount messages for the specified message in the conversation. The list of returned messages contains the specified message. The message in the list are in chronological order from earliest to most recent. + + @param conversationType Conversation type + @param targetId Conversation ID + @param sentTime Time when the message is sent + @param beforeCount Specify the number of messages in the first part of the message. + @param afterCount Specify the number of messages in the latter part of the message. + @ return object list of message entity RCMessage + + @ discussion + Get this message, beforeCount messages ahead of this message and afterCount messages after this message in the conversation. If there are not enough messages before and after the message, the actual number of messages will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + sentTime:(long long)sentTime + beforeCount:(int)beforeCount + afterCount:(int)afterCount; + +/*! + * \~chinese + 从服务器端清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [status:清除失败的错误码] + + @discussion + 此方法从服务器端清除历史消息,但是必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 清除成功后只能获取该时间戳之后的历史消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation, 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param successBlock Callback for successful acquisition + @param errorBlock Callback for failed acquisition [status: error code for clearing failure ] + + @ discussion + This method clears historical messages from the server, bu the historical message cloud storage function must be activated first. + For example, if you don't want to get more history messages from the server, you can only get the history messages after the timestamp after the recordTime has been cleared successfully. + + @ remarks message operation + */ +- (void)clearRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + recordTime:(long long)recordTime + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param clearRemote 是否同时删除服务端消息 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [ status:清除失败的错误码] + + @discussion + 此方法可以清除服务器端历史消息和本地消息,如果清除服务器端消息必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 并设置 clearRemote 为 YES + 清除消息,成功后只能获取该时间戳之后的历史消息。如果 clearRemote 传 NO, + 只会清除本地消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages. + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation. 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param clearRemote Whether to delete server messages at the same time. + @param successBlock Callback for successful acquisition. + @param errorBlock Callback for failed acquisition [status: error code for clearing failure]. + + @ discussion + This method can clear server-side historical messages and local messages. If you clear messages on the server, you must first activate the historical message cloud storage functions. + For example, if you don't want to get more historical messages from the server, you can specify the recordTime and set clearRemote to YES to clear the messages, and then you can only get the historical message after the timestamp. If clearRemote passes NO, only local messages are cleared. + + @ remarks message operation + */ +- (void)clearHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + recordTime:(long long)recordTime + clearRemote:(BOOL)clearRemote + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param recordTime 截止的消息发送时间戳,毫秒 + @param count 需要获取的消息数量, 0 < count <= 20 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有10条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @discussion 本地数据库可以查到的消息,该接口不会再返回,所以建议先用 getHistoryMessages + 相关接口取本地历史消息,本地消息取完之后再通过该接口获取远端历史消息 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param recordTime Due message sending timestamp, in milliseconds. + @param count Number of messages to be obtained, 0 < count < = 20. + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES indicates that there is still any remaining messages; NO indicates that there is no remaining messages] + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure] + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ discussion Messages that can be found in the local database will not be returned by this interface, so it is recommended to first take the local historical messages by using the related interfaces of the getHistoryMessages. + After the local message is taken, the remote historical messages are obtained through this interface + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + recordTime:(long long)recordTime + count:(int)count + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param option 可配置的参数 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有 10 条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param option Configurable parameters + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES: + Indicates that there is still any remaining messages; NO: indicates that there is no remaining messages]. + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure]. + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + option:(RCRemoteHistoryMsgOption *)option + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + + +/*! + * \~chinese + 获取历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param option 可配置的参数 + @param complete 获取成功的回调 [messages:获取到的历史消息数组; code : 获取是否成功,0表示成功,非 0 表示失败,此时 messages 数组可能存在断档] + + @discussion 必须开通历史消息云存储功能。 + @discussion count 传入 1~20 之间的数值。 + @discussion 此方法先从本地获取历史消息,本地有缺失的情况下会从服务端同步缺失的部分。 + @discussion 从服务端同步失败的时候会返回非 0 的 errorCode,同时把本地能取到的消息回调上去。 + + @remarks 消息操作 + + * \~english + Get historical messages + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param option Configurable parameters + @param complete Callback for successful acquisition [messages: array of obtained historical messages; Code: succeeded or not; 0: successful; non-0: failed. In this case, there may be a message break in the messages array] + + @ discussion The historical message cloud storage function must be activated. + @ discussion The count passes a value between 1 and 20. + @ discussion This method first obtains historical messages locally, and synchronizes the missing parts from the server if it is missing locally; + @ discussion If synchronization fails on the server, a non-0 errorCode will be returned, and the messages that can be accessed locally will be called back. + + @ remarks message operation + */ +- (void)getMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + option:(RCHistoryMessageOption *)option + complete:(void (^)(NSArray *messages, RCErrorCode code))complete; + +/*! + * \~chinese + 获取会话中@提醒自己的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + + @discussion + 此方法从本地获取被@提醒的消息(最多返回 10 条信息) + @warning 使用 IMKit 注意在进入会话页面前调用,否则在进入会话清除未读数的接口 clearMessagesUnreadStatus: targetId: + 以及 设置消息接收状态接口 setMessageReceivedStatus:receivedStatus:会同步清除被提示信息状态。 + + @remarks 高级功能 + + * \~english + Get the @ reminder messages in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID. + @param channelId Business ID of the session to which it belongs + + @ discussion + This method gets the @ reminder messages locally (a maximum of 10 messages are returned). + @ warning When the IMKit is used, note that it is called before the conversation page is entered, otherwise the unread interface clearMessagesUnreadStatus: is cleared when the conversation is entered. targetId: + When the message receiving status interface setMessageReceivedStatus:receivedStatus: is set, it will synchronously clear the prompted information status. + + @ remarks advanced functions + */ +- (NSArray *)getUnreadMentionedMessages:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/** + * \~chinese + * 获取会话里第一条未读消息。 + * + * @param conversationType 会话类型 + * @param targetId 会话 ID + * @param channelId 所属会话的业务标识 + * @return 第一条未读消息的实体。 + * @remarks 消息操作 + * + * \~english + * Get the first unread message in the conversation. + * + * @param conversationType Conversation type + * @param targetId Conversation ID + * @param channelId Business ID of the session to which it belongs + * @ return Entity of the first unread message. + * @ remarks Message operation + */ +- (RCMessage *)getFirstUnreadMessage:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法删除数据库中该会话的消息记录,同时会整理压缩数据库,减少占用空间 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes the message record of the conversation in the database. At the same time, the compressed database is sorted to reduce the footprint. + + @ remarks Message operation + */ +- (void)deleteMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 批量删除某个会话中的指定远端消息(同时删除对应的本地消息) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 目标会话ID + @param channelId 所属会话的业务标识 + @param messages 将被删除的消息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法会同时删除远端和本地消息。 + 一次批量操作仅支持删除属于同一个会话的消息,请确保消息列表中的所有消息来自同一会话 + 一次最多删除 100 条消息。 + + @remarks 消息操作 + + * \~english + Delete specified remote messages in a conversation in batches (while deleting corresponding local messages) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Target conversation ID + @param channelId Business ID of the session to which it belongs + @param messages List of messages to be deleted + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes both remote and local messages. + One batch operation only supports to delete messages belonging to the same conversation, please make sure that all messages in the message list come from the same conversation and delete at most 100 messages at a time. + + @ remarks message operation + */ +- (void)deleteRemoteMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messages:(NSArray *)messages + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully. + + @ remarks Message operation + */ +- (BOOL)clearMessages:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +#pragma mark - Conversation List +/*! + * \~chinese + 获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + @discussion 当您的会话较多且没有清理机制的时候,强烈建议您使用 getConversationList: count: startTime: + 分页拉取会话列表,否则有可能造成内存过大。 + + @remarks 会话列表 + + * \~english + Get conversation list + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray) + @param channelId Business ID of the session to which it belongs + @ return List of conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + @ discussion When you have a large number of conversations and do not have a cleaning mechanism, it is strongly recommended that you use getConversationList: count: startTime: + Pull the list of the conversation page by page, otherwise the memory may be too large. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +/*! + * \~chinese + 分页获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @param count 获取的数量(当实际取回的会话数量小于 count 值时,表明已取完数据) + @param startTime 会话的时间戳(获取这个时间戳之前的会话列表,0表示从最新开始获取) + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + + @remarks 会话列表 + + * \~english + Get a list of conversations page by page + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @param count Number of conversations obtained (when the actual number of conversations retrieved is less than the count value, the data has been fetched). + @param startTime Timestamp of the conversation (get the list of conversation before this timestamp, 0 indicates obtaining from the latest one). + @ return List of the conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId count:(int)count startTime:(long long)startTime; + +/*! + * \~chinese + 获取单个会话数据 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 会话的对象 + + @remarks 会话 + + * \~english + Get single conversation data + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return Conversation object + + @ remarks Conversation + */ +- (RCConversation *)getConversation:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 获取会话中的消息数量 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 会话中的消息数量 + + @discussion -1 表示获取消息数量出错。 + + @remarks 会话 + + * \~english + Get the number of messages in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID. + @param channelId Business ID of the session to which it belongs + @ return Number of messages in conversation. + + @ discussion - 1 indicates an error in obtaining the number of messages. + + @ remarks Conversation + */ +- (int)getMessageCount:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 删除指定类型的会话 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @discussion 此方法会从本地存储中删除该会话,同时删除会话中的消息。 + + @remarks 会话 + + * \~english + Delete a conversation of the specified type. + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully. + + @ discussion This method deletes the conversation from the local storage and deletes the message in the conversation. + + @ remarks Conversation + */ +- (BOOL)clearConversations:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +/*! + * \~chinese + 从本地存储中删除会话 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @discussion + 此方法会从本地存储中删除该会话,但是不会删除会话中的消息。如果此会话中有新的消息,该会话将重新在会话列表中显示,并显示最近的历史消息。 + + @remarks 会话 + + * \~english + Delete a conversation from the local storage + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully. + + @ discussion + This method deletes the conversation from the local storage, but does not delete the message in the conversation. If there is a new message in this conversation, the conversation will reappear in the conversation list and the most recent historical message will be displayed. + + @ remarks Conversation + */ +- (BOOL)removeConversation:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 设置会话的置顶状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param isTop 是否置顶 + @return 设置是否成功 + + @discussion 会话不存在时设置置顶,会在会话列表生成会话。 + + @remarks 会话 + + * \~english + Set the top status of the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param isTop Whether or not set top + @ return Whether it is set successfully + + @ discussion If the conversation is set top when the conversation does not exist, the conversation will be generated in the conversation list + @ discussion After the conversation is set top, the conversation will be deleted, and the top setting will automatically expire + + @ remarks Conversation + */ +- (BOOL)setConversationToTop:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId isTop:(BOOL)isTop; + +/*! + * \~chinese + 获取置顶的会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 置顶的会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取置顶的会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of top conversations + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @ return List of top conversation RCConversation. + + @ discussion This method reads the top conversation list from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getTopConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +#pragma mark Draft + +/*! + * \~chinese + 获取会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @return 该会话中的草稿 + + @remarks 会话 + + * \~english + Get draft information in the conversations (temporary messages entered by the user but not sent). + + @param conversationType Conversations type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @ return drafts in this conversations + + @ remarks Conversations + */ +- (NSString *)getTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 保存草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @param content 草稿信息 + @return 是否保存成功 + + @remarks 会话 + + * \~english + Save draft information (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @param content Draft information + @ return whether it is saved successfully. + + @ remarks Conversation + */ +- (BOOL)saveTextMessageDraft:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + content:(NSString *)content; + +/*! + * \~chinese + 删除会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @return 是否删除成功 + + @remarks 会话 + + * \~english + Delete draft information in a conversation (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @ return Whether it is deleted successfully + + @ remarks Conversation + */ +- (BOOL)clearTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +#pragma mark Unread Count + +/*! + * \~chinese + 获取所有的未读消息数(聊天室会话除外) + + @param channelId 所属会话的业务标识 + + @return 所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages (except chatroom conversations). + + @param channelId Business ID of the session to which it belongs + + @ return All unread messages + + @ remarks Conversation + */ +- (int)getTotalUnreadCountWithChannelId:(NSString *)channelId; + +/*! + * \~chinese + 获取某个会话内的未读消息数(聊天室会话除外) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @return 该会话内的未读消息数 + + @remarks 会话 + + * \~english + Get the number of unread messages in a conversation (except for chatroom conversations). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @ return Number of unread messages in the conversation + + @ remarks Conversation + */ +- (int)getUnreadCount:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/** + * \~chinese + 获取某些类型的会话中所有的未读消息数 (聊天室会话除外) + + @param conversationTypes 会话类型的数组 + @param channelId 所属会话的业务标识 + @param isContain 是否包含免打扰消息的未读数 + @return 该类型的会话中所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages in certain types of conversations (except chatroom conversations) + + @param conversationTypes Array of conversation types. + @param channelId Business ID of the session to which it belongs + @param isContain Does it include the number of the unread Do Not Disturb messages. + @ return Number of all unread messages in this type of conversation. + + @ remarks Conversation + */ +- (int)getUnreadCount:(NSArray *)conversationTypes channelId:(NSString *)channelId containBlocked:(bool)isContain; + +/*! + * \~chinese + 获取某个类型的会话中所有未读的被@的消息数 + + @param conversationTypes 会话类型的数组 + @param channelId 所属会话的业务标识 + @return 该类型的会话中所有未读的被@的消息数 + + @remarks 会话 + + * \~english + Get the number of unread @ messages in a certain type of conversation + + @param conversationTypes Array of conversation types + @param channelId Business ID of the session to which it belongs + @ return Number of unread @ messages in this type of conversation + + @ remarks Conversation + */ +- (int)getUnreadMentionedCount:(NSArray *)conversationTypes channelId:(NSString *)channelId; + +/*! + * \~chinese + 清除某个会话中的未读消息数 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation. + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @ return whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType targetId:(NSString *)targetId channelId:(NSString *)channelId; + +/*! + * \~chinese + 清除某个会话中的未读消息数(该会话在时间戳 timestamp 之前的消息将被置成已读。) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param timestamp 该会话已阅读的最后一条消息的发送时间戳 + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation (messages for that conversation before the timestamp will be set to read.) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param timestamp Sending timestamp of the last message read by the conversation + @ return Whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + time:(long long)timestamp; + +#pragma mark - Message Notification + +/*! + * \~chinese + 设置会话的消息提醒状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param isBlocked 是否屏蔽消息提醒 + @param successBlock 设置成功的回调 + [nStatus:会话设置的消息提醒状态] + @param errorBlock 设置失败的回调 [status:设置失败的错误码] + + @discussion + 如果您使用 + IMLibCore,此方法会屏蔽该会话的远程推送;如果您使用IMKit,此方法会屏蔽该会话的所有提醒(远程推送、本地通知、前台提示音),该接口不支持聊天室。 + + @remarks 会话 + + * \~english + Set the message reminder status for the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param isBlocked Whether to block message reminders + @param successBlock Callback for successful setting + [nStatus: message reminder status set for the conversation]. + @param errorBlock Callback for failed setting [ status: error code for error code for setting failure]. + + @ discussion + If you use the IMLibCore, this method blocks the remote push of the conversation; If you use this method of IMKit, it blocks all reminders (remote push, local notification and foreground tone) of the conversation, and the interface does not support chatroom. + + @ remarks Conversation + */ +- (void)setConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + isBlocked:(BOOL)isBlocked + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + + +/*! + * \~chinese + 查询会话的消息提醒状态 + + @param conversationType 会话类型(不支持聊天室,聊天室是不接受会话消息提醒的) + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param successBlock 查询成功的回调 [nStatus:会话设置的消息提醒状态] + @param errorBlock 查询失败的回调 [status:设置失败的错误码] + + @remarks 会话 + + * \~english + Query the message reminder status of the conversation + + @param conversationType Conversation type (chatroom is not supported and chatroom does not accept reminders of conversation messages). + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param successBlock Callback for successful query [nStatus: message reminder status set for the conversation] + @param errorBlock Callback for failed query [status: error code for setting failure] + + @ remarks Conversation + */ +- (void)getConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取消息免打扰会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param channelId 所属会话的业务标识 + @return 消息免打扰会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取消息免打扰会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of conversations for Do Not Disturb messages. + + @param conversationTypeList Array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param channelId Business ID of the session to which it belongs + @ return List of conversation RCConversation for Do Not Disturb messages + + @ discussion This method reads the list of conversations of Do Not Disturb messages from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getBlockedConversationList:(NSArray *)conversationTypeList channelId:(NSString *)channelId; + +#pragma mark - input status + +/*! + * \~chinese + 向会话中发送正在输入的状态 + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param channelId 所属会话的业务标识 + @param objectName 正在输入的消息的类型名 + + @discussion + contentType 为用户当前正在编辑的消息类型名,即 RCMessageContent 中 getObjectName 的返回值。 + 如文本消息,应该传类型名"RC:TxtMsg"。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send the status being entered to the conversation + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param channelId Business ID of the session to which it belongs + @param objectName Type name of the message being entered + + @ discussion + contentType is the name of the message type that the user is currently editing, that is, the return value of getObjectName in RCMessageContent. + E.g. for a text message, pass the type name "RC:TxtMsg". + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendTypingStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + contentType:(NSString *)objectName; + +#pragma mark - Search + +/*! + * \~chinese + 根据关键字搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param keyword 关键字 + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on keywords. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param keyword Keyword + @param count Maximum number of queries + @param startTime Query messages before startTime (0 indicates unlimited time). + + @ return Matching message list + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + keyword:(NSString *)keyword + count:(int)count + startTime:(long long)startTime; + + +/*! + * \~chinese + 根据时间,偏移量和个数搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param keyword 关键字,传空默认为是查全部符合条件的消息 + @param startTime 查询 startTime 之后的消息, startTime >= 0 + @param endTime 查询 endTime 之前的消息,endTime > startTime + @param offset 查询的消息的偏移量,offset >= 0 + @param limit 最大的查询数量,limit 需大于 0,最大值为100,如果大于100,会默认成100。 + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on time, offset, and number. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param keyword Keyword, in which empty value indicates to check all messages that meet the criteria by default + @param startTime Query the message after startTime, startTime > = 0 + @param endTime Query the messages before endTime, endTime > startTime. + @param offset Offset of the queried message, offset > = 0 + @param limit For the maximum number of queries, the limit should be greater than 0, and the maximum value should be 100. If it is greater than 100, it will default to 100. + + @ return List of messages matched + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + keyword:(NSString *)keyword + startTime:(long long)startTime + endTime:(long long)endTime + offset:(int)offset + limit:(int)limit; + +/*! + * \~chinese + 按用户 ID 搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param userId 搜索用户 ID + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on keywords. + + @param conversationType Conversation type + @param targetId Conversation ID + @param channelId Business ID of the session to which it belongs + @param userId userId + @param count Maximum number of queries + @param startTime Query messages before startTime (0 indicates unlimited time). + + @ return Matching message list + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + userId:(NSString *)userId + count:(int)count + startTime:(long long)startTime; + +/*! + * \~chinese + 根据关键字搜索会话 + + @param conversationTypeList 需要搜索的会话类型列表 + @param channelId 所属会话的业务标识 + @param objectNameList 需要搜索的消息类型名列表(即每个消息类方法 getObjectName 的返回值) + @param keyword 关键字 + + @return 匹配的会话搜索结果列表 + + @discussion 目前,SDK 内置的文本消息、文件消息、图文消息支持搜索。 + 自定义的消息必须要实现 RCMessageContent 的 getSearchableWords 接口才能进行搜索。 + + @remarks 消息操作 + + * \~english + Search a conversation based on keywords + + @param conversationTypeList List of conversation types to be searched + @param channelId Business ID of the session to which it belongs + @param objectNameList List of type names of message to be searched (that is, the return value of each message class method getObjectName) + @param keyword Keyword + + @ return Search results list for conversation matched. + + @ discussion Currently, SDK's built-in text messages, file messages, and image and text messages support search + Custom messages must implement getSearchableWords interface of RCMessageContent before they can be searched + + @ remarks message operation + */ +- (NSArray *)searchConversations:(NSArray *)conversationTypeList + channelId:(NSString *)channelId + messageType:(NSArray *)objectNameList + keyword:(NSString *)keyword; + +@end + + diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCommandMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCommandMessage.h new file mode 100644 index 0000000..de24d37 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCommandMessage.h @@ -0,0 +1,75 @@ +// +// RCCommandMessage.h +// RongIMLib +// +// Created by RongCloud on 15/12/2. +// Copyright © 2015 RongCloud. All rights reserved. +// +#import "RCMessageContent.h" + +/*! + * \~chinese + 命令消息的类型名 + * \~english + The type name of the command message + */ +#define RCCommandMessageIdentifier @"RC:CmdMsg" + +/*! + * \~chinese + 命令消息类 + + @discussion 命令消息类,此消息不存储不计入未读消息数。 + 与 RCCommandNotificationMessage 的区别是,此消息不存储,也不会在界面上显示。 + + @remarks 通知类消息 + + * \~english + Command message class. + + @ discussion command message class, this message is not stored and does not count as unread messages. + Unlike RCCommandNotificationMessage, this message is not stored and will not be displayed on the interface. + + @ remarks notification message + */ +@interface RCCommandMessage : RCMessageContent + +/*! + * \~chinese +命令的名称 + * \~english + The name of the command +*/ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 命令的扩展数据 + + @discussion 命令的扩展数据,可以为任意字符串,如存放您定义的json数据。 + + * \~english + Extended data for the command. + + @ discussion The extended data of the command can be any string, such as storing the json data you define. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 初始化命令消息 + + @param name 命令的名称 + @param data 命令的扩展数据 + @return 命令消息对象 + + * \~english + Initialize command message. + + @param name The name of the command. + @param data Extended data for the command. + @ return command message object. + */ ++ (instancetype)messageWithName:(NSString *)name data:(NSString *)data; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCommandNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCommandNotificationMessage.h new file mode 100644 index 0000000..86e0dda --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCommandNotificationMessage.h @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCCommandNotificationMessage.h +// Created by xugang on 14/11/28. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 命令提醒消息的类型名 + * \~english + The type name of the command reminder message. + */ +#define RCCommandNotificationMessageIdentifier @"RC:CmdNtf" + +/*! + * \~chinese + 命令提醒消息类 + + @discussion 命令消息类,此消息会进行存储,但不计入未读消息数。 + 与 RCCommandMessage 的区别是,此消息会进行存储并在界面上显示。 + + @remarks 通知类消息 + + * \~english + Command reminder message class. + + @ discussion Command message class, which is stored but does not count as unread messages. + Unlike RCCommandMessage, this message is stored and displayed on the interface. + + @ remarks notification message. + */ +@interface RCCommandNotificationMessage : RCMessageContent + +/*! + * \~chinese + 命令提醒的名称 + + * \~english + The name of the command reminder + */ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 命令提醒消息的扩展数据 + + @discussion 命令提醒消息的扩展数据,可以为任意字符串,如存放您定义的 json 数据。 + + * \~english + Extended data for command reminder messages. + + @ discussion The extended data of the command reminder message can be any string, such as storing the json data you defined. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 初始化命令提醒消息 + + @param name 命令的名称 + @param data 命令的扩展数据 + @return 命令提醒消息对象 + + * \~english + Initialization command reminder message. + + @param name The name of the command. + @param data Extended data for the command. + @ return Command reminder message object. + */ ++ (instancetype)notificationWithName:(NSString *)name data:(NSString *)data; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCContactNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCContactNotificationMessage.h new file mode 100644 index 0000000..9398b3d --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCContactNotificationMessage.h @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCContactNotificationMessage.h +// Created by xugang on 14/11/28. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 好友请求消息的类型名 + * \~english + The type name of the friend request message. + */ +#define RCContactNotificationMessageIdentifier @"RC:ContactNtf" + +/*! + * \~chinese + 请求添加好友 + * \~english + Request to add friends. + */ +#define ContactNotificationMessage_ContactOperationRequest @"Request" + +/*! + * \~chinese + 同意添加好友的请求 + * \~english + Agree to the request to add friends. + */ +#define ContactNotificationMessage_ContactOperationAcceptResponse @"AcceptResponse" + +/*! + * \~chinese + 拒绝添加好友的请求 + * \~english + Reject the request to add friends + */ +#define ContactNotificationMessage_ContactOperationRejectResponse @"RejectResponse" + +/*! + * \~chinese + 好友请求消息类 + + @discussion 好友请求消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Friend request message class. + + @ discussion friend request message class, this message is stored, but does not count as the number of unread messages. + + @ remarks notification message + */ +@interface RCContactNotificationMessage : RCMessageContent + +/*! + * \~chinese + 好友请求的当前操作名 + + @discussion + 好友请求当前的操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。 + 预定义的操作名:ContactNotificationMessage_ContactOperationRequest、ContactNotificationMessage_ContactOperationAcceptResponse、ContactNotificationMessage_ContactOperationRejectResponse。 + + * \~english + The current operation name of the friend request. + + @ discussion + Friends request the name of the current operation. You can use a predefined operation name or any operation name that you define yourself. + Predefined operation names: ContactNotificationMessage_ContactOperationRequest, ContactNotificationMessage_ContactOperationAcceptResponse, ContactNotificationMessage_ContactOperationRejectResponse. + */ +@property (nonatomic, copy) NSString *operation; + +/*! + * \~chinese + 当前操作发起用户的用户 ID + * \~english + User ID of the user who initiated the current operation + */ +@property (nonatomic, copy) NSString *sourceUserId; + +/*! + * \~chinese + 当前操作目标用户的用户 ID + * \~english + The user ID of the target user for the current operation + */ +@property (nonatomic, copy) NSString *targetUserId; + +/*! + * \~chinese + 当前操作的消息内容 + + @discussion 当前操作的消息内容,如同意、拒绝的理由等。 + + * \~english + Message content of the current operation. + + @ discussion The message content of the current operation, such as consent, reasons for rejection, etc. + */ +@property (nonatomic, copy) NSString *message; + +/*! + * \~chinese + 初始化好友请求消息 + + @param operation 好友请求当前的操作名 + @param sourceUserId 当前操作发起用户的用户 ID + @param targetUserId 当前操作目标用户的用户 ID + @param message 当前操作的消息内容 + @param extra 当前操作的附加信息 + @return 好友请求消息对象 + + @discussion 融云不介入您的好友关系,所有的好友关系都由您的服务器自己维护。 + 所以好友请求的操作名和消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好 UI 显示即可。 + + * \~english + Initialize friend request message. + + @param operation The name of the current operation requested by the friend. + @param sourceUserId User ID of the user who initiates the current operation. + @param targetUserId The user ID of the target user for the current operation. + @param message Message content of the current operation. + @param extra Additional information for the current operation. + @ return friend request message object. + + @ discussion RongCloud does not interfere in your friend relationships. All friend relationships are maintained by your server itself. + Therefore, you can customize the operation name, message content and extended information of the friend request, as long as your sender and receiver make a good UI display of the specific field content. + */ ++ (instancetype)notificationWithOperation:(NSString *)operation + sourceUserId:(NSString *)sourceUserId + targetUserId:(NSString *)targetUserId + message:(NSString *)message + extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversation.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversation.h new file mode 100644 index 0000000..d1b2b5f --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversation.h @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCConversation.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" +#import + +/*! + * \~chinese + 会话类 + + @discussion 会话类,包含会话的所有属性。 + + * \~english + Conversation class. + + @ discussion Conversation class, which contains all the properties of the conversation. + */ +@interface RCConversation : NSObject + +/*! + * \~chinese + 会话类型 + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType conversationType; + +/*! + * \~chinese + 会话 ID + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 该会话的业务标识,长度限制 20 字符 + * \~english + The business identity of the conversation, with a length limit of 20 characters. + */ +@property (nonatomic, copy) NSString *channelId; + +/*! + * \~chinese + 会话的标题 + * \~english + Title of the conversation + */ +@property (nonatomic, copy) NSString *conversationTitle; + +/*! + * \~chinese + 会话中的未读消息数量 + * \~english + Number of unread messages in the conversation + */ +@property (nonatomic, assign) int unreadMessageCount; + +/*! + * \~chinese + 是否置顶,默认值为 NO + + @discussion + 如果设置了置顶,在 IMKit 的 RCConversationListViewController 中会将此会话置顶显示。 + + * \~english + Whether to set the top. default value is NO. + + @ discussion + If the top is set, the conversation is displayed at the top in the RCConversationListViewController of IMKit. + */ +@property (nonatomic, assign) BOOL isTop; + +/*! + * \~chinese + 会话中最后一条消息的接收状态 + * \~english + The receiving status of the last message in the conversation + */ +@property (nonatomic, assign) RCReceivedStatus receivedStatus; + +/*! + * \~chinese + 会话中最后一条消息的发送状态 + * \~english + The sending status of the last message in the conversation + */ +@property (nonatomic, assign) RCSentStatus sentStatus; + +/*! + * \~chinese + 会话中最后一条消息的接收时间(Unix时间戳、毫秒) + * \~english + Time of receipt of the last message in the conversation (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long receivedTime; + +/*! + * \~chinese + 会话中最后一条消息的发送时间(Unix时间戳、毫秒) + * + * \~english + Time when the last message in the conversation is sent (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long sentTime; + +/*! + * \~chinese + 会话中存在的草稿 + * \~english + Drafts that exist in the conversation + */ +@property (nonatomic, copy) NSString *draft; + +/*! + * \~chinese + 会话中最后一条消息的类型名 + * \~english + The type name of the last message in the conversation + */ +@property (nonatomic, copy) NSString *objectName; + +/*! + * \~chinese + 会话中最后一条消息的发送者用户 ID + * \~english + User ID, the sender of the last message in the conversation. + */ +@property (nonatomic, copy) NSString *senderUserId; + +/*! + * \~chinese + 会话中最后一条消息的消息 ID + * \~english + Message ID of the last message in the conversation. + */ +@property (nonatomic, assign) long lastestMessageId; + +/*! + * \~chinese + 会话中最后一条消息的内容 + * \~english + The content of the last message in the conversation + */ +@property (nonatomic, strong) RCMessageContent *lastestMessage; + +/*! + * \~chinese + 会话中最后一条消息的方向 + * \~english + The direction of the last message in the conversation + */ +@property (nonatomic, assign) RCMessageDirection lastestMessageDirection; + +/*! + * \~chinese + 会话中最后一条消息的 json Dictionary + + @discussion 此字段存放最后一条消息内容中未编码的 json 数据。 + SDK 内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为 nil。 + + * \~english + The json Dictionary of the last message in the conversation. + + @ discussion This field stores the unencoded json data in the content of the last message. + The message built into SDK. If the message decoding fails, the default will store the contents of the message in this field; if the encoding and decoding are normal, this field will be set to nil. + */ +@property (nonatomic, strong) NSDictionary *jsonDict; + +/*! + * \~chinese + 最后一条消息的全局唯一 ID + + @discussion 服务器消息唯一 ID(在同一个Appkey下全局唯一) + + * \~english + Globally unique ID of the last message. + + @ discussion Server message unique ID (globally unique under the same Appkey). + */ +@property (nonatomic, copy) NSString *lastestMessageUId; + +/*! + * \~chinese + 会话中是否存在被 @ 的消息 + + @discussion 在清除会话未读数(clearMessagesUnreadStatus:targetId:)的时候,会将此状态置成 NO。 + + * \~english + Whether there is a @ message in the conversation. + + @ discussion set this state to NO when clearing the conversation unread (clearMessagesUnreadStatus:targetId:). + */ +@property (nonatomic, assign, readonly) BOOL hasUnreadMentioned; + +/*! + * \~chinese +会话中 @ 消息的个数 + +@discussion 在清除会话未读数(clearMessagesUnreadStatus:targetId:)的时候,会将此值置成 0。 + + * \~english + The number of @ messages in the conversation. + + @ discussion Set this value to 0 when it clears the conversation unread (clearMessagesUnreadStatus:targetId:). +*/ +@property (nonatomic, assign) int mentionedCount; + +/*! + * \~chinese +会话是否是免打扰状态 + + * \~english + Whether the conversation is in a do not Disturb state. +*/ +@property (nonatomic, assign) RCConversationNotificationStatus blockStatus; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationChannelProtocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationChannelProtocol.h new file mode 100644 index 0000000..fa44582 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationChannelProtocol.h @@ -0,0 +1,91 @@ +// +// RCConversationChannelProtocol.h +// RongIMLibCore +// +// Created by Sin on 2021/3/5. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#ifndef RCConversationChannelProtocol_h +#define RCConversationChannelProtocol_h +@protocol RCConversationChannelMessageReceiptDelegate +@optional +/*! + * \~chinese + 请求消息已读回执(收到需要阅读时发送回执的请求,收到此请求后在会话页面已经展示该 messageUId 对应的消息或者调用 + getHistoryMessages 获取消息的时候,包含此 messageUId 的消息,需要调用 sendMessageReadReceiptResponse + 接口发送消息阅读回执) + + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + @param channelId 所属会话的业务标识 + + * \~english + Request message read receipt (receive a request to send a receipt upon reading. After receiving this request, the corresponding message of the messageUId has been displayed on the conversation page, or when getHistoryMessages is called to get the message, the message with messageUId will call sendMessageReadReceiptResponse interface to send message tread receipt ). + + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + @param channelId Business identity of the conversation to which it belongs. + */ +- (void)onMessageReceiptRequest:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageUId:(NSString *)messageUId; + +/*! + * \~chinese + 消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数) + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + @param channelId 所属会话的业务标识 + @param userIdList 已读userId列表 + + * \~english + Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId). + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + @param channelId Business identity of the conversation to which it belongs. + @param userIdList Read userId list. + */ +- (void)onMessageReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageUId:(NSString *)messageUId + readerList:(NSMutableDictionary *)userIdList; + +@end + +@protocol RCConversationChannelTypingStatusDelegate +/*! + * \~chinese + 用户输入状态变化的回调 + + @param conversationType 会话类型 + @param targetId 会话目标ID + @param channelId 所属会话的业务标识 + @param userTypingStatusList 正在输入的RCUserTypingStatus列表(nil标示当前没有用户正在输入) + + @discussion + 当客户端收到用户输入状态的变化时,会回调此接口,通知发生变化的会话以及当前正在输入的RCUserTypingStatus列表。 + + * \~english + Callback for user input status change. + + @param conversationType Conversation type + @param targetId conversation destination ID. + @param channelId Business identity of the conversation to which it belongs. + @param userTypingStatusList List of RCUserTypingStatus being entered (nil indicates that no user is currently entering). + + @ discussion + When the client receives a change in the status of the user's input, it calls back this interface to notify the changed conversation and the RCUserTypingStatus list currently being entered. + */ +- (void)onTypingStatusChanged:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + status:(NSArray *)userTypingStatusList; +@end +#endif /* RCConversationChannelProtocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationIdentifier.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationIdentifier.h new file mode 100644 index 0000000..4f7ccc3 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationIdentifier.h @@ -0,0 +1,53 @@ +// +// RCConversationIdentifier.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCStatusDefine.h" +NS_ASSUME_NONNULL_BEGIN +/*! + * \~chinese + 会话标识 + * \~english + Conversation identification + */ +@interface RCConversationIdentifier : NSObject +/*! + * \~chinese + 会话类型 + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType type; +/*! + * \~chinese + 会话 ID + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + RCConversationIdentifier 初始化方法 + + @param type 会话类型 + @param targetId 会话 id + + * \~english + RCConversationIdentifier initialization method. + + @ param type conversation type. + @ param targetId conversation id. + */ + +- (instancetype)initWithConversationIdentifier:(RCConversationType)type + targetId:(NSString *)targetId; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationStatusInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationStatusInfo.h new file mode 100644 index 0000000..7e89a3e --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationStatusInfo.h @@ -0,0 +1,88 @@ +// +// RCConversationStatusInfo.h +// RongIMLib +// +// Created by liyan on 2020/5/13. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +#import "RCStatusDefine.h" + +/*! + * \~chinese +会话状态类型 + * \~english + Conversation state type +*/ + +typedef NS_ENUM(NSUInteger, RCConversationStatusType) { + /*! + * \~chinese + 免打扰 + * \~english + Do not disturb + */ + RCConversationStatusType_Mute = 1, + + /*! + * \~chinese + 置顶 + * \~english + Top + */ + RCConversationStatusType_Top = 2 +}; + +NS_ASSUME_NONNULL_BEGIN + +@interface RCConversationStatusInfo : NSObject + +/*! + * \~chinese + 会话类型 + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType conversationType; + +/*! + * \~chinese + 会话 ID + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 所属会话的业务标识 + * \~english + Business identifier of the conversation to which it belongs. + */ +@property (nonatomic, copy) NSString *channelId; + +/*! + * \~chinese + 会话状态改变的类型 + * \~english + Types of conversation state changes +*/ +@property (nonatomic, assign) RCConversationStatusType conversationStatusType; + +/*! + * \~chinese + 如果 conversationStatusType = RCConversationStatusType_Mute, conversationStatusvalue = 0 + 是提醒,conversationStatusvalue = 1 是免打扰。 如果 conversationStatusType = RCConversationStatusType_Top, + conversationStatusvalue = 0 是不置顶,conversationStatusvalue = 1 是置顶。 + + * \~english + If conversationStatusType = RCConversationStatusType_Mute, conversationStatusvalue = 0. + Is a reminder, conversationStatusvalue = 1 is do not disturb. If conversationStatusType = RCConversationStatusType_Top. + ConversationStatusvalue = 0 indicates non top setting, conversationStatusvalue = 1 is the top setting. +*/ +@property (nonatomic, assign) int conversationStatusvalue; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationTagInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationTagInfo.h new file mode 100644 index 0000000..2477797 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCConversationTagInfo.h @@ -0,0 +1,40 @@ +// +// ConversationTagInfo.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCTagInfo.h" +NS_ASSUME_NONNULL_BEGIN +/*! + * \~chinese + 会话所属的标签信息 + * \~english + Tag information to which the conversation belongs + */ +@interface RCConversationTagInfo : NSObject + +/*! + * \~chinese + 标签信息 + + * \~english + tag info + */ +@property (nonatomic, strong) RCTagInfo *tagInfo; + +/*! + * \~chinese + 会话是否置顶 + + * \~english + Whether the conversation is at the top + */ +@property (nonatomic, assign) BOOL isTop; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCoreClient.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCoreClient.h new file mode 100644 index 0000000..fc2e607 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCCoreClient.h @@ -0,0 +1,4547 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RongCoreClient.h +// Created by xugang on 14/12/23. + +#ifndef __RongCoreClient +#define __RongCoreClient +#import +#import +#import "RCConversation.h" +#import "RCMessage.h" +#import "RCPushProfile.h" +#import "RCSearchConversationResult.h" +#import "RCStatusDefine.h" +#import "RCUploadImageStatusListener.h" +#import "RCUploadMediaStatusListener.h" +#import "RCUserInfo.h" +#import "RCUserOnlineStatusInfo.h" +#import "RCWatchKitStatusDelegate.h" +#import "RCSendMessageOption.h" +#import "RCRemoteHistoryMsgOption.h" +#import "RCIMClientProtocol.h" +#import "RCTagInfo.h" +#import "RCConversationIdentifier.h" +#import "RCConversationTagInfo.h" +#import "RCTagProtocol.h" +#import "RCImageCompressConfig.h" +#import "RCHistoryMessageOption.h" +/*! + * \~chinese + @const 收到已读回执的 Notification + + @discussion 收到消息已读回执之后,IMLibCore 会分发此通知。 + + Notification 的 object 为 nil,userInfo 为 NSDictionary 对象, + 其中 key 值分别为 @"cType"、@"tId"、@"messageTime", + 对应的 value 为会话类型的 NSNumber 对象 、会话的 targetId 、已阅读的最后一条消息的 sendTime。 + 如: + NSNumber *ctype = [notification.userInfo objectForKey:@"cType"]; + NSNumber *time = [notification.userInfo objectForKey:@"messageTime"]; + NSString *targetId = [notification.userInfo objectForKey:@"tId"]; + NSString *channelId = [notification.userInfo objectForKey:@"cId"]; + NSString *fromUserId = [notification.userInfo objectForKey:@"fId"]; + + 收到这个消息之后可以更新这个会话中 messageTime 以前的消息 UI 为已读(底层数据库消息状态已经改为已读)。 + + @remarks 事件监听 + + * \~english + @const Receive the Notification of read receipt +@ discussion IMLibCore distributes this notification after receiving the read receipt of the message. + + The object of Notification is nil and userInfo is the object of NSDictionary +where key values are @ "cType", @ "tId" and @ "messageTime" respectively +and the corresponding value is the NSNumber object of the conversation type, the targetId of the conversation, and the sendTime of the last message read. + E.g. + NSNumber *ctype = [notification.userInfo objectForKey:@"cType"]; + NSNumber *time = [notification.userInfo objectForKey:@"messageTime"]; + NSString *targetId = [notification.userInfo objectForKey:@"tId"]; + NSString *channelId = [notification.userInfo objectForKey:@"cId"]; + NSString *fromUserId = [notification.userInfo objectForKey:@"fId"]; + +After this message is received, you can update the previous messageTime message UI in this conversation to read (the underlying database message status has been changed to read). + + @ remarks event listener + */ +FOUNDATION_EXPORT NSString *const RCLibDispatchReadReceiptNotification; + +#pragma mark - IMLibCore Core Class + +/*! + * \~chinese + 融云 IMLibCore 核心类 + + @discussion 您需要通过 sharedCoreClient 方法,获取单例对象。 + + * \~english + RongCloud IMLibCore core class + + @discussion You shall get the single instance object through the sharedCoreClient method. + */ +@interface RCCoreClient : NSObject + +/*! + * \~chinese + 获取融云通讯能力库 IMLibCore 的核心类单例 + + @return 融云通讯能力库 IMLibCore 的核心单例类 + + @discussion 您可以通过此方法,获取 IMLibCore 的单例,访问对象中的属性和方法. + + * \~english + Get a single instance of the core class of RongCloud communication capability library IMLibCore + + @ return Core single instance class of RongCloud communication capability library IMLibCore. + + @ discussion You can use this method to get the single instance of IMLibCore and access to the properties and methods in the object. + */ ++ (instancetype)sharedCoreClient; + +#pragma mark - SDK init +/*! + * \~chinese + 初始化融云 SDK + + @param appKey 从融云开发者平台创建应用后获取到的 App Key + @discussion 初始化后,SDK 会监听 app 生命周期, 用于判断应用处于前台、后台,根据前后台状态调整链接心跳 + @discussion + 您在使用融云 SDK 所有功能( 包括显示 SDK 中或者继承于 SDK 的 View )之前,您必须先调用此方法初始化 SDK。 + 在 App 整个生命周期中,您只需要执行一次初始化。 + + **升级说明:** + **从2.4.1版本开始,为了兼容 Swift 的风格与便于使用,将原有的 init: 方法升级为此方法,方法的功能和使用均不变。** + + @warning 如果您使用 IMLibCore,请使用此方法初始化 SDK; + 如果您使用 IMKit,请使用 RCIM 中的同名方法初始化,而不要使用此方法。 + + @remarks 连接 + + * \~english + Initialize RongCloud SDK. + + @param appKey The App Key obtained after the application is created by RongCloud developer platform + @discussion After initialization, SDK listens to the app life cycle to determine whether the application is in the foreground or background, and adjusts the link heartbeat according to the foreground and background status. + @ discussion + You must call this method to initialize the SDK before you can use all the features of the RongCloud SDK (including displaying View in SDK or inheriting from SDK). + You only shall perform initialization once throughout the App lifecycle. + + ** Upgrade instructions:** + *””From version 2.4.1, to be compatible with the style of Swift and easy to use, the original init: method is upgraded to this method, and the function and use of the method remain unchanged. ** + + @ warning If you are using IMLibCore, please use this method to initialize SDK + If you are using IMKit, use the method of the same name in RCIM instead of using this method. + + @ remarks Connection + */ +- (void)initWithAppKey:(NSString *)appKey; + +/*! + * \~chinese +设置 deviceToken(已兼容 iOS 13),用于远程推送 + +@param deviceTokenData 从系统获取到的设备号 deviceTokenData (不需要处理) + +@discussion +deviceToken 是系统提供的,从苹果服务器获取的,用于 APNs 远程推送必须使用的设备唯一值。 +您需要将 -application:didRegisterForRemoteNotificationsWithDeviceToken: 获取到的 deviceToken 作为参数传入此方法。 + +如: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [[RCCoreClient sharedCoreClient] setDeviceTokenData:deviceToken]; + } +@remarks 功能设置 + + * \~english + Set deviceToken (compatible with iOS 13) for remote push + + @param deviceTokenData Device number deviceTokenData obtained from the system (no processing required) + + @ discussion + DeviceToken is the unique device value the that must be used for APNs remote push, and is provided by the system and obtained from the Apple server. + You shall pass the deviceToken obtained by the application:didRegisterForRemoteNotificationsWithDeviceToken: into this method as a parameter. + + E.g.: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [[RCCoreClient sharedCoreClient] setDeviceTokenData:deviceToken]; + } + @remarks Function setting +*/ +- (void)setDeviceTokenData:(NSData *)deviceTokenData; + +/*! + * \~chinese + 设置 deviceToken,用于远程推送 + + @param deviceToken 从系统获取到的设备号 deviceToken + + @discussion + deviceToken 是系统提供的,从苹果服务器获取的,用于 APNs 远程推送必须使用的设备唯一值。 + 您需要将 -application:didRegisterForRemoteNotificationsWithDeviceToken: 获取到的 + deviceToken,转换成十六进制字符串,作为参数传入此方法。 + + 如: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + NSString *token = [self getHexStringForData:deviceToken]; + [[RCCoreClient sharedCoreClient] setDeviceToken:token]; + } + + - (NSString *)getHexStringForData:(NSData *)data { + NSUInteger len = [data length]; + char *chars = (char *)[data bytes]; + NSMutableString *hexString = [[NSMutableString alloc] init]; + for (NSUInteger i = 0; i < len; i ++) { + [hexString appendString:[NSString stringWithFormat:@"%0.2hhx", chars[i]]]; + } + return hexString; + } + + @remarks 功能设置 + + * \~english + Set deviceToken for remote push + + @param deviceToken The device number deviceToken obtained from the system + + @ discussion + DeviceToken is the unique device value the that must be used for APNs remote push, and is provided by the system and obtained from the Apple server. + You shall pass the deviceToken obtained by the application:didRegisterForRemoteNotificationsWithDeviceToken: Obtained + deviceToken, which is converted to a hexadecimal string and passed in to this method as a parameter. + + E.g.: + + - (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + NSString *token = [self getHexStringForData:deviceToken]; + [[RCCoreClient sharedCoreClient] setDeviceToken:token]; + } + + - (NSString *)getHexStringForData:(NSData *)data { + NSUInteger len = [data length]; + char *chars = (char *)[data bytes]; + NSMutableString *hexString = [[NSMutableString alloc] init]; + for (NSUInteger i = 0; i < len; i ++) { + [hexString appendString:[NSString stringWithFormat:@"%0.2hhx", chars[i]]]; + } + return hexString; + } + + @remarks function setting + */ +- (void)setDeviceToken:(NSString *)deviceToken; + +#pragma mark - set navi server & file server (contact us before use) + +/*! + * \~chinese + 设置导航服务器和上传文件服务器信息 + + @param naviServer 导航服务器地址,具体的格式参考下面的说明 + @param fileServer 文件服务器地址,具体的格式参考下面的说明 + @return 是否设置成功 + + @warning 仅限独立数据中心使用,使用前必须先联系商务开通。必须在 SDK init 之前进行设置。 + @discussion + naviServer 必须为有效的服务器地址,fileServer 如果想使用默认的,可以传 nil。 + naviServer 和 fileServer 的格式说明: + 1、如果使用 https,则设置为 https://cn.xxx.com:port 或 https://cn.xxx.com 格式,其中域名部分也可以是 + IP,如果不指定端口,将默认使用 443 端口。 + 2、如果使用 http,则设置为 cn.xxx.com:port 或 cn.xxx.com 格式,其中域名部分也可以是 IP,如果不指定端口,将默认使用 80 + 端口。(iOS 默认只能使⽤ HTTPS 协议。如果您使⽤ http 协议,请参考 iOS 开发 + ⽂档中的 ATS 设置说明。链接如下:https://support.rongcloud.cn/ks/OTQ1 ) + + @remarks 功能设置 + + * \~english + Set navigation server and upload file server information + + @param naviServer Address of navigation server. For the specific format, please refer to the instructions below + @param fileServer Address of the file server. For the specific format, please refer to the instructions below + @ return whether it is set successfully + + @ warning It can only be used at an independent data center and you must contact the business to activate it before using it. It must be set before SDK init. + @ discussion + naviServer must be a valid server address, and fileServer can pass nil if you want to use the default. + Format description for naviServer and fileServer: + 1. If you use https, it is set to https://cn.xxx.com:port or https://cn.xxx.com format, and the domain name can also be IP. If a port is not specified, port 443 will be used by default. + 2. If http is used, it is set to cn.xxx.com:port or cn.xxx.com format, and the domain name can also be IP. If the port is not specified, port 80 will be used by default. (iOS can only use the HTTPS protocol by default. If you use the http protocol, please refer to description of the ATS settings in the iOS development documentation. The link is as follows: https://support.rongcloud.cn/ks/OTQ1) + + @ remarks function setting + */ +- (BOOL)setServerInfo:(NSString *)naviServer fileServer:(NSString *)fileServer; + +/** + * \~chinese + 设置统计服务器的信息 + + @param statisticServer 统计服务器地址,具体的格式参考下面的说明 + @return 是否设置成功 + + @warning 仅限独立数据中心使用,使用前必须先联系商务开通。必须在 SDK init 和 setDeviceToken 之前进行设置。 + @discussion + statisticServer 必须为有效的服务器地址,否则会造成推送等业务不能正常使用。 + 格式说明: + 1、如果使用 https,则设置为 https://cn.xxx.com:port 或 https://cn.xxx.com 格式,其中域名部分也可以是 + IP,如果不指定端口,将默认使用 443 端口。 + 2、如果使用 http,则设置为 cn.xxx.com:port 或 cn.xxx.com 格式,其中域名部分也可以是 IP,如果不指定端口,将默认使用 80 + 端口。(iOS 默认只能使⽤ HTTPS 协议。如果您使⽤ http 协议,请参考 iOS 开发 + ⽂档中的 ATS 设置说明。链接如下:https://support.rongcloud.cn/ks/OTQ1 ) + + @remarks 功能设置 + + * \~english + Set the statistics server information + + @param statisticServer Address of the statistics server. For the specific format, please refer to the instructions below + @ return Whether it is set successfully + + @ warning It can only be used at an independent data center and you must contact the business to activate it before using it. It must be set before SDK init and setDeviceToken. + @ discussion + statisticServer must have a valid server address, otherwise services such as push cannot be used properly. + Format description: + 1. If you use https, it is set to https://cn.xxx.com:port or https://cn.xxx.com format, and the domain name can also be IP. If a port is not specified, port 443 will be used by default. + 2. If http is used, it is set to cn.xxx.com:port or cn.xxx.com format, and the domain name can also be IP. If the port is not specified, 80 will be used by default. (iOS can only use the HTTPS protocol by default. If you use the http protocol, please refer to description of the ATS settings in the iOS development documentation. The link is as follows: https://support.rongcloud.cn/ks/OTQ1) + + @ remarks function setting + */ +- (BOOL)setStatisticServer:(NSString *)statisticServer; + +#pragma mark - Connect & disconnect + +/*! + * \~chinese + 与融云服务器建立连接 + + @param token 从您服务器端获取的 token (用户身份令牌) + @param dbOpenedBlock 本地消息数据库打开的回调 + @param successBlock 连接建立成功的回调 [ userId: 当前连接成功所用的用户 ID] + @param errorBlock 连接建立失败的回调,触发该回调代表 SDK 无法继续重连 [errorCode: 连接失败的错误码] + + @discussion 调用该接口,SDK 会在连接失败之后尝试重连,直到连接成功或者出现 SDK 无法处理的错误(如 token 非法)。 + 如果您不想一直进行重连,可以使用 connectWithToken:timeLimit:dbOpened:success:error: 接口并设置连接超时时间 timeLimit。 + + @discussion 连接成功后,SDK 将接管所有的重连处理。当因为网络原因断线的情况下,SDK 会不停重连直到连接成功为止,不需要您做额外的连接操作。 + + 对于 errorBlock 需要特定关心 tokenIncorrect 的情况: + 一是 token 错误,请您检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey 是否一致; + 二是 token 过期,是因为您在开发者后台设置了 token 过期时间,您需要请求您的服务器重新获取 token 并再次用新的 token 建立连接。 + 在此种情况下,您需要请求您的服务器重新获取 token 并建立连接,但是注意避免无限循环,以免影响 App 用户体验。 + + @warning 如果您使用 IMLibCore,请使用此方法建立与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法建立与融云服务器的连接,而不要使用此方法。 + + 此方法的回调并非为原调用线程,您如果需要进行 UI 操作,请注意切换到主线程。 + + * \~english + Establish a connection with the RongCloud server. + + @param token Token (user identity token) obtained from your server. + @param dbOpenedBlock Callback for opening the local message database. + @param successBlock Callback for successful connection establishment [userId: The user ID used for the current successful connection]. + @param errorBlock Callback for failed connection establishment. Triggering this callback means that SDK cannot continue to reconnect [errorCode: Error code for connection failure]. + + @ discussion After this interface is called, SDK will try to reconnect after the connection fails, until the connection is successful or an error that SDK cannot handle (such as illegal token) occurs. + If you don't want to keep reconnecting, you can use connectWithToken:timeLimit:dbOpened:success:error: interface and set the connection timeout timeLimit + + @ discussion After the connection is successful, SDK will take over all reconnection processing When the connection is disconnected due to network reasons, SDK will keep reconnecting until the connection is successful, and there is no need for you to do any additional connection operations. + + For situations where errorBlock shall be specifically concerned about tokenIncorrect: + One is the token error. Please check whether the AppKey used by the client initialization is consistent with the AppKey used by your server to obtain the token. + Second, the token expires because you set the token expiration time in the developer background, and you shall request your server to retrieve the token and establish a connection with the new token again. + In this case, you shall ask your server to retrieve the token and establish a connection, but be careful to avoid an infinite loop so as not to ensure a good App user experience. + + @ warning If you use IMLibCore, please use this method to establish a connection with the RongCloud server; + If you use IMKit, please use the method of the same name in RCIM to establish a connection to the RongCloud server instead of using this method. + + The callback for this method is not the original calling thread. If you shall perform a UI operation, please be careful to switch to the main thread. + */ +- (void)connectWithToken:(NSString *)token + dbOpened:(void (^)(RCDBErrorCode code))dbOpenedBlock + success:(void (^)(NSString *userId))successBlock + error:(void (^)(RCConnectErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 与融云服务器建立连接 + + @param token 从您服务器端获取的 token (用户身份令牌) + @param timeLimit SDK 连接的超时时间,单位: 秒 + timeLimit <= 0,SDK 会一直连接,直到连接成功或者出现 SDK 无法处理的错误(如 token 非法)。 + timeLimit > 0,SDK 最多连接 timeLimit 秒,超时时返回 RC_CONNECT_TIMEOUT 错误,并不再重连。 + @param dbOpenedBlock 本地消息数据库打开的回调 + @param successBlock 连接建立成功的回调 [ userId: 当前连接成功所用的用户 ID] + @param errorBlock 连接建立失败的回调,触发该回调代表 SDK 无法继续重连 [errorCode: 连接失败的错误码] + + @discussion 调用该接口,SDK 会在 timeLimit 秒内尝试重连,直到出现下面三种情况之一: + 第一、连接成功,回调 successBlock(userId)。 + 第二、超时,回调 errorBlock(RC_CONNECT_TIMEOUT)。 + 第三、出现 SDK 无法处理的错误,回调 errorBlock(errorCode)(如 token 非法)。 + + @discussion 连接成功后,SDK 将接管所有的重连处理。当因为网络原因断线的情况下,SDK 会不停重连直到连接成功为止,不需要您做额外的连接操作。 + + 对于 errorBlock 需要特定关心 tokenIncorrect 的情况: + 一是 token 错误,请您检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey 是否一致; + 二是 token 过期,是因为您在开发者后台设置了 token 过期时间,您需要请求您的服务器重新获取 token 并再次用新的 token 建立连接。 + 在此种情况下,您需要请求您的服务器重新获取 token 并建立连接,但是注意避免无限循环,以免影响 App 用户体验。 + + @warning 如果您使用 IMLibCore,请使用此方法建立与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法建立与融云服务器的连接,而不要使用此方法。 + + 此方法的回调并非为原调用线程,您如果需要进行 UI 操作,请注意切换到主线程。 + + * \~english + Establish a connection with the RongCloud server. + + @param token Token (user identity token) obtained from your server. + @param timeLimit Timeout of SDK connection, unit: (in seconds) + TimeLimit < = 0 the SDK SDK will continue to connect until the connection is successful or an error (such as illegal token) that cannot be handled by the SDK occurs. + TimeLimit > 0, SDK can be connected for a maximum of timeLimit seconds. A RC_CONNECT_TIMEOUT error is returned when the timeout occurs, and the connection will not be reconnected + @param dbOpenedBlock Callback for opening the local message database. + @param successBlock Callback for successful connection establishment [userId: The user ID used for the current successful connection]. + @param errorBlock Callback for failed connection establishment. Triggering this callback means that SDK cannot continue to reconnect [errorCode: Error code for connection failure] + + @ discussion If this interface is called, SDK will try to reconnect within the timeLimit seconds until one of the following three situations occurs: + First, if the connection is successful, call back successBlock (userId). + Second, call back errorBlock (RC_CONNECT_TIMEOUT) after timeout. + Third, if there is an error that cannot be handled by SDK, callback errorBlock (errorCode) (such as token is illegal). + + @ discussion After the connection is successful, SDK will take over all reconnection processing When the connection is disconnected due to network reasons, SDK will keep reconnecting until the connection is successful, and there is no need for you to do any additional connection operations. + + For situations where errorBlock shall be specifically concerned about tokenIncorrect: + One is the token error. Please check whether the AppKey used by the client initialization is consistent with the AppKey used by your server to obtain the token. + Second, the token expires because you set the token expiration time in the developer background, and you shall request your server to retrieve the token and establish a connection with the new token again. + In this case, you shall ask your server to retrieve the token and establish a connection, but be careful to avoid an infinite loop so as not to ensure a good App user experience. + + @ warning If you use IMLibCore, please use this method to establish a connection with the RongCloud server; + If you use IMKit, please use the method of the same name in RCIM to establish a connection to the RongCloud server instead of using this method. + + The callback for this method is not the original calling thread. If you shall perform a UI operation, please be careful to switch to the main thread. + */ +- (void)connectWithToken:(NSString *)token + timeLimit:(int)timeLimit + dbOpened:(void (^)(RCDBErrorCode code))dbOpenedBlock + success:(void (^)(NSString *userId))successBlock + error:(void (^)(RCConnectErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 断开与融云服务器的连接 + + @param isReceivePush App 在断开连接之后,是否还接收远程推送 + + @discussion + 因为 SDK 在前后台切换或者网络出现异常都会自动重连,会保证连接的可靠性。 + 所以除非您的 App 逻辑需要登出,否则一般不需要调用此方法进行手动断开。 + + @warning 如果您使用 IMLibCore,请使用此方法断开与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法断开与融云服务器的连接,而不要使用此方法。 + + isReceivePush 指断开与融云服务器的连接之后,是否还接收远程推送。 + [[RCCoreClient sharedCoreClient] disconnect:YES] 与 [[RCCoreClient sharedCoreClient] + disconnect] 完全一致; + [[RCCoreClient sharedCoreClient] disconnect:NO] 与[ [RCCoreClient sharedCoreClient] + logout] 完全一致。 + 您只需要按照您的需求,使用 disconnect: 与 disconnect 以及 logout 三个接口其中一个即可。 + + @remarks 连接 + + * \~english + Disconnect from the RongCloud server + + @param isReceivePush Does app still receive remote push after being disconnected + + @ discussion + The system can automatically reconnect to ensure reliability of the connection because SDK switches between the foreground and background or the network is abnormal. + Unless your App logic requires logout, generally you don't need to call this method for manual disconnection. + + @ warning If you use IMLibCore, please use this method to disconnect from the RongCloud server. + If you use IMKit, please use the method of the same name in RCIM to disconnect from the RongCloud server instead of using this method. + + isReceivePush refers to whether remote push will be received after the connection with the RongCloud server is disconnected. + [[RCCoreClient sharedCoreClient] disconnect:YES] and [[RCCoreClient sharedCoreClient] + disconnect] are exactly the same; + [[RCCoreClient sharedCoreClient] disconnect:NO] and [ [RCCoreClient sharedCoreClient] + logout] are exactly the same. + You just need to use one of disconnect:, disconnect and logout interfaces on demand. + + @ remarks Connection + */ +- (void)disconnect:(BOOL)isReceivePush; + +/*! + * \~chinese + 断开与融云服务器的连接,但仍然接收远程推送 + + @discussion + 因为 SDK 在前后台切换或者网络出现异常都会自动重连,会保证连接的可靠性。 + 所以除非您的 App 逻辑需要登出,否则一般不需要调用此方法进行手动断开。 + + @warning 如果您使用 IMLibCore,请使用此方法断开与融云服务器的连接; + 如果您使用 IMKit,请使用 RCIM 中的同名方法断开与融云服务器的连接,而不要使用此方法。 + + [[RCCoreClient sharedCoreClient] disconnect:YES] 与 [[RCCoreClient sharedCoreClient] + disconnect] 完全一致; + [[RCCoreClient sharedCoreClient] disconnect:NO] 与 [[RCCoreClient sharedCoreClient] + logout] 完全一致。 + 您只需要按照您的需求,使用 disconnect: 与 disconnect 以及 logout 三个接口其中一个即可。 + + @remarks 连接 + + * \~english + Disconnect from the RongCloud server, but still receive remote push + + @ discussion + The system can automatically reconnect to ensure reliability of the connection because SDK switches between the foreground and background or the network is abnormal. + Unless your App logic requires logout, generally you don't need to call this method for manual disconnection. + + @ warning If you use IMLibCore, please use this method to disconnect from the RongCloud server. + If you use IMKit, please use the method of the same name in RCIM to disconnect from the RongCloud server instead of using this method. + + [[RCCoreClient sharedCoreClient] disconnect:YES] and [[RCCoreClient sharedCoreClient] + disconnect] are exactly same; + [[RCCoreClient sharedCoreClient] disconnect:NO] and [[RCCoreClient sharedCoreClient] + logout] are exactly same. + You just shall use one of disconnect: Disconnect and logout interface on demand. + + @ remarks Connection + */ +- (void)disconnect; + +/*! + * \~chinese + 断开与融云服务器的连接,并不再接收远程推送 + + @discussion + 因为 SDK 在前后台切换或者网络出现异常都会自动重连,会保证连接的可靠性。 + 所以除非您的 App 逻辑需要登出,否则一般不需要调用此方法进行手动断开。 + + @warning 如果您使用 IMKit,请使用此方法断开与融云服务器的连接; + 如果您使用 IMLibCore,请使用 RCCoreClient 中的同名方法断开与融云服务器的连接,而不要使用此方法。 + + [[RCCoreClient sharedCoreClient] disconnect:YES] 与 [[RCCoreClient sharedCoreClient] + disconnect] 完全一致; + [[RCCoreClient sharedCoreClient] disconnect:NO] 与 [[RCCoreClient sharedCoreClient] + logout] 完全一致。 + 您只需要按照您的需求,使用 disconnect: 与 disconnect 以及 logout 三个接口其中一个即可。 + + @remarks 连接 + + * \~english + Disconnect from the RongCloud server and do not receive remote push + + @ discussion + The system can automatically reconnect to ensure reliability of the connection because SDK switches between the foreground and background or the network is abnormal. + Unless your App logic requires logout, generally you don't need to call this method for manual disconnection. + + @ warning If you use IMKit, please use this method to disconnect from the RongCloud server; + If you use IMLibCore, please use the method of the same name in RCCoreClient to disconnect from the RongCloud server instead of using this method. + + [[RCCoreClient sharedCoreClient] disconnect:YES] and [[RCCoreClient sharedCoreClient] + disconnect] are exactly same; + [[RCCoreClient sharedCoreClient] disconnect:NO] and [[RCCoreClient sharedCoreClient] + logout] are exactly same. + You just shall use one of disconnect: Disconnect and logout interface on demand. + + @ remarks Connection + */ +- (void)logout; + +/** + * \~chinese + 设置断线重连时是否踢出当前正在重连的设备 + + @discussion + 用户没有开通多设备登录功能的前提下,同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。 + 由于 SDK 有断线重连功能,存在下面情况。 + 用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。 + 用户此时又在 B 设备登录,B 设备连接成功。 + A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。 + 这个接口就是为这种情况加的。 + 设置 enable 为 YES 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。 + + @param enable 是否踢出重连设备 + + @remarks 功能设置 + + * \~english + Set whether to kick out the reconnected device upon disconnection and reconnection. + + @ discussion + If the user does not enable the multi-device login function, when the same account logs in on a new device, the account will be kicked out of the previously logged-in device. + Due to the disconnection and reconnection function of SDK, the following conditions exist: + When the user logs in on device A, the network of device A is unstable, and the connection is not successful, SDK will start the reconnection mechanism. + At this time, the user logs in on the B device, and the B device is connected successfully. + After the A device network is stable, the user connects to the A device successfully, and the B device is kicked out. + This interface is added for this case. I + If If enable is set as YES, when SDK is reconnected and it is found that other devices have been successfully connected at this time, the reconnected devices will be kicked out instead of forcibly kicking out the existing devices. + + @param enable Whether to kick out the reconnected equipment + + @ remarks function setting + */ +- (void)setReconnectKickEnable:(BOOL)enable; + +#pragma mark - RCConnectionStatusChangeDelegate + +/*! + * \~chinese + 设置 IMLibCore 的连接状态监听器 + + @param delegate IMLibCore 连接状态监听器 + + @warning 如果您使用 IMLibCore,可以设置并实现此 Delegate 监听连接状态变化; + 如果您使用 IMKit,请使用 RCIM 中的 connectionStatusDelegate 监听连接状态变化,而不要使用此方法,否则会导致 IMKit + 中无法自动更新 UI! + + @remarks 功能设置 + + * \~english + Set the connection status listener for IMLibCore + + @param delegate IMLibCore connection status listener. + + @ warning If you use IMLibCore, you can set and implement this Delegate to listen toconnection status changes. + If you use IMKit, please use connectionStatusDelegate in RCIM to listen to connection status changes, and do not use this method, otherwise it will cause that UI cannot be automatically updated in IMKit! + + @ remarks function setting + */ +- (void)setRCConnectionStatusChangeDelegate:(id)delegate; + +/*! + * \~chinese + 获取当前 SDK 的连接状态 + + @return 当前 SDK 的连接状态 + + @remarks 数据获取 + + * \~english + Get the connection status of the current SDK + + @ return connection status of the current SDK + + @ remarks data acquisition + */ +- (RCConnectionStatus)getConnectionStatus; + +/*! + * \~chinese + 获取当前的网络状态 + + @return 当前的网路状态 + + @remarks 数据获取 + + * \~english + Get the current network status + + @ return current network status + + @ remarks data acquisition + */ +- (RCNetworkStatus)getCurrentNetworkStatus; + +/*! + * \~chinese + SDK 当前所处的运行状态 + + @remarks 数据获取 + + * \~english + Current running status of SDK + + @ remarks data acquisition + */ +@property (nonatomic, assign, readonly) RCSDKRunningMode sdkRunningMode; + +#pragma mark - Apple Watch Delegate + +/*! + * \~chinese + 用于 Apple Watch 的 IMLibCore 事务监听器 + + @remarks 功能设置 + + * \~english + IMLibCore transaction listener for Apple Watch. + + @ remarks function setting + */ +@property (nonatomic, strong) id watchKitStatusDelegate; + +/*! + * \~chinese + 媒体文件下载拦截器 + + @remarks 功能设置 + + * \~english + Media file downloading interceptor + + @ remarks function setting + */ +@property (nonatomic, weak) id downloadInterceptor; + +#pragma mark - RCMessageDestructDelegate + +/** + * \~chinese + 设置 IMLibCore 的阅后即焚监听器 + + @param delegate 阅后即焚监听器 + @discussion 可以设置并实现此 Delegate 监听消息焚烧 + @warning 如果您使用 IMKit,请不要使用此监听器,否则会导致 IMKit 中无法自动更新 UI! + + @remarks 功能设置 + + * \~english + Set burn-after-reading listener of IMLibCore. + + @param delegate Burn-after-reading listener + @ discussion you can set and implement this Delegate to listen to message burning. + @ warning Please do not use this listener if you use IMKit, otherwise UI cannot be automatically updated in IMKit! + + @ remarks function setting + */ +- (void)setRCMessageDestructDelegate:(id)delegate; + +#pragma mark - currentUserInfo + +/*! + * \~chinese + 当前登录用户的用户信息 + + @discussion 用于与融云服务器建立连接之后,设置当前用户的用户信息。 + + @warning 如果传入的用户信息中的用户 ID 与当前登录的用户 ID 不匹配,则将会忽略。 + 如果您使用 IMLibCore,请使用此字段设置当前登录用户的用户信息; + 如果您使用 IMKit,请使用 RCIM 中的 currentUserInfo 设置当前登录用户的用户信息,而不要使用此字段。 + + @remarks 数据获取 + + * \~english + User information of the currently logged in user. + + @ discussion is used to set the user information of the current user after a connection is established with the RongCloud server. + + @ warning It will be ignored if the user ID in the passed user information does not match the current login user ID. + If you use IMLibCore, this field is used to set the user information for the currently logged in user. + If you use IMKit, use currentUserInfo in RCIM to set the user information for the current login user instead of using this field. + + @ remarks data acquisition + */ +@property (nonatomic, strong) RCUserInfo *currentUserInfo; + +#pragma mark - Message Receive & Send + +/*! + * \~chinese + 注册自定义的消息类型 + + @param messageClass 自定义消息的类,该自定义消息需要继承于 RCMessageContent + + @discussion + 如果您需要自定义消息,必须调用此方法注册该自定义消息的消息类型,否则 SDK 将无法识别和解析该类型消息。 + @discussion 请在初始化 appkey 之后,token 连接之前调用该方法注册自定义消息 + + @warning 如果您使用 IMLibCore,请使用此方法注册自定义的消息类型; + 如果您使用 IMKit,请使用 RCIM 中的同名方法注册自定义的消息类型,而不要使用此方法。 + + @remarks 消息操作 + + * \~english + Register a custom message type + + @param messageClass Class of a custom message that needs to be inherited from RCMessageContent + + @ discussion + If you need a custom message, you must call this method to register the type of the custom message, otherwise SDK will not be able to recognize and parse that type of message. + @ discussion Please call this method to register custom messages after appkey initialization and before token connection. + + @ warning If you use IMLibCore, please use this method to register custom message types; + If you use IMKit, please use the method of the same name in RCIM to register the custom message type instead of using this method. + + @ remarks message operation + */ +- (void)registerMessageType:(Class)messageClass; + +#pragma mark Message Send + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId:消息的ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent ,用于显示;二是 pushData ,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil ,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for failed message sending [nErrorCode: Error code for sending failure. + MessageId: message ID] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom message, you shall set pushContent and pushData to define the push content yourself, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it by using this method. + + If you use this method to send a file message, you should upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it by using this method. + + @ warning If you use IMLibCore, you can use this method to send messages; + If you use IMKit, please use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [messageId: 消息的 ID] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, + messageId: 消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message. + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation that sends the message + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param option Related configuration of messages. + @param successBlock Callback for successful message sending [messageId: ID of message] + @param errorBlock Callback for message sending failure [nErrorCode: Error code for sending failure, + messageId: ID of the message] + @ return message entity sent + + @ discussion A remote push will be received when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it using this method. + + If you use this method to send a file message, you shall upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it using this method. + + @ warning you can use this method to send messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送媒体消息(图片消息或文件消息) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的 ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您需要上传图片到自己的服务器,需要构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送媒体消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送媒体消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send media messages (image messages or file messages) + + @param conversationType Type of conversation in which the message is sent + @param targetId ID of conversation in which the message is sent + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID] + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock callback for failed message sending [errorCode: error code for sending failure. messageId: message ID] + @param cancelBlock Callback for the user canceling message sending [messageId: message ID] + @ return message entity sent . + + @ discussion A remote push can be received when the receiver is offline and allows remote push. + The remote push consists of two parts, one is pushContent for display and the other is pushData for carrying data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format will be used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you need to upload images to your own server, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful uploading, and then use the RCCoreClient's + sendMessage:targetId:content:pushContent:pushData:success:error: method or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload files to your own server, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method. + or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ warning If you use IMLibCore, you can use this method to send meida messages; + If you use IMKit, please use the method of the same name in RCIM to send a media message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 发送媒体消息(上传图片或文件等媒体信息到指定的服务器) + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param uploadPrepareBlock 媒体文件上传进度更新的 IMKit 监听 + [uploadListener:当前的发送进度监听,SDK 通过此监听更新 IMKit UI] + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 + <= progress <= 100, messageId:消息的ID] + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + @param cancelBlock 用户取消了消息发送的回调 [messageId:消息的 ID] + @return 发送的消息实体 + + @discussion 此方法仅用于 IMKit。 + 如果您需要上传图片到自己的服务器并使用 IMLibCore,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器并使用 IMLibCore,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @remarks 消息操作 + + * \~english + Send media messages (upload media information such as images or files to the specified server) + + @param conversationType Type of conversation in which the message is sent. + @param targetId ID of conversation in which the message is sent + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param uploadPrepareBlock IMKit listening of media file uploading progress updates. + [uploadListener: current sending progress listening, which is used by SDK to update IMKit UI] + @param progressBlock Callback for message sending progress update [progress: current sending progress, 0< = progress < = 100, messageId: message ID]. + @param successBlock Callback for successful message sending [ messageId: message ID]. + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure + messageId: message ID]. + @param cancelBlock Callback for the user canceling message sending [messageId: message ID]. + @ return message entity sent. + + @ discussion This method is for IMKit only. + If you need to upload pictures to your own server and use IMLibCore, you should build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + If you need to upload a file to your own server and use IMLibCore, you should build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method, or the sendMessage:targetId:content:pushContent:success:error: method for sending, and do not use this method. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + uploadPrepare:(void (^)(RCUploadMediaStatusListener *uploadListener))uploadPrepareBlock + progress:(void (^)(int progress, long messageId))progressBlock + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorCode, long messageId))errorBlock + cancel:(void (^)(long messageId))cancelBlock; + +/*! + * \~chinese + 发送消息 + + @param message 将要发送的消息实体(需要保证 message 中的 conversationType,targetId,messageContent 是有效值) + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [successMessage: 消息实体] + @param errorBlock 消息发送失败的回调 [nErrorCode: 发送失败的错误码, errorMessage:消息实体] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent ,用于显示;二是 pushData ,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil ,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您使用此方法发送图片消息,需要您自己实现图片的上传,构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + 如果您使用此方法发送文件消息,需要您自己实现文件的上传,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用此方法发送。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send a message. + + @param message The message entity to be sent (you shall ensure that the conversationType, targetId and messageContent in message are valid values) + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [successMessage: Message entity]. + @param errorBlock Callback for failed message sending [nErrorCode: Error code for send failure, errorMessage: message entity]. + @ return sent message entity. + + @ discussion Receive a remote push when the receiver is offline and allows remote push. + Remote push consists of two parts, one is pushContent, which is used for display, and the other is pushData, which is used to carry data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format is used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you use this method to send an image message, you shall upload the image yourself, build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of a successful upload, and then send it using this method. + + If you use this method to send a file message, you shall upload the file yourself, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of a successful upload, and then send it using this method. + + @ warning you can use this method to send messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send a message, otherwise the UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +/*! + * \~chinese + 发送媒体消息(图片消息或文件消息) + + @param message 将要发送的消息实体(需要保证 message 中的 conversationType,targetId,messageContent 是有效值) + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param progressBlock 消息发送进度更新的回调 [progress:当前的发送进度, 0 <= progress <= 100, progressMessage:消息实体] + @param successBlock 消息发送成功的回调 [successMessage:消息实体] + @param errorBlock 消息发送失败的回调 [nErrorCode:发送失败的错误码, errorMessage:消息实体] + @param cancelBlock 用户取消了消息发送的回调 [cancelMessage:消息实体] + @return 发送的消息实体 + + @discussion 当接收方离线并允许远程推送时,会收到远程推送。 + 远程推送中包含两部分内容,一是 pushContent,用于显示;二是 pushData,用于携带不显示的数据。 + + SDK 内置的消息类型,如果您将 pushContent 和 pushData 置为 nil,会使用默认的推送格式进行远程推送。 + 自定义类型的消息,需要您自己设置 pushContent 和 pushData 来定义推送内容,否则将不会进行远程推送。 + + 如果您需要上传图片到自己的服务器,需要构建一个 RCImageMessage 对象, + 并将 RCImageMessage 中的 imageUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + 如果您需要上传文件到自己的服务器,构建一个 RCFileMessage 对象, + 并将 RCFileMessage 中的 fileUrl 字段设置为上传成功的 URL 地址,然后使用 RCCoreClient 的 + sendMessage:targetId:content:pushContent:pushData:success:error:方法 + 或 sendMessage:targetId:content:pushContent:success:error:方法进行发送,不要使用此方法。 + + @warning 如果您使用 IMLibCore,可以使用此方法发送媒体消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送媒体消息,否则不会自动更新 UI。 + + @remarks 消息操作 + + * \~english + Send media messages (images messages or file messages) + + @param message Message entity to be sent (you shall ensure that the conversationType, targetId and messageContent in message are valid values) + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline + @param progressBlock Callback for message sending progress update [current sending progress of progress:, 0 < = progress < = 100, progressMessage: message entity] + @param successBlock Callback for successful message sending [successMessage: message entity] + @param errorBlock Callback for failed message sending [nErrorCode: error code for sending failure, errorMessage: message entity] + @param cancelBlock User canceled callback for message sending [cancelMessage: message entity]. + @ return message entity sent + + @ discussion A remote push can be received when the receiver is offline and allows remote push. + The remote push consists of two parts, one is pushContent for display and the other is pushData for carrying data that is not displayed. + + Type of SDK built-in message. If you set pushContent and pushData to nil, the default push format will be used for remote push. + For a custom type of message, you shall set pushContent and pushData to define the push content, otherwise remote push will not be carried out. + + If you shall upload images to your own server, you shall build a RCImageMessage object, set the imageUrl field in RCImageMessage to the URL address of the successful uploading, and then use the RCCoreClient's + SendMessage:targetId:content:pushContent:pushData:success:error: method or the sendMessage:targetId:content:pushContent:success:error: method, and do not use this method. + + If you shall upload files to your own server, build a RCFileMessage object, set the fileUrl field in RCFileMessage to the URL address of the successful upload, and then use the RCCoreClient's sendMessage:targetId:content:pushContent:pushData:success:error: method. + Or the sendMessage:targetId:content:pushContent:success:error: method, and do not use this method. + + @ warning you can use this method to send media messages if you use IMLibCore, + If you use IMKit, use the method of the same name in RCIM to send media messages, otherwise UI will not be updated automatically. + + @ remarks message operation + */ +- (RCMessage *)sendMediaMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progress:(void (^)(int progress, RCMessage *progressMessage))progressBlock + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock + cancel:(void (^)(RCMessage *cancelMessage))cancelBlock; + + + +/*! + * \~chinese + 取消发送中的媒体信息 + + @param messageId 媒体消息的 messageId + + @return YES 表示取消成功,NO 表示取消失败,即已经发送成功或者消息不存在。 + + @remarks 消息操作 + + * \~english + Cancel media messages in transmission + + MessageId of media messages. + + @ return YES: canceled successfully, NO: failed to cancel, that is, the message has been sent successfully or the message does not exist. + + @ remarks message operation + */ +- (BOOL)cancelSendMediaMessage:(long)messageId; + +/*! + * \~chinese + 插入向外发送的消息(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param sentStatus 发送状态 + @param content 消息的内容 + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + + * \~english + Insert an outgoing message (the message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID + @param sentStatus Sending status. + @param content Content of the message. + @ return message entity inserted . + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertOutgoingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content; + +/*! + * \~chinese + 插入向外发送的、指定时间的消息(此方法如果 sentTime 有问题会影响消息排序,慎用!!) +(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param sentStatus 发送状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒(传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。如果 sentTime<=0,则被忽略,会以插入时的时间为准。 + + @remarks 消息操作 + + * \~english + Insert a message sent outward at a specified time (this method will affect message sorting if there is a problem with sentTime and shall be used with caution!!) + (The message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID. + @param sentStatus Sending status. + @param content Content of the message. + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. If sentTime < = 0, it will be ignored and the time at which it is inserted shall prevail. + + @ remarks message operation + */ +- (RCMessage *)insertOutgoingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + +/*! + * \~chinese + 插入接收的消息(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param senderUserId 发送者 ID + @param receivedStatus 接收状态 + @param content 消息的内容 + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + + * \~english + Insert the received message (the message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID + @param senderUserId Sender ID + @param receivedStatus Receiving status + @param content Content of the message + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertIncomingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + senderUserId:(NSString *)senderUserId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content; + + +/*! + * \~chinese + 插入接收的消息(此方法如果 sentTime + 有问题会影响消息排序,慎用!!)(该消息只插入本地数据库,实际不会发送给服务器和对方) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param senderUserId 发送者 ID + @param receivedStatus 接收状态 + @param content 消息的内容 + @param sentTime 消息发送的 Unix 时间戳,单位为毫秒 (传 0 会按照本地时间插入) + @return 插入的消息实体 + + @discussion 此方法不支持聊天室的会话类型。 + + @remarks 消息操作 + + * \~english + Insert the received message (this method will affect message sorting if there is a problem with sentTime and shall be used with caution!!) (The message is only inserted into the local database and is not actually sent to the server and the other party). + + @param conversationType Conversation type + @param targetId Conversation ID. + @param senderUserId Sender ID. + @param receivedStatus Receiving status + @param content Content of the message. + @param sentTime Unix timestamp of the message sent, in milliseconds (0 will be inserted according to local time). + @ return message entity inserted. + + @ discussion This method does not support the chatroom conversation type. + + @ remarks message operation + */ +- (RCMessage *)insertIncomingMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + senderUserId:(NSString *)senderUserId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime; + + +/*! + * \~chinese + 批量插入接收的消息(该消息只插入本地数据库,实际不会发送给服务器和对方) + RCMessage 下列属性会被入库,其余属性会被抛弃 + conversationType 会话类型 + targetId 会话 ID + messageDirection 消息方向 + senderUserId 发送者 ID + receivedStatus 接收状态;消息方向为接收方,并且 receivedStatus 为 ReceivedStatus_UNREAD 时,该条消息未读 + sentStatus 发送状态 + content 消息的内容 + sentTime 消息发送的 Unix 时间戳,单位为毫秒 ,会影响消息排序 + extra RCMessage 的额外字段 + + @discussion 此方法不支持聊天室的会话类型。每批最多处理 500 条消息,超过 500 条返回 NO + @discussion 消息的未读会累加到回话的未读数上 + + @remarks 消息操作 + + * \~english + Insert received messages (the messages are only inserted into the local database and will not actually be sent to the server and the other party) in batches + RCMessage The following properties will be stored into the database, and the residual properties will be discarded + conversationType Conversation type + targetId Conversation ID + messageDirection Message direction + senderUserId Sender ID + receivedStatus receiving status; When the message is directed to the receiver and receivedStatus is ReceivedStatus_UNREAD, the message is not read + sentStatus Sending status + content Content of message. + sentTime Unix timestamp for sending a message with the unit as milliseconds, which will affect message sorting + extra Additional fields for RCMessage + + @ discussion This method does not support the chatroom conversation type. A maximum of 500 messages are processed for each batch, and NO is returned for more than 500 messages. + @ discussion The unread messages will accumulate to the number of unread replies. + @ remarks message operation + */ +- (BOOL)batchInsertMessage:(NSArray *)msgs; + +/*! + * \~chinese + 根据文件 URL 地址下载文件内容 + + @param fileName 指定的文件名称 需要开发者指定文件后缀 (例如 rongCloud.mov) + @param mediaUrl 文件的 URL 地址 + @param progressBlock 文件下载进度更新的回调 [progress:当前的下载进度, 0 <= progress <= 100] + @param successBlock 下载成功的回调[mediaPath:下载成功后本地存放的文件路径 文件路径为文件消息的默认地址] + @param errorBlock 下载失败的回调[errorCode:下载失败的错误码] + @param cancelBlock 用户取消了下载的回调 + + @discussion 用来获取媒体原文件时调用。如果本地缓存中包含此文件,则从本地缓存中直接获取,否则将从服务器端下载。 + + @remarks 多媒体下载 + + * \~english + Download the contents of the file according to the URL address of the file. + + @param fileName The specified file name requires the developer to specify a file suffix (for example, rongCloud.mov) + @param mediaUrl URL address of the file. + @param progressBlock Callback for file download progress update [progress: current download progress, 0 < = progress < = 100] + @param successBlock Callback after a successful download [mediaPath: the file path stored locally after a successful download is the default address of the file message] + @param errorBlock Callback for download failure [errorCode: error code for download failure] + @param cancelBlock Callback for download canceled by user. + + @ discussion Call when get the media source file. If this file is included in the local cache, it is obtained directly from the local cache, otherwise it will be downloaded from the server side. + + @ remarks multimedia downloading +*/ +- (void)downloadMediaFile:(NSString *)fileName + mediaUrl:(NSString *)mediaUrl + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 下载消息内容中的媒体信息 + + @param conversationType 消息的会话类型 + @param targetId 消息的会话 ID + @param mediaType 消息内容中的多媒体文件类型,目前仅支持图片 + @param mediaUrl 多媒体文件的网络 URL + @param progressBlock 消息下载进度更新的回调 [progress:当前的下载进度, 0 + <= progress <= 100] + @param successBlock 下载成功的回调 + [mediaPath:下载成功后本地存放的文件路径] + @param errorBlock 下载失败的回调[errorCode:下载失败的错误码] + @param cancelBlock 用户取消了下载的回调 + + @discussion 用来获取媒体原文件时调用。如果本地缓存中包含此文件,则从本地缓存中直接获取,否则将从服务器端下载。 + @remarks 多媒体下载 + + * \~english + Download the media information in the message content. + + @param conversationType Conversation type of the message. + @param targetId Conversation ID of the message. + @param mediaType Type of the multimedia file in the message content. Currently, only images are supported. + @param mediaUrl Network URL of multimedia file. + @param progressBlock callback for message download progress update [progress: current download progress:, 0< = progress < = 100] + @param successBlock Callback for successful download + [mediaPath: path of files stored locally after successful download]. + @param errorBlock Callback for download failure [errorCode: error code for download failure] + @param cancelBlock Callback for download canceled by user + + @ discussion Call when get the media source file. If this file is included in the local cache, it is obtained directly from the local cache, otherwise it will be downloaded from the server side. + @ remarks multimedia downloading + */ +- (void)downloadMediaFile:(RCConversationType)conversationType + targetId:(NSString *)targetId + mediaType:(RCMediaType)mediaType + mediaUrl:(NSString *)mediaUrl + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 下载消息内容中的媒体信息 + + @param messageId 媒体消息的 messageId + @param progressBlock 消息下载进度更新的回调 [progress:当前的下载进度, 0 <= progress <= 100] + @param successBlock 下载成功的回调[mediaPath:下载成功后本地存放的文件路径] + @param errorBlock 下载失败的回调[errorCode:下载失败的错误码] + @param cancelBlock 用户取消了下载的回调 + + @discussion 用来获取媒体原文件时调用。如果本地缓存中包含此文件,则从本地缓存中直接获取,否则将从服务器端下载。 + + @remarks 多媒体下载 + + * \~english + Download the media information in the message content. + + @param messageId MessageId of media messages + @param progressBlock callback for message download progress update [progress: current download progress, 0 < = progress < = 100] + @param successBlock Callback for successful download [mediaPath: path of files stored locally after successful download]. + @param errorBlock callback for download failure [errorCode: error code for download failure ] + @param cancelBlock Callback for download canceled by user. + + @ discussion Call when get the media source file. If this file is included in the local cache, it is obtained directly from the local cache, otherwise it will be downloaded from the server side. + + @ remarks multimedia downloading + */ +- (void)downloadMediaMessage:(long)messageId + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 取消下载中的媒体信息 + + @param messageId 媒体消息的messageId + + @return YES 表示取消成功,NO表示取消失败,即已经下载完成或者消息不存在。 + + @remarks 多媒体下载 + + * \~english + Cancel the media information in downloading + + @param messageId MessageId of media messages + + @ return YES: canceled successfully, NO: failed to cancel, that is, the message has been sent successfully or the message does not exist. + + @ remarks multimedia downloading + */ +- (BOOL)cancelDownloadMediaMessage:(long)messageId; + +/*! + * \~chinese + 取消下载中的媒体信息 + + @param mediaUrl 媒体消息 Url + + @return YES 表示取消成功,NO 表示取消失败,即已经下载完成或者消息不存在。 + + @remarks 多媒体下载 + + * \~english + Cancel the media information in downloading + + @param mediaUrl Url of media message + + @ return YES: canceled successfully, NO: failed to cancel, that is, the message has been downloaded successfully or the message does not exist. + + @ remarks multimedia downloading +*/ +- (BOOL)cancelDownloadMediaUrl:(NSString *)mediaUrl; + +/*! + * \~chinese + 发送定向消息 + + @param conversationType 发送消息的会话类型 + @param targetId 发送消息的会话 ID + @param userIdList 接收消息的用户 ID 列表 + @param content 消息的内容 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [messageId:消息的 ID] + @param errorBlock 消息发送失败的回调 [errorCode:发送失败的错误码, + messageId:消息的 ID] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + 如果您使用 IMLibCore,可以使用此方法发送定向消息; + 如果您使用 IMKit,请使用 RCIM 中的同名方法发送定向消息,否则不会自动更新 UI。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param conversationType Type of conversation in which the message is sent + @param targetId Conversation ID that sends the message + @param userIdList List of user ID receiving messages + @param content Content of the message + @param pushContent Remote push content that needs to be displayed when the receiver is offline + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [messageId: message ID] + @param errorBlock Callback for failed message sending [errorCode: error code for sending failure, + messageId: message ID] + + @ return Message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + If you use IMLibCore, you can use this method to send directed messages. + If you use IMKit, please use the method of the same name in RCIM to send a directed message, otherwise the UI will not be updated automatically. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + toUserIdList:(NSArray *)userIdList + content:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock; + +/*! + * \~chinese + 发送定向消息 + + @param message 消息实体 + @param userIdList 接收消息的用户 ID 列表 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param successBlock 消息发送成功的回调 [successMessage:发送成功的消息] + @param errorBlock 消息发送失败的回调 [nErrorCode:发送失败的错误码,errorMessage:发送失败的消息] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages. + + @param message Message entity + @param userIdList List of user ID receiving messages. + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param successBlock Callback for successful message sending [successMessage: message sent successfully]. + @param errorBlock callback for failed message sending [nErrorCode: error code for sending failure, errorMessage: message failed in sending] + + @ return message entity sent + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCMessage *)message + toUserIdList:(NSArray *)userIdList + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +/*! + * \~chinese + 发送定向消息 + + @param message 消息实体 + @param userIdList 接收消息的用户 ID 列表 + @param pushContent 接收方离线时需要显示的远程推送内容 + @param pushData 接收方离线时需要在远程推送中携带的非显示数据 + @param option 消息的相关配置 + @param successBlock 消息发送成功的回调 [successMessage:发送成功的消息] + @param errorBlock 消息发送失败的回调 [nErrorCode:发送失败的错误码,errorMessage:发送失败的消息] + + @return 发送的消息实体 + + @discussion 此方法用于在群组和讨论组中发送消息给其中的部分用户,其它用户不会收到这条消息。 + + @warning 此方法目前仅支持群组和讨论组。 + + @remarks 消息操作 + + * \~english + Send directed messages + + @param message Message entity + @param userIdList List of user ID receiving messages + @param pushContent Remote push content that needs to be displayed when the receiver is offline. + @param pushData Non-display data that the receiver needs to carry in the remote push when the receiver is offline. + @param option Related configuration of messages. + @param successBlock Callback for successful message sending [successMessage: message sent successfully] + @param errorBlock callback for failed message sending [nErrorCode: error code for sending failure, errorMessage: message failed in sending]. + + @ return message entity sent. + + @ discussion This method is used to send messages to some of the users in groups and discussion groups, and other users will not receive this message. + + + @ warning This method currently only supports groups and discussion groups. + + @ remarks message operation + */ +- (RCMessage *)sendDirectionalMessage:(RCMessage *)message + toUserIdList:(NSArray *)userIdList + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + option:(RCSendMessageOption *)option + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +#pragma mark RCIMClientReceiveMessageDelegate +/*! + * \~chinese + 设置 IMLibCore 的消息接收监听器 + + @param delegate IMLibCore 消息接收监听器 + @param userData 用户自定义的监听器 Key 值,可以为 nil + + @discussion + 设置 IMLibCore 的消息接收监听器请参考 RCCoreClient 的 setReceiveMessageDelegate:object:方法。 + + userData 为您自定义的任意数据,SDK 会在回调的 onReceived:left:object:方法中传入作为 object 参数。 + 您如果有设置多个监听,会只有最终的一个监听器起作用,您可以通过该 userData 值区分您设置的监听器。如果不需要直接设置为 + nil 就可以。 + + @warning 如果您使用 IMLibCore,可以设置并实现此 Delegate 监听消息接收; + 如果您使用 IMKit,请使用 RCIM 中的 receiveMessageDelegate 监听消息接收,而不要使用此方法,否则会导致 IMKit + 中无法自动更新 UI! + + @remarks 功能设置 + + * \~english + Set the message receiving listener for IMLibCore + + @param delegate IMLibCore message receiving listener + @param userData Key value of user-defined listener, which can be nil + + @ discussion + For how to set the message receiving listener for IMLibCore, please refer to the setReceiveMessageDelegate:object: method of RCCoreClient. + + UserData is any data you customized, and SDK will be passed as an object parameter in the onReceived:left:object: method of the callback. + If you set multiple listeners, only the final listener will work. You can distinguish the listeners you set by this userData value. If it is not required, it is directly set as Nil. + + @ warning If you use IMLibCore, you can set and enable this Delegate to listen to message receiving; + If you use IMKit, please use receiveMessageDelegate in RCIM to listen to message receiving instead of using this method, otherwise it will cause that the UI cannot be automatically updated in IMKit! + + @ remarks function setting + */ +- (void)setReceiveMessageDelegate:(id)delegate object:(id)userData; + +#pragma mark - RCMessageInterceptor +/*! + * \~chinese + 设置消息拦截器 + + @discussion 可以设置并实现此拦截器来进行消息的拦截处理 + + @remarks 功能设置 + + * \~english + Set message interceptor + + @ discussion it can set and enable this interceptor to intercept messages + + @ remarks function setting + */ +@property (nonatomic, weak) id messageInterceptor; + +#pragma mark - Message Read Receipt + +/*! + * \~chinese + 发送某个会话中消息阅读的回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param timestamp 该会话中已阅读的最后一条消息的发送时间戳 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 此接口只支持单聊, 如果使用 IMLibCore 可以注册监听 + RCLibDispatchReadReceiptNotification 通知,使用 IMKit 直接设置RCIM.h + 中的 enabledReadReceiptConversationTypeList。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send a message reading receipt in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param timestamp The sending timestamp of the last message read by the conversation. + @param successBlock Callback for successful sending + @param errorBlock Callback for sending failure [nErrorCode: error code for failure] + + @ discussion This interface only supports single chat. If you use IMLibCore, you can register to listen to + RCLibDispatchReadReceiptNotification notification, and use IMKit to set directly + enabledReadReceiptConversationTypeList in RCIM.h. + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendReadReceiptMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 请求消息阅读回执 + + @param message 要求阅读回执的消息 + @param successBlock 请求成功的回调 + @param errorBlock 请求失败的回调[nErrorCode: 失败的错误码] + + @discussion 通过此接口,可以要求阅读了这条消息的用户发送阅读回执。 + + @remarks 高级功能 + + * \~english + Request message reading receipt + + @param message Request to read the message of the receipt + @param successBlock Callback for successful request + @param errorBlock Callback for failed request [nErrorCode: Error code for failure] + + @ discussion With this interface, the user who has read this message can be asked to send a reading receipt. + + @ remarks advanced functions + */ +- (void)sendReadReceiptRequest:(RCMessage *)message + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 发送阅读回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param messageList 已经阅读了的消息列表 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 当用户阅读了需要阅读回执的消息,可以通过此接口发送阅读回执,消息的发送方即可直接知道那些人已经阅读。 + + @remarks 高级功能 + + * \~english + Send a reading receipt + + @param conversationType Conversation type + @param targetId Conversation ID + @param messageList List of messages that have been read + @param successBlock Callback for successful sending + @param errorBlock Callback for failed sending [nErrorCode: Error code of failure] + + @ discussion When a user reads a message that needs to be read, a reading receipt cane be sent through this interface, and the sender of the message can directly know who has read the message. + + @ remarks advanced functions + */ +- (void)sendReadReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + messageList:(NSArray *)messageList + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 同步会话阅读状态(把指定会话里所有发送时间早于 timestamp 的消息置为已读) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param timestamp 已经阅读的最后一条消息的 Unix 时间戳(毫秒) + @param successBlock 同步成功的回调 + @param errorBlock 同步失败的回调[nErrorCode: 失败的错误码] + + @remarks 高级功能 + + * \~english + Synchronize conversation reading status (set all messages sent before timestamp in a specified conversation to be read) + + @param conversationType Conversation type + @param targetId Conversation ID + @param timestamp Unix timestamp of the last message read (in milliseconds) + @param successBlock Callback for successful synchronization + @param errorBlock Callback for failed synchronization [nErrorCode: Error code for failure]. + + @ remarks advanced functions + */ +- (void)syncConversationReadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + time:(long long)timestamp + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +#pragma mark - Message Recall + +/*! + * \~chinese + 撤回消息 + + @param message 需要撤回的消息 + @param pushContent 当下发 push 消息时,在通知栏里会显示这个字段,不设置将使用融云默认推送内容 + @param successBlock 撤回成功的回调 [messageId:撤回的消息 ID,该消息已经变更为新的消息] + @param errorBlock 撤回失败的回调 [errorCode:撤回失败错误码] + + @warning 仅支持单聊、群组和讨论组。 + + @remarks 高级功能 + + * \~english + Recall the message + + @param message Messages to be recalled + @param pushContent When a push message is distributed, this field will be displayed in the notification bar. If it is not set, the default content will be pushed by RongCloud. + @param successBlock Callback for successful recall [messageId: ID of message recalled, the message has been changed to a new message]. + @param errorBlock Callback for failed recall [errorCode: error code for recall failure] + + @ warning Only single chat, groups and discussion groups are supported. + + @ remarks advanced functions + */ +- (void)recallMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorcode))errorBlock; + +/*! + * \~chinese + 撤回消息 + + @param message 需要撤回的消息 + @param successBlock 撤回成功的回调 [messageId:撤回的消息 ID,该消息已经变更为新的消息] + @param errorBlock 撤回失败的回调 [errorCode:撤回失败错误码] + @remarks 高级功能 + + * \~english + Recall the message + + @param message Messages to be recalled + @param successBlock Callback for successful recall [messageId: ID of message recalled, the message has been changed to a new message] + @param errorBlock Callback for failed ecall [errorCode: error code for recall failure] + @ remarks advanced function + */ +- (void)recallMessage:(RCMessage *)message + success:(void (^)(long messageId))successBlock + error:(void (^)(RCErrorCode errorcode))errorBlock; + +#pragma mark - Message Operation + +/*! + * \~chinese + 获取某个会话中指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get the specified number of latest message entities in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param count Number of messages to be obtained + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getLatestMessages:(RCConversationType)conversationType targetId:(NSString *)targetId count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + 如: + oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param oldestMessageId ID of due message. + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + E.g. + If the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,从指定消息之前、指定数量的、指定消息类型的最新消息实体 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param oldestMessageId 截止的消息 ID + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,oldestMessageId 之前的、指定数量和消息类型的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 oldestMessageId 对应的那条消息,如果会话中的消息数量小于参数 count + 的值,会将该会话中的所有消息返回。 + 如:oldestMessageId 为 10,count 为 2,会返回 messageId 为 9 和 8 的 RCMessage 对象列表。 + + @remarks 消息操作 + + * \~english + Get the latest message entity of the specified number and specified message types before the specified message in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil + @param oldestMessageId ID of due message + @param count Number of messages to be obtained. + @ return RCMessage object list of message entity + + @ discussion + This method gets the specified number of latest message entities in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + For example, if the oldestMessageId is 10 and the count is 2, a list of Message objects with messageId as 9 and 8 will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + objectName:(NSString *)objectName + oldestMessageId:(long)oldestMessageId + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定消息、指定数量、指定消息类型、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param objectName 消息内容的类型名,如果想取全部类型的消息请传 nil + @param baseMessageId 当前的消息 ID + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,baseMessageId + 之前或之后的、指定数量、消息类型和查询方向的最新消息实体,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 baseMessageId 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with specified messages, specified number and specified message type in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param objectName Type name of the message content. If you want to get all types of messages, please pass nil. + @param baseMessageId Current message ID. + @param isForward Query direction: true indicates forward and false indicates backward. + @param count Number of messages to be obtained + @ return object list of message entity RCMessage + + @ discussion + This method gets the latest message entities before or after baseMessageId with the specified number, message type, and query direction, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to baseMessageId. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + objectName:(NSString *)objectName + baseMessageId:(long)baseMessageId + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 获取会话中,指定时间、指定数量、指定消息类型(多个)、向前或向后查找的消息实体列表 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param objectNames 消息内容的类型名称列表 + @param sentTime 当前的消息时间戳 + @param isForward 查询方向 true 为向前,false 为向后 + @param count 需要获取的消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 此方法会获取该会话中,sentTime + 之前或之后的、指定数量、指定消息类型(多个)的消息实体列表,返回的消息实体按照时间从新到旧排列。 + 返回的消息中不包含 sentTime 对应的那条消息,如果会话中的消息数量小于参数 count 的值,会将该会话中的所有消息返回。 + + @remarks 消息操作 + + * \~english + Get a list of forward or backward searched message entities with a specified time, a specified number and a specified message type (multiple) in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param objectNames List of type names for message content + @param sentTime Current message timestamp + @param isForward Query direction: true indicates forward and false indicates backward + @param count Number of messages to be obtained. + @ return object list of message entity RCMessage + + @ discussion + This method gets a list of message entities before and after the sentTime with a specified number and a specified message type (multiple) in the conversation, and the returned message entities are in chronological order from earliest to most recent. + The returned message does not contain the message corresponding to sentTime. If the number of messages in the conversation is less than the value of the parameter count, all messages in the conversation will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + objectNames:(NSArray *)objectNames + sentTime:(long long)sentTime + isForward:(BOOL)isForward + count:(int)count; + +/*! + * \~chinese + 在会话中搜索指定消息的前 beforeCount 数量和后 afterCount + 数量的消息。返回的消息列表中会包含指定的消息。消息列表时间顺序从新到旧。 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param sentTime 消息的发送时间 + @param beforeCount 指定消息的前部分消息数量 + @param afterCount 指定消息的后部分消息数量 + @return 消息实体 RCMessage 对象列表 + + @discussion + 获取该会话的这条消息及这条消息前 beforeCount 条和后 afterCount 条消息,如前后消息不够则返回实际数量的消息。 + + @remarks 消息操作 + + * \~english + Searches the the number of beforeCount and afterCount messages for the specified message in the conversation. The list of returned messages contains the specified message. The message in the list are in chronological order from earliest to most recent. + + @param conversationType Conversation type + @param targetId Conversation ID + @param sentTime Time when the message is sent + @param beforeCount Specify the number of messages in the first part of the message. + @param afterCount Specify the number of messages in the latter part of the message. + @ return object list of message entity RCMessage + + @ discussion + Get this message, beforeCount messages ahead of this message and afterCount messages after this message in the conversation. If there are not enough messages before and after the message, the actual number of messages will be returned. + + @ remarks message operation + */ +- (NSArray *)getHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + sentTime:(long long)sentTime + beforeCount:(int)beforeCount + afterCount:(int)afterCount; + +/*! + * \~chinese + 从服务器端清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [status:清除失败的错误码] + + @discussion + 此方法从服务器端清除历史消息,但是必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 清除成功后只能获取该时间戳之后的历史消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation, 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param successBlock Callback for successful acquisition + @param errorBlock Callback for failed acquisition [status: error code for clearing failure ] + + @ discussion + This method clears historical messages from the server, bu the historical message cloud storage function must be activated first. + For example, if you don't want to get more history messages from the server, you can only get the history messages after the timestamp after the recordTime has been cleared successfully. + + @ remarks message operation + */ +- (void)clearRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + recordTime:(long long)recordTime + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 清除历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param recordTime 清除消息时间戳,【0 <= recordTime <= 当前会话最后一条消息的 sentTime,0 + 清除所有消息,其他值清除小于等于 recordTime 的消息】 + @param clearRemote 是否同时删除服务端消息 + @param successBlock 获取成功的回调 + @param errorBlock 获取失败的回调 [ status:清除失败的错误码] + + @discussion + 此方法可以清除服务器端历史消息和本地消息,如果清除服务器端消息必须先开通历史消息云存储功能。 + 例如,您不想从服务器上获取更多的历史消息,通过指定 recordTime 并设置 clearRemote 为 YES + 清除消息,成功后只能获取该时间戳之后的历史消息。如果 clearRemote 传 NO, + 只会清除本地消息。 + + @remarks 消息操作 + + * \~english + Clear historical messages. + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Clear the message timestamp, [0 < = recordTime < = the sentTime of the last message in the current conversation. 0: + Clear all messages, other values: clear messages less than or equal to recordTime]. + @param clearRemote Whether to delete server messages at the same time. + @param successBlock Callback for successful acquisition. + @param errorBlock Callback for failed acquisition [status: error code for clearing failure]. + + @ discussion + This method can clear server-side historical messages and local messages. If you clear messages on the server, you must first activate the historical message cloud storage functions. + For example, if you don't want to get more historical messages from the server, you can specify the recordTime and set clearRemote to YES to clear the messages, and then you can only get the historical message after the timestamp. If clearRemote passes NO, only local messages are cleared. + + @ remarks message operation + */ +- (void)clearHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + recordTime:(long long)recordTime + clearRemote:(BOOL)clearRemote + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param recordTime 截止的消息发送时间戳,毫秒 + @param count 需要获取的消息数量, 0 < count <= 20 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有10条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @discussion 本地数据库可以查到的消息,该接口不会再返回,所以建议先用 getHistoryMessages + 相关接口取本地历史消息,本地消息取完之后再通过该接口获取远端历史消息 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server. + + @param conversationType Conversation type + @param targetId Conversation ID + @param recordTime Due message sending timestamp, in milliseconds. + @param count Number of messages to be obtained, 0 < count < = 20. + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES indicates that there is still any remaining messages; NO indicates that there is no remaining messages] + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure] + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ discussion Messages that can be found in the local database will not be returned by this interface, so it is recommended to first take the local historical messages by using the related interfaces of the getHistoryMessages. + After the local message is taken, the remote historical messages are obtained through this interface + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + recordTime:(long long)recordTime + count:(int)count + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 从服务器端获取之前的历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param option 可配置的参数 + @param successBlock 获取成功的回调 [messages:获取到的历史消息数组, isRemaining 是否还有剩余消息 YES + 表示还有剩余,NO 表示无剩余] + @param errorBlock 获取失败的回调 [status:获取失败的错误码] + + @discussion + 此方法从服务器端获取之前的历史消息,但是必须先开通历史消息云存储功能。 + 例如,本地会话中有 10 条消息,您想拉取更多保存在服务器的消息的话,recordTime 应传入最早的消息的发送时间戳,count 传入 + 1~20 之间的数值。 + + @remarks 消息操作 + + * \~english + Get previous historical messages from the server + + @param conversationType Conversation type + @param targetId Conversation ID + @param option Configurable parameters + @param successBlock Callback for successful acquisition [messages: array of obtained historical messages; isRemaining: whether there are any remaining messages; YES: + Indicates that there is still any remaining messages; NO: indicates that there is no remaining messages]. + @param errorBlock Callback for failed acquisition [status: error code for acquisition failure]. + + @ discussion + This method obtains the previous historical messages from the server, but the historical message cloud storage function must be activated first. + For example, if there are 10 messages in the local conversation, and you want to pull more messages saved on the server, recordTime should pass in the earliest message sending timestamp, and count should pass in a value between 1 and 20. + + @ remarks message operation + */ +- (void)getRemoteHistoryMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + option:(RCRemoteHistoryMsgOption *)option + success:(void (^)(NSArray *messages, BOOL isRemaining))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取历史消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param option 可配置的参数 + @param complete 获取成功的回调 [messages:获取到的历史消息数组; code : 获取是否成功,0表示成功,非 0 表示失败,此时 messages 数组可能存在断档] + + @discussion 必须开通历史消息云存储功能。 + @discussion count 传入 1~20 之间的数值。 + @discussion 此方法先从本地获取历史消息,本地有缺失的情况下会从服务端同步缺失的部分。 + @discussion 从服务端同步失败的时候会返回非 0 的 errorCode,同时把本地能取到的消息回调上去。 + + @remarks 消息操作 + + * \~english + Get historical messages + + @param conversationType Conversation type + @param targetId Conversation ID + @param option Configurable parameters + @param complete Callback for successful acquisition [messages: array of obtained historical messages; Code: succeeded or not; 0: successful; non-0: failed. In this case, there may be a message break in the messages array] + + @ discussion The historical message cloud storage function must be activated. + @ discussion The count passes a value between 1 and 20. + @ discussion This method first obtains historical messages locally, and synchronizes the missing parts from the server if it is missing locally; + @ discussion If synchronization fails on the server, a non-0 errorCode will be returned, and the messages that can be accessed locally will be called back. + + @ remarks message operation + */ +- (void)getMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + option:(RCHistoryMessageOption *)option + complete:(void (^)(NSArray *messages, RCErrorCode code))complete; + +/*! + * \~chinese + 获取会话中@提醒自己的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + + @discussion + 此方法从本地获取被@提醒的消息(最多返回 10 条信息) + @warning 使用 IMKit 注意在进入会话页面前调用,否则在进入会话清除未读数的接口 clearMessagesUnreadStatus: targetId: + 以及 设置消息接收状态接口 setMessageReceivedStatus:receivedStatus:会同步清除被提示信息状态。 + + @remarks 高级功能 + + * \~english + Get the @ reminder messages in the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID. + + @ discussion + This method gets the @ reminder messages locally (a maximum of 10 messages are returned). + @ warning When the IMKit is used, note that it is called before the conversation page is entered, otherwise the unread interface clearMessagesUnreadStatus: is cleared when the conversation is entered. targetId: + When the message receiving status interface setMessageReceivedStatus:receivedStatus: is set, it will synchronously clear the prompted information status. + + @ remarks advanced functions + */ +- (NSArray *)getUnreadMentionedMessages:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 获取消息的发送时间(Unix 时间戳、毫秒) + + @param messageId 消息 ID + @return 消息的发送时间(Unix 时间戳、毫秒) + + @remarks 消息操作 + + * \~english + Get the sending time of message(Unix timestamp, in milliseconds). + + @param messageId Message ID + @ return sending time of message (Unix timestamp, in milliseconds). + + @ remarks message operation + */ +- (long long)getMessageSendTime:(long)messageId; + +/*! + * \~chinese + 通过 messageId 获取消息实体 + + @param messageId 消息 ID(数据库索引唯一值) + @return 通过消息 ID 获取到的消息实体,当获取失败的时候,会返回 nil。 + + @remarks 消息操作 + + * \~english + Get the message entity through messageId + + @param messageId Message ID (unique value of database index) + @ return For message entity obtained through the message ID, when it fails to fetch, nil is returned. + + @ remarks message operation + */ +- (RCMessage *)getMessage:(long)messageId; + +/*! + * \~chinese + 通过全局唯一 ID 获取消息实体 + + @param messageUId 全局唯一 ID(服务器消息唯一 ID) + @return 通过全局唯一ID获取到的消息实体,当获取失败的时候,会返回 nil。 + + @remarks 消息操作 + + * \~english + Get message entities through globally unique ID. + + @param messageUId Globally unique ID (unique ID of server message) + @ return For the message entity obtained through the globally unique ID, when it fails to fetch, nil is returned. + + @ remarks message operation + */ +- (RCMessage *)getMessageByUId:(NSString *)messageUId; + +/** + * \~chinese + * 获取会话里第一条未读消息。 + * + * @param conversationType 会话类型 + * @param targetId 会话 ID + * @return 第一条未读消息的实体。 + * @remarks 消息操作 + * + * \~english + * Get the first unread message in the conversation. + * + * @param conversationType Conversation type + * @param targetId Conversation ID + * @ return Entity of the first unread message. + * @ remarks Message operation + */ +- (RCMessage *)getFirstUnreadMessage:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 删除消息 + + @param messageIds 消息 ID 的列表,元素需要为 NSNumber 类型 + @return 是否删除成功 + + @remarks 消息操作 + + * \~english + Delete message + + @param messageIds List of message ID, the element shall be the type of NSNumber + @ return Whether it is deleted successfully + + @ remarks Message operation + */ +- (BOOL)deleteMessages:(NSArray *)messageIds; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法删除数据库中该会话的消息记录,同时会整理压缩数据库,减少占用空间 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes the message record of the conversation in the database. At the same time, the compressed database is sorted to reduce the footprint. + + @ remarks Message operation + */ +- (void)deleteMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 批量删除某个会话中的指定远端消息(同时删除对应的本地消息) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 目标会话ID + @param messages 将被删除的消息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 此方法会同时删除远端和本地消息。 + 一次批量操作仅支持删除属于同一个会话的消息,请确保消息列表中的所有消息来自同一会话 + 一次最多删除 100 条消息。 + + @remarks 消息操作 + + * \~english + Delete specified remote messages in a conversation in batches (while deleting corresponding local messages) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Target conversation ID + @param messages List of messages to be deleted + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion This method deletes both remote and local messages. + One batch operation only supports to delete messages belonging to the same conversation, please make sure that all messages in the message list come from the same conversation and delete at most 100 messages at a time. + + @ remarks message operation + */ +- (void)deleteRemoteMessage:(RCConversationType)conversationType + targetId:(NSString *)targetId + messages:(NSArray *)messages + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 删除某个会话中的所有消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 是否删除成功 + + @remarks 消息操作 + + * \~english + Delete all messages in a conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @ return Whether it is deleted successfully. + + @ remarks Message operation + */ +- (BOOL)clearMessages:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 设置消息的附加信息 + + @param messageId 消息 ID + @param value 附加信息,最大 1024 字节 + @return 是否设置成功 + + @discussion 用于扩展消息的使用场景。只能用于本地使用,无法同步到远端。 + + @remarks 消息操作 + + * \~english + Set additional information for messages + + @param messageId Conversation ID + @param value Additional information, up to 1024 bytes + @ return Whether it is set successfully + + @ discussion It is used to extend the usage scenario of messages. It can only be used locally and cannot be synchronized to the remote end. + + @ remarks message operation + */ +- (BOOL)setMessageExtra:(long)messageId value:(NSString *)value; + +/*! + * \~chinese + 设置消息的接收状态 + + @param messageId 消息 ID + @param receivedStatus 消息的接收状态 + @return 是否设置成功 + + @discussion 用于 UI 展示消息为已读,已下载等状态。 + + @remarks 消息操作 + + * \~english + Set the receiving status of the message + + @param messageId Message ID + @param receivedStatus Receiving status of the message + @return Whether it is set successfully + + @ discussion It is used for UI to show statuses such as read message, downloaded and so on. + + @ remarks message operation + */ +- (BOOL)setMessageReceivedStatus:(long)messageId receivedStatus:(RCReceivedStatus)receivedStatus; + +/*! + * \~chinese + 设置消息的发送状态 + + @param messageId 消息 ID + @param sentStatus 消息的发送状态 + @return 是否设置成功 + + @discussion 用于 UI 展示消息为正在发送,对方已接收等状态。 + + @remarks 消息操作 + + * \~english + Set the sending status of the message + + @param messageId Message ID. + @param sentStatus The sending status of the message. + @ return Whether it is set successfully. + + @ discussion It is used for UI to show message status such as in sending, received by other party and so on. + + @ remarks message operation + */ +- (BOOL)setMessageSentStatus:(long)messageId sentStatus:(RCSentStatus)sentStatus; + +/** + * \~chinese + 开始焚烧消息(目前仅支持单聊) + + @param message 消息类 + @discussion 仅限接收方调用 + + @remarks 高级功能 + + * \~english + Start to burn messages (Currently only support single chat.) + + @param message Message class + @ discussion Only for receiver calls + + @ remarks Advanced functions + */ +- (void)messageBeginDestruct:(RCMessage *)message; + +/** + * \~chinese + 停止焚烧消息(目前仅支持单聊) + + @param message 消息类 + @discussion 仅限接收方调用 + + @remarks 高级功能 + + * \~english + Stop burnning messages (currently only support single chat). + + @param message Message class + @ discussion Only for receiver calls + + @ remarks Advanced functions + */ +- (void)messageStopDestruct:(RCMessage *)message; + +#pragma mark - Conversation List +/*! + * \~chinese + 获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + @discussion 当您的会话较多且没有清理机制的时候,强烈建议您使用 getConversationList: count: startTime: + 分页拉取会话列表,否则有可能造成内存过大。 + + @remarks 会话列表 + + * \~english + Get conversation list + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray) + @ return List of conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + @ discussion When you have a large number of conversations and do not have a cleaning mechanism, it is strongly recommended that you use getConversationList: count: startTime: + Pull the list of the conversation page by page, otherwise the memory may be too large. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList; + +/*! + * \~chinese + 分页获取会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @param count 获取的数量(当实际取回的会话数量小于 count 值时,表明已取完数据) + @param startTime 会话的时间戳(获取这个时间戳之前的会话列表,0表示从最新开始获取) + @return 会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取会话列表。 + 返回的会话列表按照时间从前往后排列,如果有置顶的会话,则置顶的会话会排列在前面。 + + @remarks 会话列表 + + * \~english + Get a list of conversations page by page + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @param count Number of conversations obtained (when the actual number of conversations retrieved is less than the count value, the data has been fetched). + @param startTime Timestamp of the conversation (get the list of conversation before this timestamp, 0 indicates obtaining from the latest one). + @ return List of the conversation RCConversation + + @ discussion This method reads the conversation list from the local database. + The list of returned conversations is in chronological order from earliest to most recent. If a conversation is set top, the top conversation is listed first. + + @ remarks Conversation list + */ +- (NSArray *)getConversationList:(NSArray *)conversationTypeList count:(int)count startTime:(long long)startTime; + +/*! + * \~chinese + 获取单个会话数据 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 会话的对象 + + @remarks 会话 + + * \~english + Get single conversation data + + @param conversationType Conversation type + @param targetId Conversation ID + @ return Conversation object + + @ remarks Conversation + */ +- (RCConversation *)getConversation:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 获取会话中的消息数量 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 会话中的消息数量 + + @discussion -1 表示获取消息数量出错。 + + @remarks 会话 + + * \~english + Get the number of messages in the conversation + + @param conversationType Conversation type + @param targetId Conversation ID. + @ return Number of messages in conversation. + + @ discussion - 1 indicates an error in obtaining the number of messages. + + @ remarks Conversation + */ +- (int)getMessageCount:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 删除指定类型的会话 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 是否删除成功 + + @discussion 此方法会从本地存储中删除该会话,同时删除会话中的消息。 + + @remarks 会话 + + * \~english + Delete a conversation of the specified type. + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @ return Whether it is deleted successfully. + + @ discussion This method deletes the conversation from the local storage and deletes the message in the conversation. + + @ remarks Conversation + */ +- (BOOL)clearConversations:(NSArray *)conversationTypeList; + +/*! + * \~chinese + 从本地存储中删除会话 + + @param conversationType 会话类型 + @param targetId 会话 ID + @return 是否删除成功 + + @discussion + 此方法会从本地存储中删除该会话,但是不会删除会话中的消息。如果此会话中有新的消息,该会话将重新在会话列表中显示,并显示最近的历史消息。 + + @remarks 会话 + + * \~english + Delete a conversation from the local storage + + @param conversationType Conversation type + @param targetId Conversation ID + @ return Whether it is deleted successfully. + + @ discussion + This method deletes the conversation from the local storage, but does not delete the message in the conversation. If there is a new message in this conversation, the conversation will reappear in the conversation list and the most recent historical message will be displayed. + + @ remarks Conversation + */ +- (BOOL)removeConversation:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 设置会话的置顶状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param isTop 是否置顶 + @return 设置是否成功 + + @discussion 会话不存在时设置置顶,会在会话列表生成会话。 + + @remarks 会话 + + * \~english + Set the top status of the conversation. + + @param conversationType Conversation type + @param targetId Conversation ID + @param isTop Whether or not set top + @ return Whether it is set successfully + + @ discussion If the conversation is set top when the conversation does not exist, the conversation will be generated in the conversation list + @ discussion After the conversation is set top, the conversation will be deleted, and the top setting will automatically expire + + @ remarks Conversation + */ +- (BOOL)setConversationToTop:(RCConversationType)conversationType targetId:(NSString *)targetId isTop:(BOOL)isTop; + +/*! + * \~chinese + 获取置顶的会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 置顶的会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取置顶的会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of top conversations + + @param conversationTypeList An array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @ return List of top conversation RCConversation. + + @ discussion This method reads the top conversation list from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getTopConversationList:(NSArray *)conversationTypeList; + +- (void)setRCConversationDelegate:(id)delegate; + +#pragma mark Draft +/*! + * \~chinese + 获取会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @return 该会话中的草稿 + + @remarks 会话 + + * \~english + Get draft information in the conversations (temporary messages entered by the user but not sent). + + @param conversationType Conversations type + @param targetId Conversation destination ID + @ return drafts in this conversations + + @ remarks Conversations + */ +- (NSString *)getTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 保存草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param content 草稿信息 + @return 是否保存成功 + + @remarks 会话 + + * \~english + Save draft information (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param content Draft information + @ return whether it is saved successfully. + + @ remarks Conversation + */ +- (BOOL)saveTextMessageDraft:(RCConversationType)conversationType + targetId:(NSString *)targetId + content:(NSString *)content; + +/*! + * \~chinese + 删除会话中的草稿信息(用户输入但未发送的暂存消息) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @return 是否删除成功 + + @remarks 会话 + + * \~english + Delete draft information in a conversation (temporarily stored messages entered by the user but not sent). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @ return Whether it is deleted successfully + + @ remarks Conversation + */ +- (BOOL)clearTextMessageDraft:(RCConversationType)conversationType targetId:(NSString *)targetId; + +#pragma mark Unread Count + +/*! + * \~chinese + 获取所有的未读消息数(聊天室会话除外) + + @return 所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages (except chatroom conversations). + + @ return All unread messages + + @ remarks Conversation + */ +- (int)getTotalUnreadCount; + +/*! + * \~chinese + 获取某个会话内的未读消息数(聊天室会话除外) + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @return 该会话内的未读消息数 + + @remarks 会话 + + * \~english + Get the number of unread messages in a conversation (except for chatroom conversations). + + @param conversationType Conversation type + @param targetId Conversation destination ID + @ return Number of unread messages in the conversation + + @ remarks Conversation + */ +- (int)getUnreadCount:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 获取某些会话的总未读消息数 (聊天室会话除外) + + @param conversations 会话列表 ( RCConversation 对象只需要 conversationType 和 targetId,channelId 按需使用) + @return 传入会话列表的未读消息数 + + @remarks 会话 + + * \~english + Get the total number of unread messages for some conversations (except chatroom conversations) + + @param conversations Conversation list (RCConversation object only requires conversationType and targetId, and channelId is used on demand) + @ return Number of unread messages passed into the conversation list + + @ remarks Conversation + */ +- (int)getTotalUnreadCount:(NSArray *)conversations; + +/** + * \~chinese + 获取某些类型的会话中所有的未读消息数 (聊天室会话除外) + + @param conversationTypes 会话类型的数组 + @param isContain 是否包含免打扰消息的未读数 + @return 该类型的会话中所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages in certain types of conversations (except chatroom conversations) + + @param conversationTypes Array of conversation types. + @param isContain Does it include the number of the unread Do Not Disturb messages. + @ return Number of all unread messages in this type of conversation. + + @ remarks Conversation + */ +- (int)getUnreadCount:(NSArray *)conversationTypes containBlocked:(bool)isContain; + +/*! + * \~chinese + 获取某个类型的会话中所有的未读消息数(聊天室会话除外) + + @param conversationTypes 会话类型的数组 + @return 该类型的会话中所有的未读消息数 + + @remarks 会话 + + * \~english + Get the number of all unread messages in a certain type of conversation (except chatroom conversation) + + @param conversationTypes Array of conversation types + @ return the number of all unread messages in this type of conversation + + @ remarks Conversation + */ +- (int)getUnreadCount:(NSArray *)conversationTypes; + +/*! + * \~chinese + 获取某个类型的会话中所有未读的被@的消息数 + + @param conversationTypes 会话类型的数组 + @return 该类型的会话中所有未读的被@的消息数 + + @remarks 会话 + + * \~english + Get the number of unread @ messages in a certain type of conversation + + @param conversationTypes Array of conversation types + @ return Number of unread @ messages in this type of conversation + + @ remarks Conversation + */ +- (int)getUnreadMentionedCount:(NSArray *)conversationTypes; + +/*! + * \~chinese + 清除某个会话中的未读消息数 + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation. + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @ return whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 清除某个会话中的未读消息数(该会话在时间戳 timestamp 之前的消息将被置成已读。) + + @param conversationType 会话类型,不支持聊天室 + @param targetId 会话 ID + @param timestamp 该会话已阅读的最后一条消息的发送时间戳 + @return 是否清除成功 + + @remarks 会话 + + * \~english + Clear the number of unread messages in a conversation (messages for that conversation before the timestamp will be set to read.) + + @param conversationType Conversation type, which does not support chatroom + @param targetId Conversation ID + @param timestamp Sending timestamp of the last message read by the conversation + @ return Whether it is cleared successfully. + + @ remarks Conversation + */ +- (BOOL)clearMessagesUnreadStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + time:(long long)timestamp; + +#pragma mark - Conversation Notification + +/*! + * \~chinese + 设置会话的消息提醒状态 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param isBlocked 是否屏蔽消息提醒 + @param successBlock 设置成功的回调 + [nStatus:会话设置的消息提醒状态] + @param errorBlock 设置失败的回调 [status:设置失败的错误码] + + @discussion + 如果您使用 + IMLibCore,此方法会屏蔽该会话的远程推送;如果您使用IMKit,此方法会屏蔽该会话的所有提醒(远程推送、本地通知、前台提示音),该接口不支持聊天室。 + + @remarks 会话 + + * \~english + Set the message reminder status for the conversation + + @param conversationType Conversation type + @param targetId Conversation ID + @param isBlocked Whether to block message reminders + @param successBlock Callback for successful setting + [nStatus: message reminder status set for the conversation]. + @param errorBlock Callback for failed setting [ status: error code for error code for setting failure]. + + @ discussion + If you use the IMLibCore, this method blocks the remote push of the conversation; If you use this method of IMKit, it blocks all reminders (remote push, local notification and foreground tone) of the conversation, and the interface does not support chatroom. + + @ remarks Conversation + */ +- (void)setConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + isBlocked:(BOOL)isBlocked + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询会话的消息提醒状态 + + @param conversationType 会话类型(不支持聊天室,聊天室是不接受会话消息提醒的) + @param targetId 会话 ID + @param successBlock 查询成功的回调 [nStatus:会话设置的消息提醒状态] + @param errorBlock 查询失败的回调 [status:设置失败的错误码] + + @remarks 会话 + + * \~english + Query the message reminder status of the conversation + + @param conversationType Conversation type (chatroom is not supported and chatroom does not accept reminders of conversation messages). + @param targetId Conversation ID + @param successBlock Callback for successful query [nStatus: message reminder status set for the conversation] + @param errorBlock Callback for failed query [status: error code for setting failure] + + @ remarks Conversation + */ +- (void)getConversationNotificationStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + success:(void (^)(RCConversationNotificationStatus nStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 获取消息免打扰会话列表 + + @param conversationTypeList 会话类型的数组(需要将 RCConversationType 转为 NSNumber 构建 NSArray) + @return 消息免打扰会话 RCConversation 的列表 + + @discussion 此方法会从本地数据库中,读取消息免打扰会话列表。 + + @remarks 会话列表 + + * \~english + Get a list of conversations for Do Not Disturb messages. + + @param conversationTypeList Array of conversation types (it is required to convert RCConversationType to NSNumber to build NSArray). + @ return List of conversation RCConversation for Do Not Disturb messages + + @ discussion This method reads the list of conversations of Do Not Disturb messages from the local database. + + @ remarks Conversation list + */ +- (NSArray *)getBlockedConversationList:(NSArray *)conversationTypeList; + +#pragma mark - Global Message Notification + +/*! + * \~chinese + 全局屏蔽某个时间段的消息提醒 + + @param startTime 开始消息免打扰时间,格式为 HH:MM:SS + @param spanMins 需要消息免打扰分钟数,0 < spanMins < 1440( 比如,您设置的起始时间是 00:00, 结束时间为 + 23:59,则 spanMins 为 23 * 60 + 59 = 1439 分钟。) + @param successBlock 屏蔽成功的回调 + @param errorBlock 屏蔽失败的回调 [status:屏蔽失败的错误码] + + @discussion 此方法设置的屏蔽时间会在每天该时间段时生效。 + 如果您使用 IMLibCore,此方法会屏蔽该会话在该时间段的远程推送;如果您使用 + IMKit,此方法会屏蔽该会话在该时间段的所有提醒(远程推送、本地通知、前台提示音)。 + + @remarks 会话 + + * \~english + Globally block message reminders for a certain period of time. + + @param startTime Start message Do Not Disturb time in HH:MM:SS format. + @param spanMins Minutes required for message Do Not Disturb, 0 < spanMins < 1440 (for example, set the start time to be 00: 00 and the end time to be 23: 59, then the spanMins is 23 * 60 + 59 = 1439 minutes). + @param successBlock Callback for successful masking + @param errorBlock Callback for masking failure [status: error code for masking failure]. + + @ discussion The masking time set by this method takes effect at that time of day. + If you use the IMLibCore, this method blocks the remote push of the conversation in this period; If you use IMKit, this method blocks all reminders (remote push, local notification and foreground tone) of the conversation in this period. + + @ remarks Conversation + */ +- (void)setNotificationQuietHours:(NSString *)startTime + spanMins:(int)spanMins + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 删除已设置的全局时间段消息提醒屏蔽 + + @param successBlock 删除屏蔽成功的回调 + @param errorBlock 删除屏蔽失败的回调 [status:失败的错误码] + + @remarks 会话 + + * \~english + Delete the set message reminder masking in a global time period. + + @param successBlock Callback for successful masking deletion + @param errorBlock Callback for failed masking deletion[status: error code for failure] + + @ remarks Conversation + */ +- (void)removeNotificationQuietHours:(void (^)(void))successBlock error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询已设置的全局时间段消息提醒屏蔽 + + @param successBlock 屏蔽成功的回调 [startTime:已设置的屏蔽开始时间, + spansMin:已设置的屏蔽时间分钟数,0 < spansMin < 1440] + @param errorBlock 查询失败的回调 [status:查询失败的错误码] + + @remarks 会话 + + * \~english + Query the set message reminder masking in a global time period. + + @param successBlock Callback for successful masking [startTime: set start time of masking, + spansMin: set minutes of masking, 0 < spansMin < 1440] + @param errorBlock callback for failed query [status: error code of failed query] + + @ remarks Conversation + */ +- (void)getNotificationQuietHours:(void (^)(NSString *startTime, int spansMin))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +#pragma mark - Typing status + +/** + * \~chinese + typing 状态更新的时间,默认是 6s + + @remarks 功能设置 + + * \~english + Time when the typing status is updated and the default value is 6s + + @ remarks Function setting + */ +@property (nonatomic, assign) NSInteger typingUpdateSeconds; + +/*! + * \~chinese + 设置输入状态的监听器 + + @param delegate IMLibCore 输入状态的的监听器 + + @warning 目前仅支持单聊。 + + @remarks 功能设置 + + * \~english + Set the listener for the input status + + @param delegate Listeners for IMLibCore input status + + @ warning currently only support single chat + + @ remarks function setting + */ +- (void)setRCTypingStatusDelegate:(id)delegate; + +/*! + * \~chinese + 向会话中发送正在输入的状态 + + @param conversationType 会话类型 + @param targetId 会话目标 ID + @param objectName 正在输入的消息的类型名 + + @discussion + contentType 为用户当前正在编辑的消息类型名,即 RCMessageContent 中 getObjectName 的返回值。 + 如文本消息,应该传类型名"RC:TxtMsg"。 + + @warning 目前仅支持单聊。 + + @remarks 高级功能 + + * \~english + Send the status being entered to the conversation + + @param conversationType Conversation type + @param targetId Conversation destination ID + @param objectName Type name of the message being entered + + @ discussion + contentType is the name of the message type that the user is currently editing, that is, the return value of getObjectName in RCMessageContent. + E.g. for a text message, pass the type name "RC:TxtMsg". + + @ warning Currently only support single chat. + + @ remarks advanced functions + */ +- (void)sendTypingStatus:(RCConversationType)conversationType + targetId:(NSString *)targetId + contentType:(NSString *)objectName; + +#pragma mark - Disallow List + +/*! + * \~chinese + 将某个用户加入黑名单 + + @param userId 需要加入黑名单的用户 ID + @param successBlock 加入黑名单成功的回调 + @param errorBlock 加入黑名单失败的回调 [status:失败的错误码] + + @discussion 将对方加入黑名单后,对方再发消息时,就会提示“您的消息已经发出, 但被对方拒收”。但您仍然可以给对方发送消息。 + + @remarks 高级功能 + + * \~english + Add a user to the blacklist + + @param userId ID of users to be added to the blacklist + @param successBlock Callback for successfully adding to the blacklist + @param errorBlock Callback for failure to add to the blacklist [status: error code for failure] + + @ discussion After the other party is added to the blacklist, when the other party sends another message, it will prompt "your message has been sent, but it has been rejected.” But you can still send messages to each other. + + @ remarks advanced functions + */ +- (void)addToBlacklist:(NSString *)userId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 将某个用户移出黑名单 + + @param userId 需要移出黑名单的用户 ID + @param successBlock 移出黑名单成功的回调 + @param errorBlock 移出黑名单失败的回调[status:失败的错误码] + + @remarks 高级功能 + + * \~english + Remove a user from the blacklist + + @param userId ID of users to be removed from the blacklist + @param successBlock Callback for successful removal from the blacklist + @param errorBlock Callback for failed removal from blacklist [status: error code for failure] + + @ remarks Advanced functions + */ +- (void)removeFromBlacklist:(NSString *)userId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询某个用户是否已经在黑名单中 + + @param userId 需要查询的用户 ID + @param successBlock 查询成功的回调 + [bizStatus:该用户是否在黑名单中。0 表示已经在黑名单中,101 表示不在黑名单中] + @param errorBlock 查询失败的回调 [status:失败的错误码] + + @remarks 高级功能 + + * \~english + Query whether a user is already in the blacklist. + + @param userId ID of the user to be queried + @param successBlock Callback for successful query + [bizStatus: whether the user is in the blacklist 0 indicates it is already in the blacklist, 101 indicates it is not in the blacklist] + @param errorBlock Callback for failed query [status: error code forfailure] + + @ remarks Advanced functions + */ +- (void)getBlacklistStatus:(NSString *)userId + success:(void (^)(int bizStatus))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 查询已经设置的黑名单列表 + + @param successBlock 查询成功的回调 + [blockUserIds:已经设置的黑名单中的用户 ID 列表] + @param errorBlock 查询失败的回调 [status:失败的错误码] + + @remarks 高级功能 + + * \~english + Query the list of blacklists set + + @param successBlock Callback for successful query + [blockUserIds: ID list of users in the blacklist set] + @param errorBlock Callback for failed query [status: error code for failure] + + @ remarks Advanced functions + */ +- (void)getBlacklist:(void (^)(NSArray *blockUserIds))successBlock error:(void (^)(RCErrorCode status))errorBlock; + +#pragma mark - Push Data Countly + +/*! + * \~chinese + 统计App启动的事件 + + @param launchOptions App的启动附加信息 + + @discussion 此方法用于统计融云推送服务的点击率。 + 如果您需要统计推送服务的点击率,只需要在 AppDelegate 的-application:didFinishLaunchingWithOptions:中, + 调用此方法并将 launchOptions 传入即可。 + + @remarks 高级功能 + + * \~english + Count the events started by app + + @param launchOptions Additional information about app startup + + @ discussion This method is used to count the click rate of RongCloud push service. + If you need to count the click rate of the push service, you only need to call this method in -application:didFinishLaunchingWithOptions: of AppDelegate and pass in the launchOptions. + + @ remarks advanced functions + */ +- (void)recordLaunchOptionsEvent:(NSDictionary *)launchOptions; + +/*! + * \~chinese + 统计本地通知的事件 + + @param notification 本体通知的内容 + + @discussion 此方法用于统计融云推送服务的点击率。 + 如果您需要统计推送服务的点击率,只需要在AppDelegate 的-application:didReceiveLocalNotification:中, + 调用此方法并将 launchOptions 传入即可。 + + @remarks 高级功能 + + * \~english + Count locally notified events + + @param notification Content of ontology notification + + @ discussion This method is used to count the click rate of RongCloud push service. + If you need to count the click rate of the push service, you only need to call this method in -application:didReceiveLocalNotification: of AppDelegate and pass in the launchOptions. + + @ remarks advanced functions + */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +- (void)recordLocalNotificationEvent:(UILocalNotification *)notification; +#pragma clang diagnostic pop + +/*! + * \~chinese + 统计收到远程推送的事件 + + @param userInfo 远程推送的内容 + + @discussion 此方法用于统计融云推送服务的到达率。 + 如果您需要统计推送服务的到达率,需要在 App 中实现通知扩展,并在 NotificationService 的 -didReceiveNotificationRequest: withContentHandler: 中 + 先初始化 appkey 再调用此方法并将推送内容 userInfo 传入即可。 + + @discussion 如果有单独的统计服务地址,还需要在初始化之后设置独立的统计服务地址 + + 如: + + - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { + self.contentHandler = contentHandler; + self.bestAttemptContent = [request.content mutableCopy]; + + NSDictionary *userInfo = self.bestAttemptContent.userInfo; + [[RCCoreClient sharedCoreClient] initWithAppKey:RONGCLOUD_IM_APPKEY]; + if (RONGCLOUD_STATS_SERVER.length > 0) { + [[RCCoreClient sharedCoreClient] setStatisticServer:RONGCLOUD_STATS_SERVER]; + } + [[RCCoreClient sharedCoreClient] recordReceivedRemoteNotificationEvent:userInfo]; + + self.contentHandler(self.bestAttemptContent); + } + + @remarks 高级功能 + */ +- (void)recordReceivedRemoteNotificationEvent:(NSDictionary *)userInfo; + +/*! + * \~chinese + 统计远程推送的点击事件 + + @param userInfo 远程推送的内容 + + @discussion 此方法用于统计融云推送服务的点击率。 + 如果您需要统计推送服务的点击率,只需要在 AppDelegate 的-application:didReceiveRemoteNotification:中, + 调用此方法并将 launchOptions 传入即可。 + + @remarks 高级功能 + + * \~english + Count the events of remote push + + @param userInfo Content of remote push + + @ discussion This method is used to count the click rate of RongCloud push service. + If you need to count the click rate of the push service, you only need to call this method in -application:didReceiveRemoteNotification: of AppDelegate and pass in the launchOptions. + + @ remarks advanced functions + */ +- (void)recordRemoteNotificationEvent:(NSDictionary *)userInfo; + +/*! + * \~chinese + 获取点击的启动事件中,融云推送服务的扩展字段 + + @param launchOptions App 的启动附加信息 + @return 收到的融云推送服务的扩展字段,nil 表示该启动事件不包含来自融云的推送服务 + + @discussion 此方法仅用于获取融云推送服务的扩展字段。 + + @remarks 高级功能 + + * \~english + Get the extension field of the RongCloud push service in the clicked start event + + @param launchOptions Additional information about app startup + @ return Received extension field of the RongCloud push service. Nil indicates that the start event does not include the push service from the RongCoud service. + + @ discussion This method is only used to obtain the extended fields of RongCloud push service. + + @ remarks advanced functions + */ +- (NSDictionary *)getPushExtraFromLaunchOptions:(NSDictionary *)launchOptions; + +/*! + * \~chinese + 获取点击的远程推送中,融云推送服务的扩展字段 + + @param userInfo 远程推送的内容 + @return 收到的融云推送服务的扩展字段,nil 表示该远程推送不包含来自融云的推送服务 + + @discussion 此方法仅用于获取融云推送服务的扩展字段。 + + @remarks 高级功能 + + * \~english + Get the extension field of the RongCloud push service in the clicked remote push. + + @param userInfo Content of remote push. + @ return Received extension field of RongCloud push service. Nil indicates that the remote push does not include the push service from RongCloud. + + @ discussion This method is only used to obtain the extended fields of RongCloud push service. + + @ remarks advanced functions + */ +- (NSDictionary *)getPushExtraFromRemoteNotification:(NSDictionary *)userInfo; + +#pragma mark - Util + +/*! + * \~chinese + 获取当前 IMLibCore SDK的版本号 + + @return 当前 IMLibCore SDK 的版本号,如: @"2.0.0" + + @remarks 数据获取 + + * \~english + Get the version number of the current IMLibCore SDK. + + @ return Version number of the current IMLibCore SDK, e.g.: @ "2.0.0" + + @ remarks Data acquisition + */ ++ (NSString *)getVersion; + +/*! + * \~chinese + 获取当前手机与服务器的时间差 + + @return 时间差 + @discussion 消息发送成功后,SDK 会与服务器同步时间,消息所在数据库中存储的时间就是服务器时间。 + + @remarks 数据获取 + + * \~english + Get the time difference between the current mobile phone and the server + + @ return time difference + @ discussion After the message is sent successfully, the SDK synchronizes the time with the server, and the time stored in the database where the message is located is the server time. + @ remarks Data acquisition + + @ remarks data acquisition + */ +- (long long)getDeltaTime; + +/*! + * \~chinese + 将AMR格式的音频数据转化为 WAV 格式的音频数据,数据开头携带 WAVE 文件头 + + @param data AMR 格式的音频数据,必须是 AMR-NB 的格式 + @return WAV 格式的音频数据 + + @remarks 数据获取 + + * \~english + Convert audio data in AMR format into audio data in WAV format with WAVE file header at the beginning of the data. + + @param data Audio data in AMR format, which must be in AMR-NB format + @ return Audio data in WAV format + + @ remarks Data acquisition + */ +- (NSData *)decodeAMRToWAVE:(NSData *)data; + +/*! + * \~chinese + 将 AMR 格式的音频数据转化为 WAV 格式的音频数据,数据开头不携带 WAV 文件头 + + @param data AMR 格式的音频数据,必须是 AMR-NB 的格式 + @return WAV 格式的音频数据 + + @remarks 数据获取 + + * \~english + Convert audio data in AMR format into audio data in WAV format with WAV file header at the beginning of the data. + + @param data Audio data in AMR format, which must be in AMR-NB format. + @ return Audio data in WAV format + + @ remarks Data acquisition + */ +- (NSData *)decodeAMRToWAVEWithoutHeader:(NSData *)data; + +#pragma mark - Voice Message Setting +/** + * \~chinese + 语音消息采样率,默认 8KHz + + @discussion + 2.9.12 之前的版本只支持 8KHz。如果设置为 16KHz,老版本将无法播放 16KHz 的语音消息。 + 客服会话只支持 8KHz。 + + @remarks 功能设置 + + * \~english + Voice message sampling rate, with default value of 8KHz + + @ discussion + The versions prior to 2.9.12 only supports 8KHz. If it is set to 16kHz, the old version will not be able to play 16KHz voice messages. + The customer service conversations only support 8KHz. + + @ remarks function setting + */ +@property (nonatomic, assign) RCSampleRate sampleRate __deprecated_msg("deprecated"); + +/** + * \~chinese + 语音消息类型,默认 RCVoiceMessageTypeOrdinary + + @discussion 老版本 SDK 不兼容新版本语音消息 + 2.9.19 之前的版本无法播放高音质语音消息; + 2.9.19 及之后的版本可以同时兼容普通音质语音消息和高音质语音消息; + 客服会话类型 (ConversationType_CUSTOMERSERVICE) 不支持高音质语音消息。 + + @remarks 功能设置 + + * \~english + Voice message type, with default value of RCVoiceMessageTypeOrdinary + + @ discussion The old version of SDK is not compatible with the new version of voice messages. + The versions prior to 2.9.19 cannot play high-quality voice messages; + 2.9.19 and later versions can be compatible with both normal and high quality voice messages. + The customer service conversation type (ConversationType_CUSTOMERSERVICE) does not support high-quality voice messages. + + @ remarks function setting + */ +@property (nonatomic, assign) RCVoiceMessageType voiceMsgType; + +#pragma mark - Search + +/*! + * \~chinese + 根据关键字搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param keyword 关键字 + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on keywords. + + @param conversationType Conversation type + @param targetId Conversation ID + @param keyword Keyword + @param count Maximum number of queries + @param startTime Query messages before startTime (0 indicates unlimited time). + + @ return Matching message list + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + keyword:(NSString *)keyword + count:(int)count + startTime:(long long)startTime; + +/*! + * \~chinese + 根据时间,偏移量和个数搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param keyword 关键字,传空默认为是查全部符合条件的消息 + @param startTime 查询 startTime 之后的消息, startTime >= 0 + @param endTime 查询 endTime 之前的消息,endTime > startTime + @param offset 查询的消息的偏移量,offset >= 0 + @param limit 最大的查询数量,limit 需大于 0,最大值为100,如果大于100,会默认成100。 + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation based on time, offset, and number. + + @param conversationType Conversation type + @param targetId Conversation ID + @param keyword Keyword, in which empty value indicates to check all messages that meet the criteria by default + @param startTime Query the message after startTime, startTime > = 0 + @param endTime Query the messages before endTime, endTime > startTime. + @param offset Offset of the queried message, offset > = 0 + @param limit For the maximum number of queries, the limit should be greater than 0, and the maximum value should be 100. If it is greater than 100, it will default to 100. + + @ return List of messages matched + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + keyword:(NSString *)keyword + startTime:(long long)startTime + endTime:(long long)endTime + offset:(int)offset + limit:(int)limit; + +/*! + * \~chinese + 按用户 ID 搜索指定会话中的消息 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param userId 搜索用户 ID + @param count 最大的查询数量 + @param startTime 查询 startTime 之前的消息(传 0 表示不限时间) + + @return 匹配的消息列表 + + @remarks 消息操作 + + * \~english + Search messages in a specified conversation by user ID + + @param conversationType Conversation type + @param targetId Conversation ID + @param userId Search user ID + @param count Maximum number of queries. + @param startTime Query messages before startTime (0 indicates unlimited time) + + @ return List of message matched + + @ remarks Message operation + */ +- (NSArray *)searchMessages:(RCConversationType)conversationType + targetId:(NSString *)targetId + userId:(NSString *)userId + count:(int)count + startTime:(long long)startTime; + +/*! + * \~chinese + 根据关键字搜索会话 + + @param conversationTypeList 需要搜索的会话类型列表 + @param objectNameList 需要搜索的消息类型名列表(即每个消息类方法 getObjectName 的返回值) + @param keyword 关键字 + + @return 匹配的会话搜索结果列表 + + @discussion 目前,SDK 内置的文本消息、文件消息、图文消息支持搜索。 + 自定义的消息必须要实现 RCMessageContent 的 getSearchableWords 接口才能进行搜索。 + + @remarks 消息操作 + + * \~english + Search a conversation based on keywords + + @param conversationTypeList List of conversation types to be searched + @param objectNameList List of type names of message to be searched (that is, the return value of each message class method getObjectName) + @param keyword Keyword + + @ return Search results list for conversation matched. + + @ discussion Currently, SDK's built-in text messages, file messages, and image and text messages support search + Custom messages must implement getSearchableWords interface of RCMessageContent before they can be searched + + @ remarks message operation + */ +- (NSArray *)searchConversations:(NSArray *)conversationTypeList + messageType:(NSArray *)objectNameList + keyword:(NSString *)keyword; + +#pragma mark - Log + +/*! + * \~chinese + 设置日志级别 + + @remarks 高级功能 + + * \~english + Set log level + + @ remarks Advanced functions + */ +@property (nonatomic, assign) RCLogLevel logLevel; + +/*! + * \~chinese + 设置 IMLibCore 日志的监听器 + + @param delegate IMLibCore 日志的监听器 + + @discussion 您可以通过 logLevel 来控制日志的级别。 + + @remarks 功能设置 + + * \~english + Set listeners for IMLibCore logs + + @param delegate Listeners for IMLibCore logs + + @ discussion You can control the level of logs through logLevel. + + @ remarks function setting + */ +- (void)setRCLogInfoDelegate:(id)delegate; + +#pragma mark - File Storage + +/*! + * \~chinese + 文件消息下载路径 + + @discussion 默认值为沙盒下的 Documents/MyFile 目录。您可以通过修改 RCConfig.plist 中的 RelativePath 来修改该路径。 + + @remarks 数据获取 + + * \~english + File message downloading path + + @ discussion The default value is the Documents/MyFile directory under sandboxes. You can modify the path by modifying the RelativePath in RCConfig.plist. + + @ remarks data acquisition + */ +@property (nonatomic, strong, readonly) NSString *fileStoragePath; + +#pragma mark - VendorToken +/*! + * \~chinese + 获取Vendor token. 仅供融云第三方服务厂家使用。 + + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @remarks 数据获取 + + * \~english + Get Vendor token, which is for RongCloud's third-party service manufacturers only. + + @ param successBlock Callback for success + @ param errorBlock Callback for failure + + @ remarks Data acquisition + */ +- (void)getVendorToken:(void (^)(NSString *vendorToken))successBlock error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 远程推送相关设置 + + @remarks 功能设置 + + * \~english + Remote push of related settings + + @ remarks Function setting + */ +@property (nonatomic, strong, readonly) RCPushProfile *pushProfile; + +#pragma mark - History Message +/** + * \~chinese + 设置离线消息在服务端的存储时间(以天为单位) + + @param duration 存储时间,范围【1~7天】 + @param successBlock 成功回调 + @param errorBlock 失败回调 + + @remarks 功能设置 + + * \~english + Set the storage time of offline messages on the server (in days) + + @param duration Storage time, range [1~7 days] + @ param Callback for successBlock + @ param Callback for errorBlock + + @ remarks Function setting + */ +- (void)setOfflineMessageDuration:(int)duration + success:(void (^)(void))successBlock + failure:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/** + * \~chinese + 获取离线消息时间 (以天为单位) + + @return 离线消息存储时间 + + @remarks 数据获取 + + * \~english + Get offline message time (in days) + + @ return Storage time of offline message + + @ remarks Data acquisition + */ +- (int)getOfflineMessageDuration; + +/** + * \~chinese + 设置集成 SDK 的用户 App 版本信息。便于融云排查问题时,作为分析依据,属于自愿行为。 + + @param appVer 用户 APP 的版本信息。 + + @remarks 功能设置 + + * \~english + Set the user App version information for the integrated SDK. When it is convenient for RongCloud to investigate the problem, as the basis for analysis, it shall be voluntary. + + @ param appVer Version information of user APP + + @ remarks function setting + */ +- (void)setAppVer:(NSString *)appVer; + +/** + * \~chinese + GIF 消息大小限制,以 KB 为单位,超过这个大小的 GIF 消息不能被发送 + + @return GIF 消息大小,以 KB 为单位 + + @remarks 数据获取 + + * \~english + GIF message size limit, in KB. GIF messages exceeding this size cannot be sent + + @ return GIF message size, in KB + + @ remarks Data acquisition + */ +- (NSInteger)getGIFLimitSize; + +/** + * \~chinese + 小视频消息时长限制,以 秒 为单位,超过这个时长的小视频消息不能在相册中被选择发送 + + @return 小视频消息时长,以 秒 为单位 + + * \~english + Duration limit of small video messages, in seconds. Small video messages exceeding this limit cannot be selected to be sent in the album + + @ return Duration of small video message, in seconds + */ +- (NSTimeInterval)getVideoDurationLimit; + +#pragma mark - Conversation Status: Sync,Notification,Top + +/*! + * \~chinese +设置会话状态(包含置顶,消息免打扰)同步的监听器 + +@param delegate 会话状态同步的监听器 + +@discussion 可以设置并实现此 delegate 来进行会话状态同步。SDK 会在回调的 conversationStatusChange:方法中通知您会话状态的改变。 + +@remarks 功能设置 + + * \~english + Listeners that set conversation status (including top setting and Do Not Disturb setting) synchronization + + @param delegate Listeners for conversation status synchronization + + @ discussion It can set and implement this delegate for conversation status synchronization. SDK will notify you of the change in conversation status in the callback conversationStatusChange: method. + + @ remarks function setting +*/ +- (void)setRCConversationStatusChangeDelegate:(id)delegate; + +#pragma mark - Message Expansion +/** + * \~chinese + 更新消息扩展信息 + + @param expansionDic 要更新的消息扩展信息键值对 + @param messageUId 消息 messageUId + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 消息扩展信息是以字典形式存在。设置的时候从 expansionDic 中读取 key,如果原有的扩展信息中 key 不存在则添加新的 KV 对,如果 key 存在则替换成新的 value。 + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + @discussion 扩展信息字典中的 Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 32;Value 最长长度,单次设置扩展数量最大为 20,消息的扩展总数不能超过 300 + + @remarks 高级功能 + + * \~english + Update message extension information + + @param expansionDic Message extension information key-value pair to be updated + @param messageUId Message messageUId. + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion The message extension information exists in the form of a dictionary. Read key from expansionDic when setting. If key does not exist in the original extension information, add a new KV pair, or replace it with a new value if key exists. + @ discussion The extension information only supports single chat and groups. Other conversation types cannot set extension information + @ discussion The Key in the extended information dictionary supports the combination of uppercase and lowercase letters, numbers, and some special symbols + =-_. The maximum length is 32; For the maximum length of Value, the maximum number of extensions set at a time is 20, and the total number of messages extensions cannot exceed 300 + @ remarks Advanced functions +*/ +- (void)updateMessageExpansion:(NSDictionary *)expansionDic + messageUId:(NSString *)messageUId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 删除消息扩展信息中特定的键值对 + + @param keyArray 消息扩展信息中待删除的 key 的列表 + @param messageUId 消息 messageUId + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + + @remarks 高级功能 + + * \~english + Delete a specific key-value pair in the message extension information. + + @param keyArray List of key to be deleted in message extension information + @param messageUId Message messageUId + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion The extension information only supports single chat and groups and other conversation types cannot set extension information. + + @ remarks Advanced functions +*/ +- (void)removeMessageExpansionForKey:(NSArray *)keyArray + messageUId:(NSString *)messageUId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/*! + * \~chinese + 设置 IMLibCore 的消息扩展监听器 + + @discussion 代理回调在非主线程 + + @remarks 高级功能 + + * \~english + Set the message extension listener for IMLibCore + + @ discussion Proxy callback in non-main thread + + @ remarks Advanced functions + */ +@property (nonatomic, weak) id messageExpansionDelegate; + +#pragma mark - Tag +/*! + * \~chinese + 添加标签 + + @param tagInfo 标签信息。只需要设置标签信息的 tagId 和 tagName。 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 最多支持添加 20 个标签 + @remarks 高级功能 + + * \~english + Add tags + + @param tagInfo Tag information. You only shall set the tagId and tagName of the tag information. + @param successBlock Callback for success. + @param errorBlock Callback for failure + + @ discussion Support to add 20 tags at most + @ remarks Advanced functions + */ +- (void)addTag:(RCTagInfo *)tagInfo + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 移除标签 + + @param tagId 标签 ID + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Remove tag + + @param tagId Tag ID + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)removeTag:(NSString *)tagId + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 更新标签信息 + + @param tagInfo 标签信息。只支持修改标签信息的 tagName + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Update tag information + + @param tagInfo Tag information. Only tagName that modifies tag information is supported + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)updateTag:(RCTagInfo *)tagInfo + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + + +/*! + * \~chinese + 获取标签列表 + + @return 标签列表 + @remarks 高级功能 + + * \~english + Get a list of tags + + @ return Tag list + @ remarks Advanced functions + */ +- (NSArray *)getTags; + +/*! + * \~chinese + 标签变化监听器 + + @discussion 标签添加移除更新会触发此监听器,用于多端同步 + @discussion 本端添加删除更新标签,不会触发此监听器,在相关调用方法的 block 块直接回调 + + @remarks 高级功能 + + * \~english + Listener for tag changing + + @ discussion Addition, removal and update of a tag triggers this listener for multi-terminal synchronization + @ discussion Local addition, removal and update of a tag will not trigger this listener, and it will be called back directly in the block of the relevant call method. + + @ remarks Advanced functions + */ +@property (nonatomic, weak) id tagDelegate; + +/*! + * \~chinese + 添加会话到指定标签 + + @param tagId 标签 ID + @param conversationIdentifiers 会话信息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 每次添加会话个数最大为 1000。最多支持添加 1000 个会话,如果标签添加的会话总数已超过 1000,会自动覆盖早期添加的会话 + @remarks 高级功能 + + * \~english + Add a conversation to the specified tag + + @param tagId Tag ID + @param conversationIdentifiers Conversation information list + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion Maximum 1000 conversations are added at a time. A maximum of 1000 conversations can be added. If the total number of conversations added by the tag exceeds 1000, the previously added conversations will be automatically overwritten. + @ remarks Advanced functions + */ +- (void)addConversationsToTag:(NSString *)tagId + conversationIdentifiers:(NSArray *)conversationIdentifiers + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 从指定标签移除会话 + + @param tagId 标签 ID + @param conversationIdentifiers 会话信息列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @discussion 每次移除会话个数最大为 1000 + @remarks 高级功能 + + * \~english + Remove a conversation from the specified tag + + @param tagId Tag ID + @param conversationIdentifiers Conversation information list + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ discussion Maximum 1000 conversations are removed at a time + @ remarks Advanced functions + */ +- (void)removeConversationsFromTag:(NSString *)tagId + conversationIdentifiers:(NSArray *)conversationIdentifiers + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 从指定会话中移除标签 + + @param conversationIdentifier 会话信息 + @param tagIds 标签 ID 列表 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Remove the tag from the specified conversation + + @param conversationIdentifier Conversation information. + @param tagIds Tag ID list + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)removeTagsFromConversation:(RCConversationIdentifier *)conversationIdentifier + tagIds:(NSArray *)tagIds + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 获取会话的所有标签 + + @param conversationIdentifier 会话信息 + @return 会话所属的标签列表 + + @remarks 高级功能 + + * \~english + Get all the tags for the conversation + + @param conversationIdentifier Conversation information. + @ return List of tags to which the conversation belongs + + @ remarks Advanced functions + */ +- (NSArray *)getTagsFromConversation:(RCConversationIdentifier *)conversationIdentifier; + +/*! + * \~chinese + 分页获取标签中会话列表 + + @param tagId 标签 ID + @param timestamp 会话的时间戳(获取这个时间戳之前的会话列表,0表示从最新开始获取) + @param count 获取的数量(当实际取回的会话数量小于 count 值时,表明已取完数据) + @return 会话 RCConversation 的列表 + + @remarks 高级功能 + + * \~english + Get the list of conversations in the tag page by page + + @param tagId tag ID + @param timestamp Timestamp of the conversation (get the list of conversations before this timestamp, 0 indicates obtaining from the latest). + @param count Number of conversations obtained (When the actual number of retrieved conversations is less than the count value, it indicates that the data has been fetched.) + @ return List of conversation RCConversation + + @ remarks Advanced functions + */ +- (NSArray *)getConversationsFromTagByPage:(NSString *)tagId + timestamp:(long long)timestamp + count:(int)count; + +/*! + * \~chinese + 获取标签中会话消息未读数 + + @param tagId 标签 ID + @param isContain 是否包含免打扰会话 + @return 会话消息未读数 + + @remarks 高级功能 + + * \~english + Get the number of unread conversation messages in the tag + + @param tagId Tag ID + @param isContain Does it include a Do Not Disturb conversation + @ return Number of unread conversation messages + + @ remarks Advanced functions + */ +- (int)getUnreadCountByTag:(NSString *)tagId + containBlocked:(BOOL)isContain; + +/*! + * \~chinese + 设置标签中的会话置顶 + + @param tagId 标签 ID + @param conversationIdentifier 会话信息 + @param top 是否置顶 + @param successBlock 成功的回调 + @param errorBlock 失败的回调 + + @remarks 高级功能 + + * \~english + Set the conversation in the tag to be top + + @param tagId Tag ID + @param conversationIdentifier Conversation information + @param top Whether or not to set top + @param successBlock Callback for success + @param errorBlock Callback for failure + + @ remarks Advanced functions + */ +- (void)setConversationToTopInTag:(NSString *)tagId + conversationIdentifier:(RCConversationIdentifier *)conversationIdentifier + isTop:(BOOL)top + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock; + +/*! + * \~chinese + 获取标签中的会话置顶状态 + + @param conversationIdentifier 会话信息 + @param tagId 标签 ID + @return 置顶状态 + + @remarks 高级功能 + + * \~english + Get the conversation top setting status in the tag. + + @param conversationIdentifier Conversation information + @param tagId Tag ID + @ return top setting status + + @ remarks Advanced functions + */ +- (BOOL)getConversationTopStatusInTag:(RCConversationIdentifier *)conversationIdentifier tagId:(NSString *)tagId; + + +/*! + * \~chinese + 会话标签变化监听器 + + @discussion 会话标签添加移除更新会触发此监听器,用于多端同步 + @discussion 本端操作会话标签,不会触发此监听器,在相关调用方法的 block 块直接回调 + + @remarks 高级功能 + + * \~english + Listener for conversation tag changing. + + @ discussion Addition, removal and update of the conversation tag triggers this listener for multi-terminal synchronization. + @ discussion Local operation on the conversation tag does not trigger this listener, and the block of the relevant calling method is called back directly + + @ remarks Advanced functions + */ +@property (nonatomic, weak) id conversationTagDelegate; + +/*! + * \~chinese + 缩略图压缩配置 + + @remarks 缩略图压缩配置,如果此处设置了配置就按照这个配置进行压缩。如果此处没有设置,会按照 RCConfig.plist 中的配置进行压缩。 + + * \~english + Thumbnail compression configuration + + @ remarks Thumbnail compression configuration. If the configuration is set here, it is compressed according to this configuration. If it is not set here, it will be compressed according to the configuration in RCConfig.plist. + */ +@property (nonatomic, strong) RCImageCompressConfig *imageCompressConfig; + +/*! + * \~chinese + 子模块是否正在使用声音通道,特指 RTCLib + + * \~english + Whether the submodule is using a sound channel, especially the RTCLib + */ +- (BOOL)isAudioHolding; + +/*! + * \~chinese + 子模块是否正在使用摄像头,特指 RTCLib + + * \~english + Whether the submodule is using a camera, especially the RTCLib + */ +- (BOOL)isCameraHolding; + +@end + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCDownloadItem.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCDownloadItem.h new file mode 100644 index 0000000..268dea0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCDownloadItem.h @@ -0,0 +1,200 @@ +// +// RCEDownloadItem.h +// RongEnterpriseApp +// +// Created by zhaobingdong on 2018/5/15. +// Copyright © 2018 rongcloud. All rights reserved. +// + +#import + +/** + * \~chinese + 下载状态枚举 + + - RCDownloadItemStateWaiting: 等待 + - RCDownloadItemStateChecking: 正在检测是否支持 Range + - RCDownloadItemStateRunning: 正在下载 + - RCDownloadItemStateSuspended: 暂停 + - RCDownloadItemStateCanceled: 已取消 + - RCDownloadItemStateCompleted: 完成 + - RCDownloadItemStateFailed: 失败 + + * \~english + Download status enumeration. + + - RCDownloadItemStateWaiting: Wait for + - RCDownloadItemStateChecking: Testing to see if Range is supported. + - RCDownloadItemStateRunning: Downloading. + - RCDownloadItemStateSuspended: Suspend + - RCDownloadItemStateCanceled: Canceled + - RCDownloadItemStateCompleted: Complete + - RCDownloadItemStateFailed: Failure + */ +typedef NS_ENUM(NSInteger, RCDownloadItemState) { + RCDownloadItemStateWaiting = 0, + RCDownloadItemStateChecking, + RCDownloadItemStateRunning, + RCDownloadItemStateSuspended, + RCDownloadItemStateCanceled, + RCDownloadItemStateCompleted, + RCDownloadItemStateFailed +}; + +NS_ASSUME_NONNULL_BEGIN +@class RCDownloadItem; +@protocol RCDownloadItemDelegate + +/** + * \~chinese + 下载任务状态变化时调用 + + @param item 下载任务对象 + @param state 状态 + + * \~english + Called when the status of the download task changes. + + @param item Download task object. + @param state Status. + */ +- (void)downloadItem:(RCDownloadItem *)item state:(RCDownloadItemState)state; + +/** + * \~chinese + 下载进度上报时调用 + + @param item 下载任务 + @param progress 下载进度 + + * \~english + Called when the download progress is reported. + + @param item Download task. + @param progress Download progress. + */ +- (void)downloadItem:(RCDownloadItem *)item progress:(float)progress; + +/** + * \~chinese + 任务结束时调用 + + @param item 下载任务 + @param error 错误信息对象,成功时为 nil + @param path 下载完成后文件的路径,此路径为相对路径,相对于沙盒根目录 NSHomeDirectory + + * \~english + Called at the end of the task. + + @param item Download task. + @param error Error message object, nil on success. + @param path The path to the file after the download is completed. This path is relative to sandboxie's root directory NSHomeDirectory. + */ +- (void)downloadItem:(RCDownloadItem *)item didCompleteWithError:(NSError *)error filePath:(nullable NSString *)path; +@end + +@interface RCDownloadItem : NSObject + +/** + * \~chinese + 下载状态 + + * \~english + Download status. + */ +@property (nonatomic, assign, readonly) RCDownloadItemState state; + +/** + * \~chinese + 文件总大小 单位字节 + + * \~english + Total file size in bytes. + */ +@property (nonatomic, assign, readonly) long long totalLength; + +/** + * \~chinese + 文件当前的大小 + + * \~english + The current size of the file. + */ +@property (nonatomic, assign, readonly) long long currentLength; + +/** + * \~chinese + 文件对应的网络 URL + + * \~english + Network URL corresponding to the file. + */ +@property (nonatomic, strong, readonly) NSURL *URL; + +/** + * \~chinese + 标识是否可恢复下载。 YES 表示可恢复,支持 Range。 NO 表示不支持 Range。 + + * \~english + Identify whether the download can be resumed. YES indicates recoverable and supports Range. NO indicates that Range is not supported. + */ +@property (nonatomic, assign, readonly) BOOL resumable; + +/** + * \~chinese + 下载任务的标识符 + + * \~english + Identifier of the download task. + */ +@property (nonatomic, copy, readonly) NSString *identify; + +/** + * \~chinese + 下载任务的代理对象 + + * \~english + Download the proxy object for the task. + */ +@property (nonatomic, weak) id delegate; + ++ (instancetype) new NS_UNAVAILABLE; + +/** + * \~chinese + 开始下载 + + * \~english + Start downloading + */ +- (void)downLoad; + +/** + * \~chinese + 暂停下载 + + * \~english + Suspend download + */ +- (void)suspend; + +/** + * \~chinese + 恢复下载 + + * \~english + Resume download + */ +- (void)resume; + +/** + * \~chinese + 取消下载 + + * \~english + Cancel download + */ +- (void)cancel; + +@end +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFileMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFileMessage.h new file mode 100644 index 0000000..d4a82f1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFileMessage.h @@ -0,0 +1,96 @@ +// +// RCFileMessage.h +// RongIMLib +// +// Created by RongCloud on 16/5/23. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 文件消息的类型名 + + * \~english + The type name of the file message + */ +#define RCFileMessageTypeIdentifier @"RC:FileMsg" +/*! + * \~chinese + 文件消息类 + + @discussion 文件消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + File message class. + + @ discussion file message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCFileMessage : RCMediaMessageContent + +/*! + * \~chinese + 文件名 + + * \~english + File name + */ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 文件大小,单位为 Byte + + * \~english + File size in Byte + */ +@property (nonatomic, assign) long long size; + +/*! + * \~chinese + 文件类型 + + * \~english + File type + */ +@property (nonatomic, copy) NSString *type; + +/*! + * \~chinese + 文件的网络地址 + + * \~english + The network address of the file + */ +@property (nonatomic, copy) NSString *fileUrl; + +/*! + * \~chinese + 文件的本地路径 + + * \~english + Local path to the file + */ +@property (nonatomic, copy) NSString *localPath; + +/*! + * \~chinese + 初始化文件消息 + + @param localPath 文件的本地路径 + @return 文件消息对象 + + * \~english + Initialize file message. + + @param localPath Local path to the file. + @ return file message object. + */ ++ (instancetype)messageWithFile:(NSString *)localPath; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFileUtility.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFileUtility.h new file mode 100644 index 0000000..fcccf6a --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFileUtility.h @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCFileUtility.h + +#ifndef __RCFileUtility +#define __RCFileUtility + +#import "RCStatusDefine.h" + +@interface RCFileUtility : NSObject + +/*! + * \~chinese + 设置文件媒体类型 + + @return 文件类型 + + * \~english + Set file media type. + + @ return file type. + */ ++ (NSString *)getMimeType:(RCMediaType)fileType; + +/*! + * \~chinese + 获取上传文件名称 + + @return 文件媒体类型 + + * \~english + Get the name of the uploaded file. + + @ return file media type. + */ ++ (NSString *)generateKey:(NSString *)mimeType; + +/*! + * \~chinese + 生成下载的文件路径 + + @return 文件名称 + + * \~english + Generate the downloaded file path. + + @ return file name. + */ ++ (NSString *)getFileName:(NSString *)imgUrl + conversationType:(RCConversationType)conversationType + mediaType:(RCMediaType)mediaType + targetId:(NSString *)targetId; + +/*! + * \~chinese + 根据文件 URL 获取 MD5 key + + @return key + + * \~english + Get MD5 key according to file URL. + + @ return key. + */ ++ (NSString *)getFileKey:(NSString *)fileUri; + +/*! + * \~chinese + 根据文件类型获取文件夹名称 + + @return 文件夹名称 + + * \~english + Gets folder name according to file type. + + @ return folder name + */ ++ (NSString *)getMediaDir:(RCMediaType)fileType; + +/*! + * \~chinese + 根据会话类型获取存储的文件夹名称 + + @return 文件夹名称 + + * \~english + Get the stored folder name based on the conversation type. + + @ return folder name. + */ ++ (NSString *)getCateDir:(RCConversationType)categoryId; + +/*! + * \~chinese + 文件是否存在 + + @return 是否存在 + + * \~english + Whether the file exists. + + @ return exist or not +*/ ++ (BOOL)isFileExist:(NSString *)fileName; + +/*! + * \~chinese + 存储数据到指定路径 + + @param filePath 文件存储路径 + @param content 存储数据 + @return 存储成功与否的结果 + + * \~english + Store data to the specified path. + + @param filePath File storage path. + @param content Store data. + @ return store the result of success or not. + */ ++ (BOOL)saveFile:(NSString *)filePath content:(NSData *)content; + +/*! + * \~chinese + 文件唯一存储地址 + + * \~english + Unique storage address of the file. + */ ++ (NSString *)getUniqueFileName:(NSString *)baseFileName; + +/*! + * \~chinese + 根据文件名获取文件类型 + + @param fileName 文件名,需要带扩展名 + + * \~english + Get the file type based on the file name. + + @param fileName File name with extension name + */ ++ (NSString *)getTypeName:(NSString *)fileName; + +/*! + * \~chinese + 根据文件 URL 获取文件本地存储路径 + + @return 文件本地存储路径 + + * \~english + Get the local storage path of the file according to the file URL. + + @ return file local storage path. + */ ++ (NSString *)getFileLocalPath:(NSString *)fileUri; + +/*! + * \~chinese + 关联文件远端 URL 和本地路径 + * + * \~english + Associate file remote URL and local path. + */ ++ (void)setFileLocalPath:(NSString *)localPath fileUri:(NSString *)fileUri; +/*! + * \~chinese + 获取小视频文件缓存路径 + + * \~english + Get the cache path of small video File. + */ ++ (NSString *)getSightCachePath:(NSString *)sightUrl; +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFwLog.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFwLog.h new file mode 100644 index 0000000..c9849f2 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCFwLog.h @@ -0,0 +1,91 @@ +// +// RCFwLog.h +// MacLogTest +// +// Created by ZhangLei on 26/02/2018. +// Copyright © 2018 RongCloud. All rights reserved. +// + +#import + +#define __FILE_STRING__ [NSString stringWithUTF8String:__FILE__] +#define __GET_FILENAME__ \ + [__FILE_STRING__ substringFromIndex:[__FILE_STRING__ rangeOfString:@"/" options:NSBackwardsSearch].location + 1] + +#define RCLogR(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_R type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogF(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_F type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogE(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_E type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogW(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_W type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogI(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_I type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogD(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_D type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] +#define RCLogV(k, ...) \ + [[RCFwLog getInstance] write:RC_Level_V type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__] + +#define FwLogR(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_R type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogF(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_F type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogE(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_E type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogW(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_W type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogI(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_I type:p tag:t keys:k, ##__VA_ARGS__] +#define FwLogD(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_D type:p tag:t keys:k, ##__VA_ARGS__] + +typedef NS_ENUM(NSInteger, RCFwLogLevel) { + RC_Level_R = -1,//Record + RC_Level_N = 0,//None + RC_Level_F = 1,//Fatal + RC_Level_E = 2,//Error + RC_Level_W = 3,//Warn + RC_Level_I = 4,//Info + RC_Level_D = 5,//Debug + RC_Level_V = 6//Verbose +}; + +typedef NS_OPTIONS(NSUInteger, RCLogType) { + RC_Type_APP = 1 << 0, // User interface. + RC_Type_PTC = 1 << 1, // Protocol. + RC_Type_ENV = 1 << 2, + RC_Type_DET = 1 << 3, + RC_Type_CON = 1 << 4, + RC_Type_RCO = 1 << 5, + RC_Type_CRM = 1 << 6, + RC_Type_MSG = 1 << 7, // Message. + RC_Type_MED = 1 << 8, // Media file. + RC_Type_LOG = 1 << 9, + RC_Type_DEB = 1 << 10, // Debug log. + RC_Type_CRS = 1 << 11, // Crash stack. + RC_Type_RTC = 1 << 12 // RTC. +}; + +@interface RCFwLog : NSObject + +// should be call init first, otherwise getInstance will return nil. ++ (void)init:(NSString *)appKey sdkVer:(NSString *)sdkVer; ++ (instancetype)getInstance; + ++ (void)setLogMonitor:(NSInteger)value; ++ (void)setToken:(NSString *)token; ++ (void)setUserId:(NSString *)userId; ++ (void)setLogListener:(void (^)(NSString *log))logBlock; ++ (void)setConsoleLogLevel:(RCFwLogLevel)level; ++ (NSString *)getIpWithHost:(NSString *)hostName; ++ (void)setRcDebugLogLevel:(NSInteger)rcDebugLogLevel; ++ (void)setRcDebugLogMaxSize:(long long)rcDebugLogMaxSize; ++ (void)startRealTimelog; +- (void)uploadLog:(void (^)(int code))errorBlock; +- (void)uploadDebugLog; +- (void)write:(RCFwLogLevel)level + type:(RCLogType)type + tag:(NSString *)tag + keys:(NSString *)keys, ... NS_FORMAT_FUNCTION(4, 5); + +- (void)write:(RCFwLogLevel)level + type:(RCLogType)type + tag:(NSString *)tag + keys:(NSArray *)keys + values:(NSArray *)vals; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGIFMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGIFMessage.h new file mode 100644 index 0000000..b921071 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGIFMessage.h @@ -0,0 +1,107 @@ +// +// RCGIFMessage.h +// RongIMLib +// +// Created by liyan on 2018/12/20. +// Copyright © 2018 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + * \~chinese + GIF 消息的类型名 + + * \~english + Type name of the GIF message + */ +#define RCGIFMessageTypeIdentifier @"RC:GIFMsg" +/*! + * \~chinese + GIF 消息 + @discussion GIF 消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + GIF message. + @ discussion GIF message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCGIFMessage : RCMediaMessageContent + +/*! + * \~chinese + GIF 图的大小,单位字节 + + * \~english + The size of the GIF graph, in bytes + */ +@property (nonatomic, assign) long long gifDataSize; + +/*! + * \~chinese + GIF 图的宽 + + * \~english + The width of GIF graphs + */ +@property (nonatomic, assign) long width; + +/*! + * \~chinese + GIF 图的高 + + * \~english + The height of GIF graph + */ +@property (nonatomic, assign) long height; + +/*! + * \~chinese + 初始化 GIF 消息 + + @param gifImageData GIF 图的数据 + @param width GIF 的宽 + @param height GIF 的高 + + @return GIF 消息对象 + + * \~english + Initialize GIF messages. + + @param gifImageData Data of GIF diagram. + @param width Width of GIF. + @param height The height of GIF. + + @ return GIF message object. + */ ++ (instancetype)messageWithGIFImageData:(NSData *)gifImageData width:(long)width height:(long)height; + +/*! + * \~chinese + 初始化 GIF 消息 + + @param gifURI GIF 的本地路径 + @param width GIF 的宽 + @param height GIF 的高 + + @return GIF 消息对象 + + * \~english + Initialize GIF messages. + + @param gifURI Local path to GIF. + @param width Width of GIF. + @param height The height of GIF. + + @ return GIF message object. + */ ++ (instancetype)messageWithGIFURI:(NSString *)gifURI width:(long)width height:(long)height; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroup.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroup.h new file mode 100644 index 0000000..01674b5 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroup.h @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCGroup.h +// Created by Heq.Shinoda on 14-9-6. + +#import + +/*! + * \~chinese + 群组信息类 + + * \~english + Group information class + */ +@interface RCGroup : NSObject + +/*! + * \~chinese + 群组 ID + + * \~english + Group ID + */ +@property (nonatomic, copy) NSString *groupId; + +/*! + * \~chinese + 群组名称 + + * \~english + Group name + */ +@property (nonatomic, copy) NSString *groupName; + +/*! + * \~chinese + 群组头像的 URL + + * \~english + URL of group portrait + */ +@property (nonatomic, copy) NSString *portraitUri; + +/*! + * \~chinese + 群组信息的初始化方法 + + @param groupId 群组 ID + @param groupName 群组名称 + @param portraitUri 群组头像的 URL + @return 群组信息对象 + + * \~english + Initialization method of group information. + + @param groupId Group ID. + @param groupName Group name. + @param portraitUri URL of group portrait. + @ return Group Information object. + */ +- (instancetype)initWithGroupId:(NSString *)groupId groupName:(NSString *)groupName portraitUri:(NSString *)portraitUri; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupMessageReaderV2.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupMessageReaderV2.h new file mode 100644 index 0000000..df007f0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupMessageReaderV2.h @@ -0,0 +1,38 @@ +// +// RCMessageReadUser.h +// RongIMLibCore +// +// Created by RongCloud on 2021/2/22. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import + +/** + * \~chinese + 已读用户对象 + + * \~english + Read user object + */ +@interface RCGroupMessageReaderV2 : NSObject + +/** + * \~chinese + 已读用户 id + + * \~english + Read user id + */ +@property (nonatomic, copy) NSString *userId; + +/** + * \~chinese + 已读时间 + + * \~english + Read time + */ +@property (nonatomic, assign) long long readTime; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupNotificationMessage.h new file mode 100644 index 0000000..bac2ec3 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupNotificationMessage.h @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCGroupNotificationMessage.h +// Created by xugang on 14/11/24. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 群组通知消息的类型名 + + * \~english + Type name of the group notification message + */ +#define RCGroupNotificationMessageIdentifier @"RC:GrpNtf" + +/*! + * \~chinese + 有成员加入群组的通知 + + * \~english + Notice of members joining the group + */ +#define GroupNotificationMessage_GroupOperationAdd @"Add" +/*! + * \~chinese + 有成员退出群组的通知 + + * \~english + Notice of exit of a member from the group + */ +#define GroupNotificationMessage_GroupOperationQuit @"Quit" +/*! + * \~chinese + 有成员被踢出群组的通知 + + * \~english + Notice that a member has been kicked out of the group + */ +#define GroupNotificationMessage_GroupOperationKicked @"Kicked" +/*! + * \~chinese + 群组名称发生变更的通知 + + * \~english + Notification of a change in the group name + */ +#define GroupNotificationMessage_GroupOperationRename @"Rename" +/*! + * \~chinese + 群组公告发生变更的通知 + + * \~english + Notice of a change in the group announcement + */ +#define GroupNotificationMessage_GroupOperationBulletin @"Bulletin" + +/*! + * \~chinese + 群组通知消息类 + + @discussion 群组通知消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Group notification message class. + + @ discussion group notification message class, which is stored but will not be counted as unread messages. + + @ remarks notification message + */ +@interface RCGroupNotificationMessage : RCMessageContent + +/*! + * \~chinese + 群组通知的当前操作名 + + @discussion + 群组通知的当前操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。 + 预定义的操作名:GroupNotificationMessage_GroupOperationAdd、GroupNotificationMessage_GroupOperationQuit、GroupNotificationMessage_GroupOperationKicked、GroupNotificationMessage_GroupOperationRename、GroupNotificationMessage_GroupOperationBulletin。 + + * \~english + The current operation name of the group notification. + + @ discussion + The current operation name of the group notification, you can use a predefined operation name, or any operation name that you define yourself. + Predefined operation names: GroupNotificationMessage_GroupOperationAdd, GroupNotificationMessage_GroupOperationQuit, GroupNotificationMessage_GroupOperationKicked, GroupNotificationMessage_GroupOperationRename, GroupNotificationMessage_GroupOperationBulletin. + */ +@property (nonatomic, copy) NSString *operation; + +/*! + * \~chinese + 当前操作发起用户的用户 ID + + * \~english + User ID of the user who initiated the current operation + */ +@property (nonatomic, copy) NSString *operatorUserId; + +/*! + * \~chinese + 当前操作的目标对象 + + @discussion + 当前操作的目标对象,如被当前操作目标用户的用户 ID 或变更后的群主名称等。 + + * \~english + The target object of the current operation. + + @ discussion + The target object of the current operation, such as the user ID or the changed group owner name of the target user of the current operation. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 当前操作的消息内容 + + * \~english + Message content of the current operation + */ +@property (nonatomic, copy) NSString *message; + +/*! + * \~chinese + 初始化群组通知消息 + + @param operation 群组通知的当前操作名 + @param operatorUserId 当前操作发起用户的用户 ID + @param data 当前操作的目标对象 + @param message 当前操作的消息内容 + @param extra 当前操作的附加信息 + @return 群组通知消息对象 + + @discussion 群组关系由开发者维护,所有的群组操作都由您的服务器自己管理和维护。 + 所以群组通知的操作名和目标对象、消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好UI显示即可。 + + * \~english + Initialize group notification messages. + + @param operation The current operation name of the group notification. + @param operatorUserId User ID of the user who initiated the current operation. + @param data The target object of the current operation. + @param message Message content of the current operation. + @param extra Additional information for the current operation. + @ return Group Notification message object. + + @ discussion Group relationships are maintained by developers, and all group operations are managed and maintained by your server. + Therefore, you can customize the operation name and target object, message content and extended information of the group notification, as long as your sender and receiver make a good UI display of the specific field content. + */ ++ (instancetype)notificationWithOperation:(NSString *)operation + operatorUserId:(NSString *)operatorUserId + data:(NSString *)data + message:(NSString *)message + extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptInfoV2.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptInfoV2.h new file mode 100644 index 0000000..d8172b8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptInfoV2.h @@ -0,0 +1,48 @@ +// +// RCGroupReadReceiptInfoV2.h +// RongIMLibCore +// +// Created by RongCloud on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCGroupMessageReaderV2.h" +@interface RCGroupReadReceiptInfoV2 : NSObject +/** + * \~chinese + 是否已经发送回执 + + * \~english + Whether a receipt has been sent + */ +@property (nonatomic, assign) BOOL hasRespond; + +/*! + * \~chinese + 发送回执的用户 ID 列表 + + * \~english + ID list of users who send receipts + */ +@property (nonatomic, strong) NSArray *readerList; + +/** + * \~chinese + * 已读人数 + * + * \~english + * Number of people read + */ +@property (nonatomic, assign) int readCount; + +/** + * \~chinese + * 群内总人数 + * + * \~english + * Total number of people in the group + */ +@property (nonatomic, assign) int totalCount; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Manager.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Manager.h new file mode 100644 index 0000000..6bf9122 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Manager.h @@ -0,0 +1,90 @@ +// +// RCGroupReadReceiptV2Manager.h +// RongIMLibCore +// +// Created by RongCloud on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import "RCGroupMessageReaderV2.h" +#import "RCMessage.h" +#import "RCGroupReadReceiptV2Protocol.h" +@interface RCGroupReadReceiptV2Manager : NSObject +/*! + * \~chinese + 获取单例类 + + * \~english + Get singleton class. + */ ++ (instancetype)sharedManager; + +/*! + * \~chinese + 群已读回执代理 + + * \~english + Group read receipt agent + */ +@property (nonatomic, weak) id groupReadReceiptV2Delegate; + +/*! + * \~chinese + 发送阅读回执 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param channelId 所属会话的业务标识 + @param messageList 已经阅读了的消息列表 + @param successBlock 发送成功的回调 + @param errorBlock 发送失败的回调[nErrorCode: 失败的错误码] + + @discussion 当用户阅读了需要阅读回执的消息,可以通过此接口发送阅读回执,消息的发送方即可直接知道那些人已经阅读。 + + @remarks 高级功能 + + * \~english + Send a reading receipt. + + @param conversationType Conversation type + @param targetId conversation ID. + @param channelId Business identity of the conversation to which it belongs. + @param messageList List of messages that have been read. + @param successBlock Callback for successful sending + @param errorBlock Callback for failed sending [nErrorCode: Error code of failure] + + @ discussion when a user reads a message that needs to be read, you can send a reading receipt through this interface, and the sender of the message can directly know who has read it. + + @ remarks advanced functions + */ +- (void)sendReadReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageList:(NSArray *)messageList + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; + +/*! + * \~chinese + 获取群消息已读用户列表 + + @param message 消息体 + @param successBlock 同步成功的回调 + @param errorBlock 同步失败的回调[nErrorCode: 失败的错误码] + + @remarks 高级功能 + + * \~english + Get group message read user list. + + @param message Message body. + @param successBlock Callback for successful synchronization. + @param errorBlock Callback for failed synchronization [nErrorCode: Error code of failure]. + + @ remarks Advanced functions + */ +- (void)getGroupMessageReaderList:(RCMessage *)message + success:(void (^)(NSArray *readerList, int totalCount))successBlock + error:(void (^)(RCErrorCode nErrorCode))errorBlock; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Protocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Protocol.h new file mode 100644 index 0000000..8b50bc9 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCGroupReadReceiptV2Protocol.h @@ -0,0 +1,42 @@ +// +// RCGroupReadReceiptV2Protocol.h +// RongIMLibCore +// +// Created by RongCloud on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#ifndef RCGroupReadReceiptV2Protocol_h +#define RCGroupReadReceiptV2Protocol_h + +@protocol RCGroupReadReceiptV2Delegate + +/*! + * \~chinese + 消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数) + @param conversationType conversationType + @param targetId targetId + @param channelId 所属会话的业务标识 + @param messageUId 请求已读回执的消息ID + @param readCount 已读用户数 + @param totalCount 群内总用户数 + + * \~english + Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId). + @param conversationType ConversationType + @param targetId TargetId + @param channelId Business identity of the conversation to which it belongs + @param messageUId Message ID requesting read receipt + @param readCount Number of read users + @param totalCount Total number of users in the group + */ +- (void)onMessageReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + channelId:(NSString *)channelId + messageUId:(NSString *)messageUId + readCount:(int)readCount + totalCount:(int)totalCount; + +@end + +#endif /* RCGroupReadReceiptV2Protocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCHQVoiceMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCHQVoiceMessage.h new file mode 100644 index 0000000..35f2fc9 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCHQVoiceMessage.h @@ -0,0 +1,68 @@ +// +// RCHQVoiceMessage.h +// RongIMLib +// +// Created by Zhaoqianyu on 2019/5/16. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 高清语音消息类型名 + + * \~english + HD voice message type name + */ +#define RCHQVoiceMessageTypeIdentifier @"RC:HQVCMsg" + +NS_ASSUME_NONNULL_BEGIN +/*! + * \~chinese + 高清语音消息类 + + @discussion 高清语音消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + High definition voice message class. + + @ discussion HD voice message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCHQVoiceMessage : RCMediaMessageContent + +/*! + * \~chinese + 语音消息的时长,以秒为单位 + + * \~english + The duration of the voice message, in seconds + */ +@property (nonatomic, assign) long duration; + +/*! + * \~chinese + 初始化高清语音消息 + + @param localPath 语音的本地路径 + @param duration 语音时长,以秒为单位 + + @return 语音消息对象 + + * \~english + Initialize HD voice messages. + + @param localPath Local path of voice + @param duration Voice duration in seconds + + @ return voice message object + */ ++ (instancetype)messageWithPath:(NSString *)localPath duration:(long)duration; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCHistoryMessageOption.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCHistoryMessageOption.h new file mode 100644 index 0000000..7a74e8b --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCHistoryMessageOption.h @@ -0,0 +1,64 @@ +// +// RCHistoryMessageOption.h +// RongIMLibCore +// +// Created by RongCloud on 2021/4/20. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import + +/** + * \~chinese + 拉取顺序 + RCHistoryMessageOrderDesc - 降序 + RCHistoryMessageOrderAsc - 升序 + + * \~english + Pull sequence. + RCHistoryMessageOrderDesc-descending. + RCHistoryMessageOrderAsc-ascending order. + */ +typedef enum : NSUInteger { + RCHistoryMessageOrderDesc = 0, + RCHistoryMessageOrderAsc, +} RCHistoryMessageOrder; + +@interface RCHistoryMessageOption : NSObject +/** + * \~chinese + 起始的消息发送时间戳,毫秒 + 默认 0 + + * \~english + Initial message sending timestamp, millisecond. + Default 0. + */ +@property (nonatomic, assign) long long recordTime; + +/** + * \~chinese + 需要获取的消息数量, 0 < count <= 20 + 默认 0 + + * \~english + The number of messages to be obtained, 0 < count < = 20. + Default 0. + */ +@property (nonatomic, assign) NSInteger count; + +/** + * \~chinese + 拉取顺序 + RCRemoteHistoryOrderDesc: 降序,结合传入的时间戳参数,获取 recordtime 之前的消息 + RCRemoteHistoryOrderAsc: 升序,结合传入的时间戳参数,获取 recordtime 之后的消息 + 默认降序 + + * \~english + Pull sequence. + RCRemoteHistoryOrderDesc: Descending order, the passed timestamp parameters are combined to get the messages before recordtime. + RCRemoteHistoryOrderAsc: Ascending order, the passed timestamp parameters are combined to get the message after recordtime + Default descending order. + */ +@property (nonatomic, assign) RCHistoryMessageOrder order; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCIMClientProtocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCIMClientProtocol.h new file mode 100644 index 0000000..6ce97d4 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCIMClientProtocol.h @@ -0,0 +1,529 @@ +// +// RCIMClientProtocol.h +// RongIMLib +// +// Created by LiFei on 2020/4/29. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#ifndef RCIMClientProtocol_h +#define RCIMClientProtocol_h + +@class RCMessage; +@class RCConversationStatusInfo; + +#pragma mark - RCIMClientReceiveMessageDelegate + +/*! + * \~chinese + IMlib消息接收的监听器 + + @discussion + 设置IMLib的消息接收监听器请参考RCIMClient的setReceiveMessageDelegate:object:方法。 + + @warning 如果您使用IMlib,可以设置并实现此Delegate监听消息接收; + 如果您使用IMKit,请使用RCIM中的RCIMReceiveMessageDelegate监听消息接收,而不要使用此监听器,否则会导致IMKit中无法自动更新UI! + + * \~english + Listeners for IMlib message reception. + + @ discussion + To set the message receiving listener for IMLib, please refer to the setReceiveMessageDelegate:object: method of RCIMClient. + + @ warning If you use IMlib, you can set and implement this Delegate to listen to message reception. + If you use IMKit, use RCIMReceiveMessageDelegate in RCIM to listen to message reception instead of using this listener, otherwise you will not be able to update UI automatically in IMKit! + */ +@protocol RCIMClientReceiveMessageDelegate + +/*! + * \~chinese + 接收消息的回调方法 + + @param message 当前接收到的消息 + @param nLeft 还剩余的未接收的消息数,left>=0 + @param object 消息监听设置的key值 + + @discussion 如果您设置了IMlib消息监听之后,SDK在接收到消息时候会执行此方法。 + 其中,left为还剩余的、还未接收的消息数量。比如刚上线一口气收到多条消息时,通过此方法,您可以获取到每条消息,left会依次递减直到0。 + 您可以根据left数量来优化您的App体验和性能,比如收到大量消息时等待left为0再刷新UI。 + object为您在设置消息接收监听时的key值。 + + * \~english + Callback method for receiving messages. + + @param message Messages currently received. + @param nLeft The number of unreceived messages left, left > = 0. + @param object The key value of the message listening setting. + + @ discussion If you have set IMlib message listening, SDK will execute this method when it receives a message. + Where left is the number of messages that have not yet been received. For example, when you receive multiple messages upon being online, you can get each message in this way, and the left will decrease to 0 in turn. + You can optimize your App experience and performance based on the number of left, e.g. waiting for left to be 0 before refreshing UI when you receive a large number of messages. + Object is the key value that you set when the message is received and listeninged. + */ +- (void)onReceived:(RCMessage *)message left:(int)nLeft object:(id)object; + +@optional + +/** + * \~chinese + 接收消息的回调方法 + + @param message 当前接收到的消息 + @param nLeft 还剩余的未接收的消息数,left>=0 + @param object 消息监听设置的key值 + @param offline 是否是离线消息 + @param hasPackage SDK 拉取服务器的消息以包(package)的形式批量拉取,有 package 存在就意味着远端服务器还有消息尚未被 SDK + 拉取 + @discussion 和上面的 - (void)onReceived:(RCMessage *)message left:(int)nLeft object:(id)object 功能完全一致,额外把 + offline 和 hasPackage 参数暴露,开发者可以根据 nLeft、offline、hasPackage 来决定何时的时机刷新 UI ;建议当 hasPackage=0 + 并且 nLeft=0 时刷新 UI + @warning 如果使用此方法,那么就不能再使用 RCIM 中 - (void)onReceived:(RCMessage *)message left:(int)nLeft + object:(id)object 的使用,否则会出现重复操作的情形 + + * \~english + Callback method for receiving messages. + + @param message Messages currently received. + @param nLeft The number of unreceived messages left, left > = 0. + @param object The key value of the message listening setting. + @param offline Is it an offline message? + @param hasPackage Messages from the SDK pull server are pulled in batches in the form of packet (package). The presence of package means that there are still messages on the remote server that have not been SDK. + Pull. + @ discussion It is exactly the same as the above-(void) onReceived: (RCMessage *) message left: (int) nLeft object: (id) object function, add. + Offline and hasPackage parameters are exposed, and developers can decide when to refresh UI based on nLeft, offline and hasPackage. It is recommended that when hasPackage=0. + And refresh UI when nLeft=0. + @ warning If you use this method, you can no longer use-(void) onReceived: (RCMessage *) message left: (int) nLeft in RCIM. + The use of object: (id) object, otherwise the operation will be repeated. + */ +- (void)onReceived:(RCMessage *)message + left:(int)nLeft + object:(id)object + offline:(BOOL)offline + hasPackage:(BOOL)hasPackage; + +/*! + * \~chinese + 消息被撤回的回调方法 + + @param messageId 被撤回的消息ID + + @discussion 被撤回的消息会变更为RCRecallNotificationMessage,App需要在UI上刷新这条消息。 + + * \~english + Callback method for recalled message. + + @param messageId recalled message ID. + + @ discussion The message that is recalled will be changed to the RCrecallNotificationMessage and App shall refresh it on the UI. + */ +- (void)onMessageRecalled:(long)messageId __deprecated_msg("Use messageDidRecall:");; + +/*! + * \~chinese + 消息被撤回的回调方法 + + @param message 被撤回的消息 + + @discussion 被撤回的消息会变更为RCRecallNotificationMessage,App需要在UI上刷新这条消息。 + @discussion 和上面的 - (void)onMessageRecalled:(long)messageId 功能完全一致,只能选择其中一个使用。 + + * \~english + Callback method in which the message is recalled. + + @param message recalled news. + + @ discussion The message that is recalled will be changed to the RCrecallNotificationMessage and App shall refresh this message on the UI. + @ discussion It is exactly the same as the-(void) onMessageRecalled: (long) messageId function above, so you can only choose one to use. + */ +- (void)messageDidRecall:(RCMessage *)message; + +/*! + * \~chinese + 请求消息已读回执(收到需要阅读时发送回执的请求,收到此请求后在会话页面已经展示该 messageUId 对应的消息或者调用 + getHistoryMessages 获取消息的时候,包含此 messageUId 的消息,需要调用 sendMessageReadReceiptResponse + 接口发送消息阅读回执) + + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + + * \~english + Request message read receipt (received a request to send a receipt when you shall read, after receiving this request, the corresponding message of the messageUId has been displayed on the conversation page or called. + When getHistoryMessages Get the message, you shall call sendMessageReadReceiptResponse to include the message of this messageUId. + Interface to send messages to read receipt). + + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + */ +- (void)onMessageReceiptRequest:(RCConversationType)conversationType + targetId:(NSString *)targetId + messageUId:(NSString *)messageUId; + + +/*! + * \~chinese + 消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数) + @param messageUId 请求已读回执的消息ID + @param conversationType conversationType + @param targetId targetId + @param userIdList 已读userId列表 + + * \~english + Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId). + @param messageUId Message ID requesting read receipt. + @param conversationType ConversationType. + @param targetId TargetId. + @param userIdList Read userId list. + */ +- (void)onMessageReceiptResponse:(RCConversationType)conversationType + targetId:(NSString *)targetId + messageUId:(NSString *)messageUId + readerList:(NSMutableDictionary *)userIdList; + + +@end + +#pragma mark - RCConnectionStatusChangeDelegate + +/*! + * \~chinese + IMLib连接状态的的监听器 + + @discussion + 设置IMLib的连接状态监听器,请参考RCIMClient的setRCConnectionStatusChangeDelegate:方法。 + + @warning 如果您使用IMLib,可以设置并实现此Delegate监听连接状态变化; + 如果您使用IMKit,请使用RCIM中的RCIMConnectionStatusDelegate监听消息接收,而不要使用此监听器,否则会导致IMKit中无法自动更新UI! + + * \~english + Listeners for IMLib connection status + + @ discussion + To set the connection status listener of IMLib, please refer to the setRCConnectionStatusChangeDelegate: method of RCIMClient. + + @ warning If you use IMLib, you can set and implement this Delegate to listen to connection status changes. + If you use IMKit, use RCIMConnectionStatusDelegate in RCIM to listen to message reception instead of using this listener, otherwise you will not be able to update UI automatically in IMKit! + */ +@protocol RCConnectionStatusChangeDelegate + +/*! + * \~chinese + IMLib连接状态的的监听器 + + @param status SDK与融云服务器的连接状态 + + @discussion 如果您设置了IMLib消息监听之后,当SDK与融云服务器的连接状态发生变化时,会回调此方法。 + + * \~english + Listeners for IMLib connection status + + @param status Connection status between SDK and CVM. + + @ discussion If you set IMLib message listening, this method will be called back when the connection status between SDK and the cloud server changes. + */ +- (void)onConnectionStatusChanged:(RCConnectionStatus)status; + +@end + +#pragma mark - RCTypingStatusDelegate + +/*! + * \~chinese + IMLib输入状态的的监听器 + + @discussion 设置IMLib的输入状态监听器,请参考RCIMClient的 setRCTypingStatusDelegate:方法。 + + @warning + 如果您使用IMLib,可以设置并实现此Delegate监听消息输入状态;如果您使用IMKit,请直接设置RCIM中的 + enableTypingStatus,而不要使用此监听器,否则会导致IMKit中无法自动更新UI! + + * \~english + Listeners for IMLib input status + + @ discussion Set the input status listener of IMLib. Please refer to the setRCTypingStatusDelegate: method of RCIMClient. + + @ warning + If you use IMLib, you can set and implement this Delegate listening message input status; if you use IMKit, please directly set the. + EnableTypingStatus, instead of using this listener, otherwise the UI cannot be updated automatically in IMKit! + */ +@protocol RCTypingStatusDelegate + +/*! + * \~chinese + 用户输入状态变化的回调 + + @param conversationType 会话类型 + @param targetId 会话目标ID + @param userTypingStatusList 正在输入的RCUserTypingStatus列表(nil标示当前没有用户正在输入) + + @discussion + 当客户端收到用户输入状态的变化时,会回调此接口,通知发生变化的会话以及当前正在输入的RCUserTypingStatus列表。 + + @warning 目前仅支持单聊。 + + * \~english + Callback for user input status change. + + @param conversationType Conversation type + @param targetId conversation destination ID. + @param userTypingStatusList List of RCUserTypingStatus being entered (nil indicates that no user is currently entering). + + @ discussion + When the client receives a change in the status of the user's input, it calls back this interface to notify the changed conversation and the RCUserTypingStatus list currently being entered. + + @ warning Currently only support single chat. + */ +- (void)onTypingStatusChanged:(RCConversationType)conversationType + targetId:(NSString *)targetId + status:(NSArray *)userTypingStatusList; + +@end + +#pragma mark - RCLogInfoDelegate +/*! + * \~chinese + IMLib日志的监听器 + + @discussion + 设置IMLib日志的监听器,请参考RCIMClient的setRCLogInfoDelegate:方法。 + + @discussion 您可以通过logLevel来控制日志的级别。 + + * \~english + Listeners for IMLib logs. + + @ discussion + To set the listener for IMLib logs, please refer to the setRCLogInfoDelegate: method of RCIMClient. + + @ discussion You can control the level of logs through logLevel. + */ +@protocol RCLogInfoDelegate + +/*! + * \~chinese + IMLib日志的回调 + + @param logInfo 日志信息 + + * \~english + Callback for IMLib log. + + @param logInfo Log information. + */ +- (void)didOccurLog:(NSString *)logInfo; + +@end + +#pragma mark - RCMessageDestructDelegate + +/** + * \~chinese + IMLib阅后即焚监听器 + @discussion 设置代理请参考 RCIMClient 的 setRCMessageDestructDelegate: 方法。 + + * \~english + IMLib burns listener after reading. + @ discussion Set the proxy. Please refer to RCIMClient's setRCMessageDestructDelegate:. Method. + */ +@protocol RCMessageDestructDelegate + +/** + * \~chinese + 消息正在焚烧 + + @param message 消息对象 + @param remainDuration 剩余焚烧时间 + + * \~english + The news is burning. + + @param message Message object. + @param remainDuration Remaining burning time. + */ +- (void)onMessageDestructing:(RCMessage *)message remainDuration:(long long)remainDuration; + +@end + +#pragma mark - RCConversationDelegate + +@protocol RCConversationDelegate + +- (void)conversationDidSync; + +@end + +#pragma mark - RCConversationStatusChangeDelegate + +/** + * \~chinese + IMLib 会话状态同步监听器 + @discussion 设置代理请参考 RCIMClient 的 setRCConversationStatusChangeDelegate: 方法。 + + * \~english + IMLib conversation state synchronization listener. + @ discussion For proxy setting, please refer to RCIMClient's setRCConversationStatusChangeDelegate:. Method. + */ +@protocol RCConversationStatusChangeDelegate + +/** + * \~chinese + IMLib 会话状态同步的回调 + + @param conversationStatusInfos 改变过的会话状态的数组 + + * \~english + Callback for IMLib conversation state synchronization. + + @param conversationStatusInfos An array of changed conversation states. + */ +- (void)conversationStatusDidChange:(NSArray *)conversationStatusInfos; + +@end + +#pragma mark - RCMessageExpansionDelegate +/** + * \~chinese + 消息扩展内容变化回调 + @discussion 设置代理请参考 RCIMClient 的 messageExpansionDelegate 方法 + @discussion 代理回调在非主线程 + + * \~english + Callback for message extension content change. + @ discussion To set the proxy, please refer to the messageExpansionDelegate method of RCIMClient. + @ discussion Proxy callback on non-main thread. + */ +@protocol RCMessageExpansionDelegate +/** + * \~chinese + 消息扩展信息更改的回调 + + @param expansionDic 消息扩展信息中更新的键值对 + @param message 消息 + + @discussion expansionDic 只包含更新的键值对,不是全部的数据。如果想获取全部的键值对,请使用 message 的 expansionDic 属性。 + + * \~english + Callback for message extension information change. + + @param expansionDic Updated key-value pairs in message extension information. + @param message Message. + + @ discussion expansionDic contains only updated key-value pairs, not all data. If you want to get all the key-value pairs, use the expansionDic property of message. +*/ +- (void)messageExpansionDidUpdate:(NSDictionary *)expansionDic + message:(RCMessage *)message; + +/** + * \~chinese + 消息扩展信息删除的回调 + + @param keyArray 消息扩展信息中删除的键值对 key 列表 + @param message 消息 + + * \~english + Callback for message extension information deletion. + + @param keyArray The key list of key-value pairs deleted in the message extension information. + @param message Message. +*/ +- (void)messageExpansionDidRemove:(NSArray *)keyArray + message:(RCMessage *)message; + +@end + +#pragma mark - RCMessageInterceptor + +/** + * \~chinese + 消息拦截器 + + * \~english + Message interceptor + */ +@protocol RCMessageInterceptor + +@optional + +/** + * \~chinese + 上传多媒体内容之前的回调 + + @param message 待上传的多媒体消息 + @return 处理后的消息 + @discussion 如果返回的 message 或 message.content 为 nil,该条消息不会上传到服务,状态设置为 SentStatus_FAILED, 并回调失败 + + * \~english + Callback before uploading multimedia content. + + @param message Multimedia messages to be uploaded. + @ return processed message. + @ discussion If the returned message or message.content is nil, the message will not be uploaded to the service, the status is set to SentStatus_FAILED, and the callback fails. + */ +- (RCMessage *)mediaMessageWillUpload:(RCMessage *)message; + +/** + * \~chinese + 消息保存到数据库,发送到服务前调用此回调 + + @param message 待发送的消息 + @return 处理后的消息 + @discussion 如果返回的 message 或 message.content 为 nil,该条消息不会上传到服务,状态设置为 SentStatus_FAILED, 并回调失败 + + * \~english + The message is saved to the database and this callback is called before it is sent to the service. + + @param message Messages to be sent. + @ return processed message. + @ discussion If the returned message or message.content is nil, the message will not be uploaded to the service, the status is set to SentStatus_FAILED, and the callback fails. + */ +- (RCMessage *)messageWillSendAfterDB:(RCMessage *)message; + +/** + * \~chinese + 接收到消息准备入库前的回调,开发者可以通过此回调对消息进行自定义处理。 + + @param message 待入库的消息 + @return 处理后的消息,SDK 会将返回的消息入库并通过 RCIMClientReceiveMessageDelegate 的 onReceived 方法回调给上层 + @discussion 如果返回的 message 或 message.content 为 nil, RCIMClientReceiveMessageDelegate 的 onReceived 方法会将待入库的消息回调给上层 + + * \~english + After receiving the callback before the message is ready for storage, the developer can customize the processing of the message through this callback. + + @param message Messages waiting for storage. + @ return For the processed messages, SDK will store the returned messages into the library and call back to the upper layer through the onReceived method of RCIMClientReceiveMessageDelegate. + @ discussion If the returned message or the onReceived method whose message.content is nil, RCIMClientReceiveMessageDelegate will call back the message to be stored in the upper layer. + */ +- (RCMessage *)messageDidReceiveBeforeDB:(RCMessage *)message; + +@end + +#pragma mark - RCDownloadInterceptor + +/** + * \~chinese + 媒体文件下载拦截器 + + * \~english + Media file download interceptor + */ +@protocol RCDownloadInterceptor + +/** + * \~chinese + 下载前的回调 + + @param request request 请求 + @return request 请求,返回值不能为 nil,否则无法正常下载 + + * \~english + Callback before download. + + @param request Request request. + @ return request, the returned value cannot be nil, otherwise it cannot be downloaded normally. + */ +- (NSMutableURLRequest *)onDownloadRequest:(NSMutableURLRequest *)request; + +@end + +#endif /* RCIMClientProtocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCImageCompressConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCImageCompressConfig.h new file mode 100644 index 0000000..a28e030 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCImageCompressConfig.h @@ -0,0 +1,45 @@ +// +// RCImageCompressConfig.h +// RongIMLibCore +// +// Created by liyan on 2021/3/9. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCImageCompressConfig : NSObject + +/*! + * \~chinese + 缩略图最大尺寸 + + * \~english + Maximum size of thumbnail + */ +@property (nonatomic, assign) CGFloat maxSize; + +/*! + * \~chinese + 缩略图最小尺寸 + + * \~english + Minimum size of thumbnail + */ +@property (nonatomic, assign) CGFloat minSize; + +/*! + * \~chinese + 缩略图质量压缩比 + * + * \~english + Thumbnail mass compression ratio + */ +@property (nonatomic, assign) CGFloat quality; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCImageMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCImageMessage.h new file mode 100644 index 0000000..384ab55 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCImageMessage.h @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCImageMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMediaMessageContent.h" +#import + +/*! + * \~chinese + 图片消息的类型名 + + * \~english + The type name of the image message + */ +#define RCImageMessageTypeIdentifier @"RC:ImgMsg" + +/*! + * \~chinese + 图片消息类 + + @discussion 图片消息类,此消息会进行存储并计入未读消息数。 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @remarks 内容类消息 + + * \~english + Image message class. + + @ discussion image message class, which is stored and counted as unread messages. + + @ discussion If you want to send the original image, set the property full to YES. + + @ remarks content class message. + */ +@interface RCImageMessage : RCMediaMessageContent + +/*! + * \~chinese + 图片消息的 URL 地址 + + @discussion 发送方此字段为图片的本地路径,接收方此字段为网络 URL 地址。 + + * \~english + URL address of the image message. + + @ discussion sender this field is the local path of the image, and receiver this field is the network URL address. + */ +@property (nonatomic, copy) NSString *imageUrl; + +/*! + * \~chinese + 图片的本地路径 + + * \~english + The local path of the image. + */ +@property (nonatomic, copy) NSString *localPath; + +/*! + * \~chinese + 图片消息的缩略图 + + * \~english + A thumbnail of a image message. + */ +@property (nonatomic, strong) UIImage *thumbnailImage; + +/*! + * \~chinese + 是否发送原图 + + @discussion 在发送图片的时候,是否发送原图,默认值为 NO。 + + * \~english + Whether to send the original image or not. + + @ discussion Whether to send the original image or not when sending the image. The default value is NO. + */ +@property (nonatomic, getter=isFull) BOOL full; + +/*! + * \~chinese + 图片消息的附加信息 + + * \~english + Additional information for image messages. + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese + 图片消息的原始图片信息 + + * \~english + The original image information of the image message. + */ +@property (nonatomic, strong) UIImage *originalImage; + +/*! + * \~chinese + 图片消息的原始图片信息 + + * \~english + The original image information of the image message. + */ +@property (nonatomic, strong, readonly) NSData *originalImageData; + +/*! + * \~chinese + 初始化图片消息 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @param image 原始图片 + @return 图片消息对象 + + * \~english + Initialize image message. + + @ discussion If you want to send the original image, set the property full to YES. + + @param image Original image. + @ return image message object. + */ ++ (instancetype)messageWithImage:(UIImage *)image; + +/*! + * \~chinese + 初始化图片消息 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @param imageURI 图片的本地路径 + @return 图片消息对象 + + * \~english + Initialize image message. + + @ discussion If you want to send the original image, set the property full to YES. + + @param imageURI The local path of the image. + @ return image message object. + */ ++ (instancetype)messageWithImageURI:(NSString *)imageURI; + +/*! + * \~chinese + 初始化图片消息 + + @discussion 如果想发送原图,请设置属性 full 为 YES。 + + @param imageData 图片的原始数据 + @return 图片消息对象 + + * \~english + Initialize image message. + + @ discussion If you want to send the original image, set the property full to YES. + + @param imageData The original data of the image. + @ return image message object + */ ++ (instancetype)messageWithImageData:(NSData *)imageData; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCInformationNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCInformationNotificationMessage.h new file mode 100644 index 0000000..b8fcea8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCInformationNotificationMessage.h @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCInformationNotificationMessage.h +// Created by xugang on 14/12/4. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 通知消息的类型名 + + * \~english + The type name of the notification message + */ +#define RCInformationNotificationMessageIdentifier @"RC:InfoNtf" + +/*! + * \~chinese + 通知消息类 + + @discussion 通知消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Notification message class. + + @ discussion notification message class that this message is stored but does not count as the number of unread messages. + + @ remarks notification message + */ +@interface RCInformationNotificationMessage : RCMessageContent + +/*! + * \~chinese + 通知的内容 + + * \~english + The content of the notice + */ +@property (nonatomic, copy) NSString *message; + +/*! + * \~chinese + 初始化通知消息 + + @param message 通知的内容 + @param extra 通知的附加信息 + @return 通知消息对象 + + * \~english + Initialize notification message. + + @param message The content of the notice. + @param extra Additional information for notification. + @ return Notification message object. + */ ++ (instancetype)notificationWithMessage:(NSString *)message extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMediaMessageContent.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMediaMessageContent.h new file mode 100644 index 0000000..296debd --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMediaMessageContent.h @@ -0,0 +1,56 @@ +// +// RCMediaMessageContent.h +// RongIMLib +// +// Created by lichenfeng on 2018/11/22. +// Copyright © 2018 RongCloud. All rights reserved. +// + +#import "RCMessageContent.h" + +/** + * \~chinese + 媒体类型消息的父类 + + @discussion + SDK 中所有媒体类型消息(图片、文件等)均继承此类。 + 开发者如需将自定义的媒体类型消息上传到融云默认的服务器时必须继承此类 ( SDK 负责媒体消息的上传及上传成功后的发送,开发者自行处理消息接收后的展示) 。 + 以下属性需要子类在 encode、decode 方法中和扩展的属性一同进行处理 + + * \~english + The parent class of the media type message. + + @ discussion + All media type messages (images, files, and so on) in SDK inherit this class. + Developers who shall upload custom media type messages to RongCloud's default server must inherit this class (SDK is responsible for uploading and sending media messages successfully, and developers handle the display after receiving messages). + The following properties shall be processed by subclasses in the encode and decode methods along with the extended properties. + */ +@interface RCMediaMessageContent : RCMessageContent + +/** + * \~chinese + 媒体内容的本地路径(此属性必须有值) + + * \~english + The local path to the media content (this property must have a value). + */ +@property (nonatomic, copy) NSString *localPath; + +/** + * \~chinese + 媒体内容上传服务器后的网络地址(上传成功后 SDK 会为该属性赋值) + + * \~english + The network address after the media content is uploaded to the server (SDK will assign a value to this attribute after the upload is successful). + */ +@property (nonatomic, copy) NSString *remoteUrl; + +/** + * \~chinese + 媒体内容的文件名(如不传使用 SDK 中 downloadMediaMessage 方法下载后会默认生成一个名称) + + * \~english + The file name of the media content (if not passed, a name will be generated by default after downloading using the downloadMediaMessage method in SDK). + */ +@property (nonatomic, copy) NSString *name; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMentionedInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMentionedInfo.h new file mode 100644 index 0000000..35c338a --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMentionedInfo.h @@ -0,0 +1,84 @@ +// +// RCMentionedInfo.h +// RongIMLib +// +// Created by RongCloud on 16/7/6. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCStatusDefine.h" +#import + +/*! + * \~chinese + 消息中的 @ 提醒信息对象 + + * \~english + @ reminder information object in message + */ +@interface RCMentionedInfo : NSObject + +/*! + * \~chinese + @ 提醒的类型 + + * \~english + @ Type of reminder + */ +@property (nonatomic, assign) RCMentionedType type; + +/*! + * \~chinese + @ 的用户 ID 列表 + + @discussion 如果 type 是 @ 所有人,则可以传 nil + + * \~english + @ user ID list. + + @ discussion If type is @ all, you can pass nil. + */ +@property (nonatomic, strong) NSArray *userIdList; + +/*! + * \~chinese + 包含 @ 提醒的消息,本地通知和远程推送显示的内容 + + * \~english + Message containing @ reminder, local notifications, and content displayed by remote push. + */ +@property (nonatomic, copy) NSString *mentionedContent; + +/*! + * \~chinese + 是否 @ 了我 + + * \~english + Do you @ me? + */ +@property (nonatomic, readonly) BOOL isMentionedMe; + +/*! + * \~chinese + 初始化 @ 提醒信息 + + @param type @ 提醒的类型 + @param userIdList @ 的用户 ID 列表 + @param mentionedContent @ Push 内容 + + @return @ 提醒信息的对象 + + * \~english + Initialize @ reminder message. + + @param type @ Type of reminder + @param userIdList @ user ID list + @param mentionedContent @ Push content + + @ return @ the object of the reminder message + */ +- (instancetype)initWithMentionedType:(RCMentionedType)type + userIdList:(NSArray *)userIdList + mentionedContent:(NSString *)mentionedContent; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessage.h new file mode 100644 index 0000000..99667c8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessage.h @@ -0,0 +1,296 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#ifndef __RCMessage +#define __RCMessage +#import "RCMessageContent.h" +#import "RCReadReceiptInfo.h" +#import "RCStatusDefine.h" +#import +#import "RCMessageConfig.h" +#import "RCMessagePushConfig.h" +#import "RCGroupReadReceiptInfoV2.h" +/*! + * \~chinese + 消息实体类 + + @discussion 消息实体类,包含消息的所有属性。 + + * \~english + Message entity class. + + @ discussion message entity class, which contains all the properties of the message. + */ +@interface RCMessage : NSObject + +/*! + * \~chinese + 会话类型 + + * \~english + Conversation type + */ +@property (nonatomic, assign) RCConversationType conversationType; + +/*! + * \~chinese + 会话 ID + + * \~english + Conversation ID + */ +@property (nonatomic, copy) NSString *targetId; + +/*! + * \~chinese + 所属会话的业务标识,长度限制 20 字符 + + * \~english + Business identification of the conversation to which it belongs, with a length limit of 20 characters. + */ +@property (nonatomic, copy) NSString *channelId; + +/*! + * \~chinese + 消息的 ID + + @discussion 本地存储的消息的唯一值(数据库索引唯一值) + + * \~english + ID of the message. + + @ discussion Unique value of locally stored message (unique value of database index). + */ +@property (nonatomic, assign) long messageId; + +/*! + * \~chinese + 消息的方向 + + * \~english + The direction of the message. + */ +@property (nonatomic, assign) RCMessageDirection messageDirection; + +/*! + * \~chinese + 消息的发送者 ID + + * \~english + The sender ID of the message + */ +@property (nonatomic, copy) NSString *senderUserId; + +/*! + * \~chinese + 消息的接收状态 + + * \~english + The receiving status of the message + */ +@property (nonatomic, assign) RCReceivedStatus receivedStatus; + +/*! + * \~chinese + 消息的发送状态 + + * \~english + The sending status of the message + */ +@property (nonatomic, assign) RCSentStatus sentStatus; + +/*! + * \~chinese + 消息的接收时间(Unix 时间戳、毫秒) + + * \~english + The time the message is received (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long receivedTime; + +/*! + * \~chinese + 消息的发送时间(Unix 时间戳、毫秒) + + * \~english + The time the message is sent (Unix timestamp, milliseconds) + */ +@property (nonatomic, assign) long long sentTime; + +/*! + * \~chinese + 消息的类型名 + + * \~english + The type name of the message + */ +@property (nonatomic, copy) NSString *objectName; + +/*! + * \~chinese + 消息的内容 + + * \~english + The content of the message + */ +@property (nonatomic, strong) RCMessageContent *content; + +/*! + * \~chinese + 消息的附加字段 + + * \~english + Additional fields of the message + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese + 全局唯一 ID + + @discussion 服务器消息唯一 ID(在同一个 Appkey 下全局唯一) + + * \~english + Globally unique ID. + + @ discussion server message unique ID (globally unique under the same Appkey). + */ +@property (nonatomic, copy) NSString *messageUId; + +/*! + * \~chinese + 阅读回执状态 + + * \~english + Reading receipt status + */ +@property (nonatomic, strong) RCReadReceiptInfo *readReceiptInfo; + +/*! + * \~chinese + 群阅读回执状态 + @discussion 如果是调用 RCGroupReadReceiptV2Manager 中方法实现群已读回执功能,此参数才有效,否则请使用 readReceiptInfo 属性获取阅读回执状态 + @discussion 如果使用 IMKit,请用 readReceiptInfo 属性 + + * \~english + Group reading receipt status. + @ discussion This parameter is valid only if you call the method in RCGroupReadReceiptV2Manager to implement the group read receipt function. Otherwise, use the readReceiptInfo attribute to obtain the read receipt status. + @ discussion use the readReceiptInfo attribute if you use IMKit, + */ +@property (nonatomic, strong) RCGroupReadReceiptInfoV2 *groupReadReceiptInfoV2; + +/*! + * \~chinese + 消息配置 + + * \~english + Message configuration + */ +@property (nonatomic, strong) RCMessageConfig *messageConfig; + +/*! + * \~chinese + 消息推送配置 + + * \~english + Message push configuration + */ +@property (nonatomic, strong) RCMessagePushConfig *messagePushConfig; + +/*! + * \~chinese + 是否是离线消息,只在接收消息的回调方法中有效,如果消息为离线消息,则为 YES ,其他情况均为 NO + + * \~english + Whether it is an offline message is only valid in the callback method that receives the message. If the message is offline, it is YES. Otherwise, it is NO. + */ +@property(nonatomic, assign) BOOL isOffLine; + +/*! + * \~chinese + 消息是否可以包含扩展信息 + + @discussion 该属性在消息发送时确定,发送之后不能再做修改 + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + + * \~english + Whether the message can contain extended information. + + @ discussion This property is determined when the message is sent and cannot be modified after it is sent. + @ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information. +*/ +@property (nonatomic, assign) BOOL canIncludeExpansion; + +/*! + * \~chinese + 消息扩展信息列表 + + @discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息 + @discussion 默认消息扩展字典 key 长度不超过 32 ,value 长度不超过 64 ,单次设置扩展数量最大为 20,消息的扩展总数不能超过 300 + + * \~english + Message extension information list. + + @ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information. + @ discussion Default message extension dictionary key length does not exceed 32, value length does not exceed 64, the maximum number of extensions for a single setting is 20, and the total number of message extensions cannot exceed 300. +*/ +@property (nonatomic, strong) NSDictionary *expansionDic; + +/*! + * \~chinese + RCMessage初始化方法 + + @param conversationType 会话类型 + @param targetId 会话 ID + @param messageDirection 消息的方向 + @param content 消息的内容 + + * \~english + RCMessage initialization method. + + @ param conversationType conversation type. + @ param targetId conversation ID. + @ param messageDirection message direction + @ param content message content. + */ +- (instancetype)initWithType:(RCConversationType)conversationType + targetId:(NSString *)targetId + direction:(RCMessageDirection)messageDirection + content:(RCMessageContent *)content; + + +/*! + * \~chinese + RCMessage初始化方法(已废弃,请不要使用该接口构造消息发送) + + @param conversationType 会话类型 + @param targetId 会话 ID + @param messageDirection 消息的方向 + @param messageId 消息的 ID(如果是发送该消息初始值请设置为 -1) + @param content 消息的内容 + + * \~english + RCMessage initialization method. + + @ param conversationType conversation type. + @ param targetId conversation ID. + @ param messageDirection message direction + @ param messageId message ID + @ param content message content. + */ +- (instancetype)initWithType:(RCConversationType)conversationType + targetId:(NSString *)targetId + direction:(RCMessageDirection)messageDirection + messageId:(long)messageId + content:(RCMessageContent *)content __deprecated_msg("Use initWithType:targetId:direction:content:"); +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessageConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessageConfig.h new file mode 100644 index 0000000..c29a206 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessageConfig.h @@ -0,0 +1,29 @@ +// +// RCMessageConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/6/29. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +@interface RCMessageConfig : NSObject + +/*! + * \~chinese + 是否关闭通知 + YES: 关闭通知(不发送通知) + NO: 不关闭通知(发送通知) + 默认 NO + + * \~english + Whether to turn off notification. + YES: Turn off notifications (do not send notifications). + NO: Do not turn off notification (send notification). + Default NO + */ +@property (nonatomic, assign) BOOL disableNotification; + +@end + diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessageContent.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessageContent.h new file mode 100644 index 0000000..2b8b194 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessageContent.h @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCMessageContent.h +// Created by Heq.Shinoda on 14-6-13. + +#ifndef __RCMessageContent +#define __RCMessageContent + +#import "RCMentionedInfo.h" +#import "RCStatusDefine.h" +#import "RCUserInfo.h" +#import + +/*! + * \~chinese + 消息内容的编解码协议 + + @discussion 用于标示消息内容的类型,进行消息的编码和解码。 + 所有自定义消息必须实现此协议,否则将无法正常传输和使用。 + + * \~english + Codec protocol for message content. + + @ discussion It is used to identify the type of message content and to encode and decode the message. + All custom messages must implement this protocol, otherwise they will not be transmitted and used properly. + */ +@protocol RCMessageCoding +@required + +/*! + * \~chinese + 将消息内容序列化,编码成为可传输的json数据 + + @discussion + 消息内容通过此方法,将消息中的所有数据,编码成为json数据,返回的json数据将用于网络传输。 + + * \~english + Serialize the message content and encode it into transportable json data. + + @ discussion + Through this method, the message content encodes all the data in the message into json data, and the returned json data will be used for network transmission. + */ +- (NSData *)encode; + +/*! + * \~chinese + 将json数据的内容反序列化,解码生成可用的消息内容 + + @param data 消息中的原始json数据 + + @discussion + 网络传输的json数据,会通过此方法解码,获取消息内容中的所有数据,生成有效的消息内容。 + + * \~english + Deserialize the contents of json data and decode them to generate available message content. + + @param data Raw json data in the message. + + @ discussion + The json data transmitted over the network will be decoded by this method, all the data in the message content will be obtained, and the valid message content will be generated. + */ +- (void)decodeWithData:(NSData *)data; + +/*! + * \~chinese + 返回消息的类型名 + + @return 消息的类型名 + + @discussion 您定义的消息类型名,需要在各个平台上保持一致,以保证消息互通。 + + @warning 请勿使用@"RC:"开头的类型名,以免和SDK默认的消息名称冲突 + + * \~english + Return the type name of the message. + + @ return Type name of message. + + @ discussion The name of the message type you defined shall be consistent across platforms to ensure message interoperability. + + @ warning Do not use a type name that begins with @ "RC:", so as not to conflict with the default message name of SDK. + */ ++ (NSString *)getObjectName; + +/*! + * \~chinese + 返回可搜索的关键内容列表 + + @return 返回可搜索的关键内容列表 + + @discussion 这里返回的关键内容列表将用于消息搜索,自定义消息必须要实现此接口才能进行搜索。 + + * \~english + Return a list of searchable key content. + + @ return Return a list of key content that can be searched. + + @ discussion The list of key content returned here will be used for message search, and custom messages must implement this interface before searching. + */ +- (NSArray *)getSearchableWords; +@end + +/*! + * \~chinese + 消息内容的存储协议 + + @discussion 用于确定消息内容的存储策略。 + 所有自定义消息必须实现此协议,否则将无法正常存储和使用。 + + * \~english + Storage protocol for message content. + + @ discussion It is used to determine the storage policy for the content of the message. + All custom messages must implement this protocol, otherwise they will not be stored and used properly. + */ +@protocol RCMessagePersistentCompatible +@required + +/*! + * \~chinese + 返回消息的存储策略 + + @return 消息的存储策略 + + @discussion 指明此消息类型在本地是否存储、是否计入未读消息数。 + + * \~english + Return the storage policy of the message. + + @ return Storage policy for messages. + + @ discussion It indicates whether this message type is stored locally and counted as unread messages. + */ ++ (RCMessagePersistent)persistentFlag; +@end + +/*! + * \~chinese + 消息内容摘要的协议 + + @discussion 用于在会话列表和本地通知中显示消息的摘要。 + + * \~english + Protocol for message content digest. + + @ discussion It is used to display a digest of messages in the conversation list and in local notifications. + */ +@protocol RCMessageContentView +@optional + +/*! + * \~chinese + 返回在会话列表和本地通知中显示的消息内容摘要 + + @return 会话列表和本地通知中显示的消息内容摘要 + + @discussion + 如果您使用IMKit,当会话的最后一条消息为自定义消息时,需要通过此方法获取在会话列表展现的内容摘要; + 当App在后台收到消息时,需要通过此方法获取在本地通知中展现的内容摘要。 + + * \~english + Return a digest of the message contents displayed in the conversation list and local notifications. + + @ return conversation list and digest of messages displayed in local notifications. + + @ discussion + If you use IMKit, when the last message of the conversation is a custom message, you shall use this method to get the digest of the content displayed in the conversation list. + When App receives a message in the background, it uses this method to obtain a digest of the content presented in the local notification. + */ +- (NSString *)conversationDigest; + +@end + +/*! + * \~chinese + 消息内容的基类 + + @discussion 此类为消息实体类 RCMessage 中的消息内容 content 的基类。 + 所有的消息内容均为此类的子类,包括 SDK 自带的消息(如 RCTextMessage、RCImageMessage 等)和用户自定义的消息。 + 所有的自定义消息必须继承此类,并实现 RCMessageCoding 和 RCMessagePersistentCompatible、RCMessageContentView 协议。 + + * \~english + The base class of the message content. + + @ discussion This class is the base class for the message content in the message entity class RCMessage. + All message contents are subclasses of this class, including messages that come with SDK (such as RCTextMessage, RCImageMessage, etc.) and user-defined messages. + All custom messages must inherit this class and implement the RCMessageCoding and RCMessagePersistentCompatible, RCMessageContentView protocols. + */ +@interface RCMessageContent : NSObject + +/*! + * \~chinese + 消息内容中携带的发送者的用户信息 + + @discussion + 如果您使用IMKit,可以通过RCIM的enableMessageAttachUserInfo属性设置在每次发送消息中携带发送者的用户信息。 + + * \~english + User information of the sender carried in the message content. + + @ discussion + If you use IMKit, you can set the enableMessageAttachUserInfo property of RCIM to carry the sender's user information in each message sent. + */ +@property (nonatomic, strong) RCUserInfo *senderUserInfo; + +/*! + * \~chinese + 消息中的 @ 提醒信息 + + * \~english + @ reminder message in message. + */ +@property (nonatomic, strong) RCMentionedInfo *mentionedInfo; + +/** + * \~chinese + 设置焚烧时间 + + @discussion 默认是 0,0 代表该消息非阅后即焚消息。 + + * \~english + Set burning time. + + @ discussion The default value is 0, which means that the message will be burned immediately after it is read. + */ +@property (nonatomic, assign) NSUInteger destructDuration; + +/*! + * \~chinese + 消息的附加信息 + + * \~english + Additional information for messages. + */ +@property (nonatomic, copy) NSString *extra; + +/** + * \~chinese + 将用户信息编码到字典中 + + @param userInfo 要编码的用户信息 + @return 存有用户信息的 Dictionary + + * \~english + Encode user information into a dictionary. + + @param userInfo User information to be encoded. + @ return Dictionary with user information. + */ +- (NSDictionary *)encodeUserInfo:(RCUserInfo *)userInfo; + +/*! + * \~chinese + 将消息内容中携带的用户信息解码 + + @param dictionary 用户信息的Dictionary + + * \~english + Decode the user information carried in the message content. + + @param dictionary Dictionary of user information. + */ +- (void)decodeUserInfo:(NSDictionary *)dictionary; + +/** + * \~chinese + 将@提醒信息编码到字典中 + + @param mentionedInfo 要编码的@信息 + @return 存有@信息的 Dictionary + + * \~english + Encode @ reminder information into the dictionary. + + @param mentionedInfo @ information to be encoded. + @ return Dictionary with @ information. + */ +- (NSDictionary *)encodeMentionedInfo:(RCMentionedInfo *)mentionedInfo; + +/*! + * \~chinese + 将消息内容中携带的@提醒信息解码 + + @param dictionary @提醒信息的Dictionary + + * \~english + Decode the @ reminder information carried in the message content. + + @param dictionary @ Dictionary of reminder messages. + */ +- (void)decodeMentionedInfo:(NSDictionary *)dictionary; + +/*! + * \~chinese + 消息内容的原始json数据 + + @discussion 此字段存放消息内容中未编码的json数据。 + SDK内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为nil。 + + * \~english + The original json data of the message content. + + @ discussion This field stores unencoded json data in the message content. + The message built into SDK. If the message decoding fails, the default will store the contents of the message in this field; if the encoding and decoding are normal, this field will be set to nil. + */ +@property (nonatomic, strong, setter=setRawJSONData:) NSData *rawJSONData; + +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessagePushConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessagePushConfig.h new file mode 100644 index 0000000..355bc0c --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessagePushConfig.h @@ -0,0 +1,135 @@ +// +// RCMessagePushConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/9/15. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +#import "RCiOSConfig.h" +#import "RCAndroidConfig.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RCMessagePushConfig : NSObject + +/*! + * \~chinese + 是否屏蔽通知标题 + YES: 不显示通知标题 + NO: 显示通知标题 + + @discussion 默认情况下融云单聊消息通知标题为用户名、群聊消息为群名称,设置后不会再显示通知标题。 + @discussion 此属性只针目标用户为 iOS 平台时有效,Android 第三方推送平台的通知标题为必填项,所以暂不支持。 + + * \~english + Whether to block the notification title. + YES: Do not display notification title. + NO: Show notification title. + + @ discussion By default, the notification title of RongCloud single chat message is user name, and the group chat message is group name. After setting, the notification title will no longer be displayed. + @ discussion This attribute is valid only when the target user is iOS platform. The notification title of Android third-party push platform is required, so it is not supported for the time being. + */ +@property (nonatomic, assign) BOOL disablePushTitle; + +/*! + * \~chinese + 推送标题 + 如果没有设置,会使用下面的默认标题显示规则 + 默认标题显示规则: + 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。 + 自定义消息:默认不显示标题。 + + * \~english + Push title. + If it is not set, the following default title is used to display the rule. + The default title display rules: + Built-in message: The single chat notification title is displayed as the sender name, and the group chat notification title is displayed as the group name. + Custom message: the title is not displayed by default. + */ +@property (nonatomic, copy) NSString *pushTitle; + +/*! + * \~chinese + 推送内容 + 优先使用 MessagePushConfig 的 pushContent,如果没有,则使用 sendMessage 或者 sendMediaMessage 的 pushContent。 + + * \~english + Push content + Give priority to pushContent for MessagePushConfig, if not, use pushContent for sendMessage or sendMediaMessage. + */ +@property (nonatomic, copy) NSString *pushContent; + +/*! + * \~chinese + 远程推送附加信息 + 优先使用 MessagePushConfig 的 pushData,如果没有,则使用 sendMessage 或者 sendMediaMessage 的 pushData。 + + * \~english + Remotely push additional information. + Give priority to pushData for MessagePushConfig, if not, use pushData for sendMessage or sendMediaMessage. + */ +@property (nonatomic, copy) NSString *pushData; + +/*! + * \~chinese + 是否强制显示通知详情 + 当目标用户通过 RCPushProfile 中的 updateShowPushContentStatus 设置推送不显示消息详情时,可通过此参数,强制设置该条消息显示推送详情。 + + * \~english + Whether to force the display of notification details. + When the target user does not display the message details through the updateShowPushContentStatus setting in RCPushProfile, you can use this parameter to force the message to display the push details. + */ +@property (nonatomic, assign) BOOL forceShowDetailContent; + +/*! + * \~chinese + 推送模板 ID,设置后根据目标用户通过 SDK RCPushProfile 中的 setPushLauguageCode 设置的语言环境,匹配模板中设置的语言内容进行推送,未匹配成功时使用默认内容进行推送,模板内容在“开发者后台-自定义推送文案”中进行设置。 + 注:RCMessagePushConfig 中的 Title 和 PushContent 优先级高于模板 ID(templateId)中对应的标题和推送内容。 + + * \~english + After the ID of the push template is set, the language content set in the template is matched according to the locale set by the target user through the setPushLauguageCode in SDK RCPushProfile. If the match is not successful, the default content is pushed. The template content is set in "developer backend-Custom push copy". + Note: The Title and PushContent in RCMessagePushConfig take precedence over the corresponding title and push content in the template ID (templateId). + */ +@property (nonatomic, copy) NSString *templateId; + +/*! + * \~chinese + iOS 平台相关配置 + + * \~english + Configuration related to iOS platform + */ +@property (nonatomic, strong) RCiOSConfig *iOSConfig; + +/*! + * \~chinese + Android 平台相关配置 + + * \~english + Configuration related to Android platform + */ +@property (nonatomic, strong) RCAndroidConfig *androidConfig; + +/*! + * \~chinese + 将数组转成 messagePushConfig 的 iOSConfig 和 AndroidConfig + + * \~english + Convert arrays to iOSConfig and AndroidConfig of messagePushConfig. + */ +- (instancetype)arrayToConfig:(NSArray *)array; + +/*! + * \~chinese + 将 iOSConfig 和 AndroidConfig 转成数组 + + * \~english + Convert iOSConfig and AndroidConfig to an array. + */ +- (NSArray *)encodeIOSAndAndroidConfig; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCProfileNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCProfileNotificationMessage.h new file mode 100644 index 0000000..96cb4b1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCProfileNotificationMessage.h @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCProfileNotificationMessage.h +// Created by xugang on 14/11/28. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 公众服务账号信息变更消息的类型名 + + * \~english + The type name of the public service account information change message. + */ +#define RCProfileNotificationMessageIdentifier @"RC:ProfileNtf" + +/*! + * \~chinese + 公众服务账号信息变更消息类 + + @discussion 公众服务账号信息变更消息类,此消息会进行存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Public service account information change message class. + + @ discussion public service account information change message class, which will be stored, but will not be counted as the number of unread messages. + + @ remarks notification message + */ +@interface RCProfileNotificationMessage : RCMessageContent + +/*! + * \~chinese + 公众服务账号信息变更的操作名 + + * \~english + The operation name of the change of public service account information. + */ +@property (nonatomic, copy) NSString *operation; + +/*! + * \~chinese + 信息变更的数据,可以为任意格式,如 json 数据。 + + * \~english + Data with changed information, which can be in any format, e.g. json data. + */ +@property (nonatomic, copy) NSString *data; + +/*! + * \~chinese + 初始化公众服务账号信息变更消息 + + @param operation 信息变更的操作名 + @param data 信息变更的数据 + @param extra 信息变更的附加信息 + @return 公众服务账号信息变更消息的对象 + + * \~english + Initialize public service account information change message. + + @param operation Operation name of information change. + @param data Information changed data. + @param extra Additional information for information changes. + @ return the object of the change message for the account information of the public service. + */ ++ (instancetype)notificationWithOperation:(NSString *)operation data:(NSString *)data extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCPushProfile.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCPushProfile.h new file mode 100644 index 0000000..dba2820 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCPushProfile.h @@ -0,0 +1,118 @@ +// +// RCPushProfile.h +// RongIMLib +// +// Created by RongCloud on 16/12/26. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCStatusDefine.h" +#import + +@interface RCPushProfile : NSObject + +/** + * \~chinese + 是否显示远程推送的内容 + + * \~english + Whether to display the content of remote push + */ +@property (nonatomic, assign, readonly) BOOL isShowPushContent; + +/** + * \~chinese + 远程推送的语言 + + * \~english + The language of remote push + */ +@property (nonatomic, assign, readonly) RCPushLauguage pushLauguage; + +/** + * \~chinese + 其他端在线时,手机是否接收远程推送(多个手机端登录,最后一个会接收) + + * \~english + Whether the mobile phone receives remote push when the other end is online (multiple mobile phones log in, the last one will receive it) + */ +@property (nonatomic, assign, readonly) BOOL receiveStatus; + +/** + * \~chinese + 设置是否显示远程推送的内容 + + @param isShowPushContent 是否显示推送的具体内容( YES 显示 NO 不显示) + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set whether to display the contents of remote push. + + @param isShowPushContent Whether to display the specific content of the push (YES display NO does not display). + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)updateShowPushContentStatus:(BOOL)isShowPushContent + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 设置推送内容的自然语言 + + @param pushLauguage 设置推送内容的自然语言 + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set the natural language of push content. + + @param pushLauguage Set the natural language of push content. + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)setPushLauguage:(RCPushLauguage)pushLauguage + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock __deprecated_msg("Use setPushLauguageCode:success:error"); + + +/** + * \~chinese + 设置推送内容的自然语言 + + @param lauguage 通过 SDK 设置的语言环境,语言缩写内容格式为 (ISO-639 Language Code)_(ISO-3166 Country Codes),如:zh_CN。目前融云支持的内置推送语言为 zh_CN、en_US、ar_SA + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set the natural language of push content. + + @param lauguage Through the locale set by SDK, the format of the language abbreviation content is (ISO-639 Language Code) _ (ISO-3166 Country Codes),) such as: zh_CN. Currently, the built-in push languages supported by RongCloud are zh_CN, en_US and ar_SA. + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)setPushLauguageCode:(NSString *)lauguage + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +/** + * \~chinese + 设置 Web 端在线时,手机端是否接收推送 + + @param receiveStatus 是否接收推送( YES 接收 NO 不接收) + @param successBlock 成功回调 + @param errorBlock 失败回调 + + * \~english + Set whether the mobile phone will receive push when the Web terminal is online. + + @param receiveStatus Whether to receive push or not (YES receive NO does not receive). + @param successBlock Callback for success + @param errorBlock Callback for failure + */ +- (void)setPushReceiveStatus:(BOOL)receiveStatus + success:(void (^)(void))successBlock + error:(void (^)(RCErrorCode status))errorBlock; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCReadReceiptInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCReadReceiptInfo.h new file mode 100644 index 0000000..67cce5b --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCReadReceiptInfo.h @@ -0,0 +1,40 @@ +// +// RCReadReceiptInfo.h +// RongIMLib +// +// Created by RongCloud on 16/8/29. +// Copyright © 2016 RongCloud. All rights reserved. +// +#import "RCStatusDefine.h" +#import + +@interface RCReadReceiptInfo : NSObject + +/*! + * \~chinese + 是否需要回执消息 + + * \~english + Do you need a receipt message? + */ +@property (nonatomic, assign) BOOL isReceiptRequestMessage; + +/** + * \~chinese + 是否已经发送回执 + + * \~english + Whether a receipt has been sent + */ +@property (nonatomic, assign) BOOL hasRespond; + +/*! + * \~chinese + 发送回执的用户 ID 列表 + + * \~english + ID list of users who send receipts + */ +@property (nonatomic, strong) NSMutableDictionary *userIdList; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRecallNotificationMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRecallNotificationMessage.h new file mode 100644 index 0000000..3d21e22 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRecallNotificationMessage.h @@ -0,0 +1,89 @@ +// +// RCRecallNotificationMessage.h +// RongIMLib +// +// Created by litao on 16/7/15. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 撤回通知消息的类型名 + + * \~english + The type name of the recall notification message + */ +#define RCRecallNotificationMessageIdentifier @"RC:RcNtf" + +/*! + * \~chinese + 撤回通知消息类 + @discussion 撤回通知消息,此消息会进行本地存储,但不计入未读消息数。 + + @remarks 通知类消息 + + * \~english + Recall notification message class + @ discussion Recall notification message, which is stored locally, but does not count as the number of unread messages. + + @ remarks notification message + */ +@interface RCRecallNotificationMessage : RCMessageContent + +/*! + * \~chinese + 发起撤回操作的用户 ID + + * \~english + ID of the user who initiates the recall operation + */ +@property (nonatomic, copy) NSString *operatorId; + +/*! + * \~chinese + 撤回的时间(毫秒) + + * \~english + Time to recall (milliseconds) + */ +@property (nonatomic, assign) long long recallTime; + +/*! + * \~chinese + 原消息的消息类型名 + + * \~english + Message type name of the original message + */ +@property (nonatomic, copy) NSString *originalObjectName; + +/*! + * \~chinese + 是否是管理员操作 + + * \~english + Whether it is an administrator operation + */ +@property (nonatomic, assign) BOOL isAdmin; + +/*! + * \~chinese + 撤回的文本消息的内容 + + * \~english + The contents of the recalled text message +*/ +@property (nonatomic, copy) NSString *recallContent; + +/*! + * \~chinese + 撤回动作的时间(毫秒) + + * \~english + Time to recall the action (milliseconds). +*/ +@property (nonatomic, assign) long long recallActionTime; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCReferenceMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCReferenceMessage.h new file mode 100644 index 0000000..99c6112 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCReferenceMessage.h @@ -0,0 +1,69 @@ +// +// RCReferenceMessage.h +// RongIMLib +// +// Created by RongCloud on 2020/2/26. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import +/*! + * \~chinese + 引用消息的类型名 + + * \~english + The type name of the reference message + */ +#define RCReferenceMessageTypeIdentifier @"RC:ReferenceMsg" +/*! + * \~chinese +引用消息类 + +@discussion 引用消息类,此消息会进行存储并计入未读消息数。 + +@remarks 内容类消息 + + * \~english + Reference message class. + + @ discussion reference message class, which is stored and counted as unread messages. + + @ remarks content class message. +*/ +@interface RCReferenceMessage : RCMessageContent +/*! + * \~chinese + 引用文本 + + * \~english + Reference text + */ +@property (nonatomic, strong) NSString *content; +/*! + * \~chinese + 被引用消息的发送者 ID + + * \~english + ID of the sender of the referenced message + */ +@property (nonatomic, strong) NSString *referMsgUserId; + +/*! + * \~chinese + 被引用消息体 + + * \~english + Referenced message body + */ +@property (nonatomic, strong) RCMessageContent *referMsg; + +/*! + * \~chinese + 被引用消息的 messageUId。服务器消息唯一 ID(在同一个 Appkey 下全局唯一) + + * \~english + messageUId of refered + */ +@property (nonatomic, strong) NSString *referMsgUid; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRemoteHistoryMsgOption.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRemoteHistoryMsgOption.h new file mode 100644 index 0000000..2e0f1fd --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRemoteHistoryMsgOption.h @@ -0,0 +1,93 @@ +// +// RCRemoteHistoryMsgOption.h +// RongIMLib +// +// Created by Zhaoqianyu on 2019/7/31. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +/** + * \~chinese + 拉取顺序 + RCRemoteHistoryOrderDesc - 降序 + RCRemoteHistoryOrderAsc - 升序 + + * \~english + Pull sequence. + RCRemoteHistoryOrderDesc-descending. + RCRemoteHistoryOrderAsc-ascending order. + */ +typedef enum : NSUInteger { + RCRemoteHistoryOrderDesc = 0, + RCRemoteHistoryOrderAsc, +} RCRemoteHistoryOrder; + +NS_ASSUME_NONNULL_BEGIN + +/** + * \~chinese + RCIMClient - getRemoteHistoryMessage 接口对应的参数选项 + + * \~english + Parameter options for RCIMClient-getRemoteHistoryMessage interface. + */ +@interface RCRemoteHistoryMsgOption : NSObject + +/** + * \~chinese + 起始的消息发送时间戳,毫秒 + 默认 0 + + * \~english + Initial message sending timestamp, millisecond. + Default 0. + */ +@property (nonatomic, assign) long long recordTime; + +/** + * \~chinese + 需要获取的消息数量, 0 < count <= 20 + 默认 0 + + * \~english + The number of messages to be obtained, 0 < count < = 20. + Default 0. + */ +@property (nonatomic, assign) NSInteger count; + +/** + * \~chinese + 拉取顺序 + RCRemoteHistoryOrderDesc: 降序,结合传入的时间戳参数,获取发送时间递增的消息 + RCRemoteHistoryOrderAsc: 升序,结合传入的时间戳参数,获取发送时间递减的消息 + 默认降序 + + * \~english + Pull sequence. + RCRemoteHistoryOrderDesc: Descending order, the passed timestamp parameters are combined to get messages with an increasing sending time. + RCRemoteHistoryOrderAsc: + Ascending order, the passed timestamp parameters are combiend to get the message with decreasing sending time. + Default descending order. + */ +@property (nonatomic, assign) RCRemoteHistoryOrder order; + +/** + * \~chinese + 是否需要排重 + YES: 拉取回来的消息全部返回 + NO: 拉取回来的消息只返回本地数据库中不存在的 + 默认 NO + + * \~english + Does it shall be weighed? + YES: All the messages pulled back are returned. + NO: The pulled messages only return messages that do not exist in the local database. + Default NO + */ +@property (nonatomic, assign) BOOL includeLocalExistMessage; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCResumeableDownloader.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCResumeableDownloader.h new file mode 100644 index 0000000..a75d0ad --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCResumeableDownloader.h @@ -0,0 +1,107 @@ +// +// RCEResumeableDownloader.h +// RongEnterpriseApp +// +// Created by zhaobingdong on 2018/5/15. +// Copyright © 2018 rongcloud. All rights reserved. +// + +#import +#import "RCDownloadItem.h" + +NS_ASSUME_NONNULL_BEGIN +@class RCMessage; +@protocol RCResumeableDownloaderDelegate + +/** + * \~chinese + 下载完成后调用 + + @param item 下载任务实例 + @param path 下载任务完成后的文件路径 + @discussion 通过 itemWithMessageId: 方法获取到写下载项,不会调用该方法 + + * \~english + Called after the download is complete. + + @param item Download task instance. + @param path The file path after the download task is completed. + @ discussion through itemWithMessageId: Method Get the write download and will not call the method. + */ +- (void)downloadItem:(RCDownloadItem *)item filePath:(NSString *)path; + +@end + +@interface RCResumeableDownloader : NSObject + +/** + * \~chinese + 创建 RCResumeableDownloader 实例 + + @return 返回 RCResumeableDownloader 实例 + + * \~english + Create a RCResumeableDownloader instance. + + @return return RCResumeableDownloader instance. + */ ++ (instancetype)defaultInstance; + +/** + * \~chinese + 销毁 RCResumeableDownloader 实例 + @discussion 切换用户时调用,退出登录时调用。 + + * \~english + Destroy RCResumeableDownloader instance. + @ discussion It is called when you switch users and when you log out. + */ ++ (void)free; + +@property (nonatomic, weak) id delegate; + +/** + * \~chinese + 根据消息id 获取 RCDownloadItem 实例 + + @param msgId 消息id + @return 返回 RCDownloadItem 实例 + @discussion 仅支持文件消息,文件消息下载完成后,会自动更新消息的 content + * + * \~english + Get RCDownloadItem instance based on message id. + + @param msgId Message id. + @ return returns RCDownloadItem instance. + @ discussion Only file messages are supported. After the file messages are downloaded, the content of the messages will be updated automatically. + */ +- (RCDownloadItem *)itemWithMessageId:(long)msgId; + +/** + * \~chinese + 根据开发者指定的标识符来获取 RCDownloadItem 实例 + + @param identify 标识符 + @param url 下载地址 + @param name 文件名 + @return 返回 RCDownloadItem 的实例 + @discussion 开发者需要保证该标识符 identify 的唯一性,确保每一个存活的下载任务的标识符是不同的 + 实际下载后文件名可能会与不一致,如果存储下载文件目录下已有该文件,会在文件名后添加(1)。 + 例如 a.txt 最终下载的文件名会变为 a(1).txt 或者 a(2).txt + + * \~english + Get the RCDownloadItem instance according to the identifier specified by the developer. + + @param identify Identifier. + @param url Download address. + @param name File name. + @ return returns the instance of RCDownloadItem. + @ discussion Developers shall ensure that the identifier identify is unique and that the identifier for each surviving download task is different. + The file name may not match after the actual download. If the file already exists in the directory where the download file is stored, it will be added (1) after the file name. + For example, the file name downloaded by a.txt will change to a (1). Txt or a (2). Txt). + */ +- (RCDownloadItem *)itemWithIdentify:(NSString *)identify url:(NSString *)url fileName:(NSString *)name; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRichContentMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRichContentMessage.h new file mode 100644 index 0000000..0f2f612 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCRichContentMessage.h @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCRichContentMessage.h +// Created by Gang Li on 10/17/14. + +#import "RCMessageContent.h" +#import + +/*! + * \~chinese + 图文消息的类型名 + + * \~english + The type name of the image and text message. + */ +#define RCRichContentMessageTypeIdentifier @"RC:ImgTextMsg" + +/*! + * \~chinese + 图文消息类 + + @discussion 图文消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Image and text message class. + + @ discussion image and text message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCRichContentMessage : RCMessageContent + +/*! + * \~chinese + 图文消息的标题 + + * \~english + The title of the image-text message. + */ +@property (nonatomic, copy) NSString *title; + +/*! + * \~chinese + 图文消息的内容摘要 + + * \~english + Content digest of image and text messages + */ +@property (nonatomic, copy) NSString *digest; + +/*! + * \~chinese + 图文消息图片 URL + + * \~english + Image URL of image + */ +@property (nonatomic, copy) NSString *imageURL; + +/*! + * \~chinese + 图文消息中包含的需要跳转到的URL + + * \~english + The URL contained in the image and text message to which you shall jump to. + */ +@property (nonatomic, copy) NSString *url; + +/*! + * \~chinese + 初始化图文消息 + + @param title 图文消息的标题 + @param digest 图文消息的内容摘要 + @param imageURL 图文消息的图片URL + @param extra 图文消息的扩展信息 + @return 图文消息对象 + + * \~english + Initialize the image and text message. + + @param title The title of the image-text message. + @param digest Content digest of image and text messages. + @param imageURL image URL of image and text messages. + @param extra Extended information of image and text messages. + @ return Teletext message object. + */ ++ (instancetype)messageWithTitle:(NSString *)title + digest:(NSString *)digest + imageURL:(NSString *)imageURL + extra:(NSString *)extra; + +/*! + * \~chinese + 初始化图文消息 + + @param title 图文消息的标题 + @param digest 图文消息的内容摘要 + @param imageURL 图文消息的图片URL + @param url 图文消息中包含的需要跳转到的URL + @param extra 图文消息的扩展信息 + @return 图文消息对象 + + * \~english + Initialize the image and text message. + + @param title The title of the image-text message. + @param digest Content digest of image and text messages. + @param imageURL image URL of image and text messages. + @param url The URL contained in the image and text message to which you shall jump to. + @param extra Extended information of image and text messages. + @ return Teletext message object. + */ ++ (instancetype)messageWithTitle:(NSString *)title + digest:(NSString *)digest + imageURL:(NSString *)imageURL + url:(NSString *)url + extra:(NSString *)extra; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSearchConversationResult.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSearchConversationResult.h new file mode 100644 index 0000000..4c260a3 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSearchConversationResult.h @@ -0,0 +1,38 @@ +// +// RCSearchConversationResult.h +// RongIMLib +// +// Created by RongCloud on 16/9/29. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCConversation.h" +#import + +/*! + * \~chinese + 搜索的会话结果 + + * \~english + conversation results of the search + */ +@interface RCSearchConversationResult : NSObject + +/*! + * \~chinese + 匹配的会话对象 + + * \~english + Matching conversation object. + */ +@property (nonatomic, strong) RCConversation *conversation; + +/* + * \~chinese + 会话匹配的消息条数 + + * \~english + Number of messages matched by the conversation + */ +@property (nonatomic, assign) int matchCount; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSendMessageOption.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSendMessageOption.h new file mode 100644 index 0000000..7e08047 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSendMessageOption.h @@ -0,0 +1,26 @@ +// +// RCSendMessageOption.h +// RongIMLib +// +// Created by liyan on 2019/4/29. +// Copyright © 2019 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCSendMessageOption : NSObject + +/* + * \~chinese + 发送的消息,是否走 VOIP 推送 + + * \~english + The message sent, whether to use VOIP push or not + */ +@property (nonatomic, assign) BOOL isVoIPPush; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSightMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSightMessage.h new file mode 100644 index 0000000..cd6c479 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCSightMessage.h @@ -0,0 +1,111 @@ +// +// RCSightMessage.h +// RongIMLib +// +// Created by LiFei on 2016/12/1. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import +#import + +/*! + * \~chinese + 小视频消息的类型名 + + * \~english + The type name of the small video message. + */ +#define RCSightMessageTypeIdentifier @"RC:SightMsg" +@class AVAsset; +/** + * \~chinese + 小视频消息类 + + @discussion 小视频消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Small video message class. + + @ discussion small video message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCSightMessage : RCMediaMessageContent + +/*! + * \~chinese + 本地 URL 地址 + + * \~english + Local URL address + */ +@property (nonatomic, copy) NSString *localPath; + +/*! + * \~chinese + 网络 URL 地址 + + * \~english + Network URL address + */ +@property (nonatomic, readonly) NSString *sightUrl; + +/** + * \~chinese + 视频时长,以秒为单位 + + * \~english + Video duration (in seconds) + */ +@property (nonatomic, assign, readonly) NSUInteger duration; + +/** + * \~chinese + 小视频文件名 + + * \~english + Small video file name + */ +@property (nonatomic, copy) NSString *name; + +/** + * \~chinese + 文件大小 + + * \~english + File size + */ +@property (nonatomic, assign, readonly) long long size; + +/*! + * \~chinese + 缩略图 + + * \~english + Thumbnail image + */ +@property (nonatomic, strong, readonly) UIImage *thumbnailImage; + +/** + * \~chinese + 创建小视频消息的便利构造方法 + + @param path 视频文件本地路径 + @param image 视频首帧缩略图 + @param duration 视频时长, 以秒为单位 + @return 视频消息实例变量 + + * \~english + A convenient construction method for creating small video messages. + + @param path Local path of video file. + @param image Thumbnail of the first frame of the video. + @param duration Video duration (in seconds). + @ return video message instance variable. + */ ++ (instancetype)messageWithLocalPath:(NSString *)path thumbnail:(UIImage *)image duration:(NSUInteger)duration; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCStatusDefine.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCStatusDefine.h new file mode 100644 index 0000000..49a2dce --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCStatusDefine.h @@ -0,0 +1,2119 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCStatusDefine.h +// Created by Heq.Shinoda on 14-4-21. + +#import + +#ifndef __RCStatusDefine +#define __RCStatusDefine + +#pragma mark - Error Code + +#pragma mark RCConnectErrorCode +/*! + * \~chinese + 建立连接返回的错误码 + + * \~english + Error code returned by establishing a connection + */ +typedef NS_ENUM(NSInteger, RCConnectErrorCode) { + + /*! + * \~chinese + AppKey 错误 + + @discussion 请检查您使用的 AppKey 是否正确。 + + * \~english + AppKey error. + + @ discussion Please check that you are using the correct AppKey. + */ + RC_CONN_ID_REJECT = 31002, + + /*! + * \~chinese + Token 无效 + + @discussion 请检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey 是否一致。 + @discussion 您可能需要请求您的服务器重新获取 token,并使用新的 token 建立连接。 + + * \~english + Invalid Token. + + @ discussion Token is generally invalid for two reasons. + The first is the token error. Please check whether the AppKey used by the client initialization is consistent with the AppKey used by your server to obtain the token. + Second, the token expires because you set the token expiration time in the developer background. You shall request your server to retrieve the token and use the new token again to establish a connection. + */ + RC_CONN_TOKEN_INCORRECT = 31004, + + /*! + * \~chinese + App 校验未通过 + + @discussion 您开通了 App 校验功能,但是校验未通过 + + * \~english + AppKey does not match Token. + + @ discussion + Please check that the AppKey and Token you are using are correct and match. Generally there are three reasons. + */ + RC_CONN_NOT_AUTHRORIZED = 31005, + + /*! + * \~chinese + BundleID 不正确 + + @discussion 请检查您 App 的 BundleID 是否正确。 + + * \~english + Incorrect BundleID. + + @ discussion Please check that the BundleID of your App is correct. + */ + RC_CONN_PACKAGE_NAME_INVALID = 31007, + + /*! + * \~chinese + AppKey 被封禁或已删除 + + @discussion 请检查您使用的 AppKey 是否被封禁或已删除。 + + * \~english + AppKey is blocked or deleted. + + @ discussion Please check whether the AppKey you are using is blocked or deleted. + */ + RC_CONN_APP_BLOCKED_OR_DELETED = 31008, + + /*! + * \~chinese + 用户被封禁 + + @discussion 请检查您使用的 Token 是否正确,以及对应的 UserId 是否被封禁。 + + * \~english + Users are blocked. + + @ discussion Please check whether the Token you are using is correct and whether the corresponding UserId is blocked. + */ + RC_CONN_USER_BLOCKED = 31009, + + /*! + * \~chinese + 用户被踢下线 + + @discussion 当前用户在其他设备上登录,此设备被踢下线 + + * \~english + The user is kicked offline. + + @ discussion The current user logs in on another device, and this device is kicked offline. + */ + RC_DISCONN_KICK = 31010, + + /*! + * \~chinese + token 已过期 + + @discussion 您可能需要请求您的服务器重新获取 token,并使用新的 token 建立连接。 + + * \~english + The token has expired + + @Discussion you may need to request your server to retrieve the token and establish a connection with the new token. + */ + RC_CONN_TOKEN_EXPIRE = 31020, + + /*! + * \~chinese + 用户在其它设备上登录 + + @discussion 重连过程中当前用户在其它设备上登录 + + * \~english + The user logs in on another device. + + @ discussion The current user logs in on another device during the reconnection process. + */ + RC_CONN_OTHER_DEVICE_LOGIN = 31023, + + /*! + * \~chinese + 连接总数量超过服务设定的并发限定值 + + @discussion 私有云专属 + + * \~english + The connection exceeds the concurrency limit. + @discussion private cloud only + */ + CONCURRENT_LIMIT_ERROR = 31024, + + /*! + * \~chinese + 环境校验失败 + + @discussion 请检查 AppKey 和连接环境(开发环境/生产环境)是否匹配 + + * \~english + Environment verification failed + + @Discussion please check whether the appkey matches the connection environment (development environment / production environment) + */ + RC_CONN_CLUSTER_ERROR = 31026, + + /*! + * \~chinese + SDK 没有初始化 + + @discussion 在使用 SDK 任何功能之前,必须先 Init。 + + * \~english + SDK is not initialized. + + @ discussion It must Init before using any SDK functionality. + */ + RC_CLIENT_NOT_INIT = 33001, + + /*! + * \~chinese + 开发者接口调用时传入的参数错误 + + @discussion 请检查接口调用时传入的参数类型和值。 + + * \~english + The parameter passed in when the developer interface is called is incorrect. + + @ discussion Please check the parameter types and values passed in when the interface is called. + */ + RC_INVALID_PARAMETER = 33003, + + /*! + * \~chinese + Connection 已经存在 + + @discussion + 调用过connect之后,只有在 token 错误或者被踢下线或者用户 logout 的情况下才需要再次调用 connect。其它情况下 SDK + 会自动重连,不需要应用多次调用 connect 来保持连接。 + + * \~english + Connection already exists. + + @ discussion + After calling connect, connect is called again only if there is a token error, or the user is kicked off, or the user logs out. In other cases, SDK will automatically reconnect, and an application need not call connect multiple times to maintain the connection. + */ + RC_CONNECTION_EXIST = 34001, + + /*! + * \~chinese + 连接环境不正确(融云公有云 SDK 无法连接到私有云环境) + + @discussion 融云公有云 SDK 无法连接到私有云环境。请确认需要连接的环境,使用正确 SDK 版本。 + + * \~english + Incorrect connection environment (RongCloud public cloud SDK cannot connect to private cloud environment). + + @ discussion RongCloud Public Cloud SDK cannot connect to the private cloud environment. Please confirm the environment to which you shall connect and use the correct SDK version. + */ + RC_ENVIRONMENT_ERROR = 34005, + + /*! + * \~chinese + 连接超时。 + + @discussion 当调用 connectWithToken:timeLimit:dbOpened:success:error: 接口,timeLimit 为有效值时,SDK 在 timeLimit 时间内还没连接成功返回此错误。 + + * \~english + The connection timed out. + + @ discussion When connectWithToken:timeLimit:dbOpened:success:error: Interface is called, if timeLimit is a valid value and SDK has not been connected successfully within timeLimit time. This error is returned. + */ + RC_CONNECT_TIMEOUT = 34006, + + /*! + * \~chinese + 开发者接口调用时传入的参数错误 + + @discussion 请检查接口调用时传入的参数类型和值。 + + * \~english + The parameter passed in when the developer interface is called is incorrect. + + @ discussion Please check the parameter types and values passed in when the interface is called. + */ + RC_INVALID_ARGUMENT = -1000 +}; + +#pragma mark RCErrorCode +/*! + * \~chinese + 具体业务错误码 + + * \~english + Specific business error code + */ +typedef NS_ENUM(NSInteger, RCErrorCode) { + /*! + * \~chinese + 成功 + + * \~english + Success + */ + RC_SUCCESS = 0, + + /*! + * \~chinese + 未知错误(预留) + + * \~english + Unknown error (reserved) + */ + ERRORCODE_UNKNOWN = -1, + + /*! + * \~chinese + 已被对方加入黑名单,消息发送失败。 + + * \~english + It has been blacklisted by the other party, and the message failed to be sent. + */ + REJECTED_BY_BLACKLIST = 405, + + + /*! + * \~chinese + 上传媒体文件格式不支持 + + * \~english + Upload media file format is not supported + */ + RC_MEDIA_FILETYPE_INVALID = 34019, + + /*! + * \~chinese + 超时 + + * \~english + Timeout + */ + ERRORCODE_TIMEOUT = 5004, + + /*! + * \~chinese + 发送消息频率过高,1 秒钟最多只允许发送 5 条消息 + + * \~english + The frequency of sending messages is too high and a maximum of 5 messages are allowed to be sent per second + */ + SEND_MSG_FREQUENCY_OVERRUN = 20604, + + /*! + * \~chinese + 请求超出了调用频率限制,请稍后再试 + + @discussion 接口调用过于频繁,请稍后再试。 + + * \~english + The request exceeds the limit of call frequency. Please try again later. + + @ discussion The interface is called too frequently. Please try again later. + */ + RC_REQUEST_OVERFREQUENCY = 20607, + + /*! + * \~chinese + 当前用户不在该讨论组中 + + * \~english + The current user is not in this discussion group. + */ + NOT_IN_DISCUSSION = 21406, + + /*! + * \~chinese + 当前用户不在该群组中 + + * \~english + The current user is not in this group + */ + NOT_IN_GROUP = 22406, + + /*! + * \~chinese + 当前用户在群组中已被禁言 + + * \~english + The current user has been banned in the group + */ + FORBIDDEN_IN_GROUP = 22408, + + /*! + * \~chinese + 当前用户不在该聊天室中 + + * \~english + The current user is not in this chatroom + */ + NOT_IN_CHATROOM = 23406, + + /*! + * \~chinese + 当前用户在该聊天室中已被禁言 + + * \~english + The current user has been banned in this chatroom + */ + FORBIDDEN_IN_CHATROOM = 23408, + + /*! + * \~chinese + 当前用户已被踢出并禁止加入聊天室。被禁止的时间取决于服务端调用踢出接口时传入的时间。 + + * \~english + The current user has been kicked out and banned from the chatroom. The prohibited time depends on the time passed in when the server invokes kicking out of the interface + */ + KICKED_FROM_CHATROOM = 23409, + + /*! + * \~chinese + 聊天室不存在 + + * \~english + chatroom does not exist + */ + RC_CHATROOM_NOT_EXIST = 23410, + + /*! + * \~chinese + 聊天室成员超限,默认聊天室成员没有人数限制,但是开发者可以提交工单申请针对 App Key + 进行聊天室人数限制,在限制人数的情况下,调用加入聊天室的接口时人数超限,就会返回此错误码 + + * \~english + chatroom membership exceeds the limit. By default, there is no limit on the number of chatroom members, but developers can submit a ticket to apply for App Key. + Limit the number of people in a chatroom. In the case of a limit, if the number of people exceeds the limit when calling the interface to join the chatroom, this error code will be returned. + */ + RC_CHATROOM_IS_FULL = 23411, + + /*! + * \~chinese + 聊天室接口参数无效。请确认参数是否为空或者有效。 + + * \~english + The chatroom interface parameter is invalid. Please confirm that the parameter is empty or valid. + */ + RC_PARAMETER_INVALID_CHATROOM = 23412, + + /*! + * \~chinese + 聊天室云存储业务未开通 + + * \~english + The chatroom cloud storage service has not been activated. + */ + RC_ROAMING_SERVICE_UNAVAILABLE_CHATROOM = 23414, + + /*! + * \~chinese + 超过聊天室的最大状态设置数,1 个聊天室默认最多设置 100 个 + + * \~english + The maximum number of status settings for a chatroom is exceeded and a maximum of 100 status settings can be set for 1 chatroom by default. + */ + RC_EXCCED_MAX_KV_SIZE = 23423, + + /*! + * \~chinese + 聊天室中非法覆盖状态值,状态已存在,没有权限覆盖 + + * \~english + The status value is illegally overwritten in the chatroom. The status already exists and there is no permission to overwrite it. + */ + RC_TRY_OVERWRITE_INVALID_KEY = 23424, + + /*! + * \~chinese + 超过聊天室中状态设置频率,1 个聊天室 1 秒钟最多设置和删除状态 100 次 + + * \~english + The maximum frequency of status setting in a chatroom is exceeded. The status for a chatroom can be set and deleted for up to 100 times per second. + */ + RC_EXCCED_MAX_CALL_API_SIZE = 23425, + + /*! + * \~chinese + 聊天室状态存储功能没有开通,请联系商务开通 + + * \~english + The chatroom status storage function is not enabled, please contact commerce person to open. + */ + RC_KV_STORE_NOT_AVAILABLE = 23426, + + /*! + * \~chinese + 聊天室状态值不存在 + + * \~english + The chatroom status value does not exist. + */ + RC_KEY_NOT_EXIST = 23427, + + /*! + * \~chinese + 操作跟服务端同步时出现问题,有可能是操作过于频繁所致。如果出现该错误,请延时 0.5s 再试 + + * \~english + There is a problem when the operation is synchronized with the server, which may be caused by the frequent operation. If this error occurs, please delay 0.5s and try again + */ + RC_SETTING_SYNC_FAILED = 26002, + + /*! + * \~chinese + 小视频服务未开通。可以在融云开发者后台中开启该服务。 + + * \~english + Small video service is not enabled. The service can be started in the background of rongyun developers. + */ + RC_SIGHT_SERVICE_UNAVAILABLE = 26101, + + /*! + * \~chinese + 聊天室状态未同步完成 + 刚加入聊天室时调用获取 KV 接口,极限情况下会存在本地数据和服务器未同步完成的情况,建议延时一段时间再获取 + + * \~english + chatroom status is not completed synchronously. + Call the interface to get KV when you just join the chatroom. In extreme cases, the local data and the server are not completed synchronously. It is recommended to delay the acquisition for a period of time. + */ + RC_KV_STORE_NOT_SYNC = 34004, + + /*! + * \~chinese + 聊天室被重置 + + * \~english + The chatroom is reset + */ + RC_CHATROOM_RESET = 33009, + + /*! + * \~chinese + 当前连接不可用(连接已经被释放) + + * \~english + The current connection is not available (the connection has been released). + */ + RC_CHANNEL_INVALID = 30001, + + /*! + * \~chinese + 当前连接不可用 + + * \~english + The current connection is not available. + */ + RC_NETWORK_UNAVAILABLE = 30002, + + /*! + * \~chinese + 客户端发送消息请求,融云服务端响应超时。 + + * \~english + The client sends a message request, and the RongCloud server responds to a timeout. + */ + RC_MSG_RESPONSE_TIMEOUT = 30003, + + /*! + * \~chinese + SDK 没有初始化 + + @discussion 在使用 SDK 任何功能之前,必须先 Init。 + + * \~english + SDK is not initialized. + + @ discussion It must Init before using any SDK functionality. + */ + CLIENT_NOT_INIT = 33001, + + /*! + * \~chinese + 数据库错误 + + @discussion 连接融云的时候 SDK 会打开数据库,如果没有连接融云就调用了业务接口,因为数据库尚未打开,有可能出现该错误。 + @discussion 数据库路径中包含 userId,如果您获取 token 时传入的 userId 包含特殊字符,有可能导致该错误。userId + 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 64 字节。 + + * \~english + Database error. + + @ discussion The database will be opened when connecting to the cloud melting. If you do not connect to the cloud melting, the business interface will be called because the database has not been opened yet, and this error may occur. + @ discussion The database path contains userId, if the userId passed in when you get the token contains special characters, which may cause this error. UserId. + The combination of uppercase and lowercase letters, numbers and some special symbols + =-_ is supported, with a maximum length of 64 bytes. + */ + DATABASE_ERROR = 33002, + + /*! + * \~chinese + 开发者接口调用时传入的参数错误 + + @discussion 请检查接口调用时传入的参数类型和值。 + + * \~english + The parameter passed in when the developer interface is called is incorrect. + + @ discussion Please check the parameter types and values passed in when the interface is called. + */ + INVALID_PARAMETER = 33003, + + /*! + * \~chinese + 历史消息云存储业务未开通。可以在融云开发者后台中开启该服务。 + + * \~english + The cloud storage service of historical messages has not been activated. You can enable this service in the backend of RongCloud developer. + */ + MSG_ROAMING_SERVICE_UNAVAILABLE = 33007, + + /*! + * \~chinese + 标签不存在 + + * \~english + Tag does not exist + */ + RC_TAG_NOT_EXIST = 33100, + + /*! + * \~chinese + 标签已存在 + + * \~english + Tag already exists + */ + RC_TAG_ALREADY_EXISTS = 33101, + + /*! + * \~chinese + 会话中不存在对应标签 + + * \~english + There is no corresponding tag in the conversation + */ + RC_TAG_INVALID_FOR_CONVERSATION = 33102, + + /*! + * \~chinese + 公众号非法类型,针对会话类型:ConversationType_APPSERVICE + + * \~english + Illegal official account type, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_ERROR_TYPE = 29201, + + /*! + * \~chinese + 公众号默认已关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account has been followed by default, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_DEFFOLLOWED = 29102, + + /*! + * \~chinese + 公众号已关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account has been followed, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_FOLLOWED = 29103, + + /*! + * \~chinese + 公众号默认已取消关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account has been unfollowed by default, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_DEFUNFOLLOWED = 29104, + + /*! + * \~chinese + 公众号已经取消关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + The official account has been unfollowed, for conversation type: ConversationType_APPSERVICE + */ + RC_APP_PUBLICSERVICE_UNFOLLOWED = 29105, + + /*! + * \~chinese + 公众号未关注,针对会话类型:ConversationType_APPSERVICE + + * \~english + Official account is not followed, for conversation type: ConversationType_APPSERVICE. + */ + RC_APP_PUBLICSERVICE_UNFOLLOW = 29106, + + /*! + * \~chinese + 公众号非法类型,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Illegal official account type, for conversation type: ConversationType_PUBLICSERVICE + */ + INVALID_PUBLIC_NUMBER = 29201, + + /*! + * \~chinese + 公众号默认已关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account has been followed by default, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_DEFFOLLOWED = 29202, + + /*! + * \~chinese + 公众号已关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account has been following, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_FOLLOWED = 29203, + + /*! + * \~chinese + 公众号默认已取消关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account has been unfollowed by default, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_DEFUNFOLLOWED = 29204, + + /*! + * \~chinese + 公众号已经取消关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + The official account has been unfollowed, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_UNFOLLOWED = 29205, + + /*! + * \~chinese + 公众号未关注,针对会话类型:ConversationType_PUBLICSERVICE + + * \~english + Official account is not followed, for conversation type: ConversationType_PUBLICSERVICE + */ + RC_PUBLICSERVICE_UNFOLLOW = 29206, + + /*! + * \~chinese + 消息大小超限,消息体(序列化成 json 格式之后的内容)最大 128k bytes。 + + * \~english + The message size exceeds the limit, and the message body (the content after serialization into json format) is up to 128k bytes + */ + RC_MSG_SIZE_OUT_OF_LIMIT = 30016, + + /*! + * \~chinese + 撤回消息参数无效。请确认撤回消息参数是否正确的填写。 + + * \~english + The recall message parameter is invalid. Please make sure that the recall message parameters are filled in correctly. + */ + RC_RECALLMESSAGE_PARAMETER_INVALID = 25101, + + /*! + * \~chinese + push 设置参数无效。请确认是否正确的填写了 push 参数。 + + * \~english + Invalid push setting parameter. Please make sure that the push parameter is entered correctly. + */ + RC_PUSHSETTING_PARAMETER_INVALID = 26001, + + /*! + * \~chinese + 用户标签个数超限,最多支持添加 20 个标签 + + * \~english + The number of user tags exceeds the limit and a maximum of 20 tags can be added. + */ + RC_TAG_LIMIT_EXCEED = 26004, + + /*! + * \~chinese + 操作被禁止。 此错误码已被弃用。 + + * \~english + The operation is prohibited. This error code has been deprecated. + */ + RC_OPERATION_BLOCKED = 20605, + + /*! + * \~chinese + 操作不支持。仅私有云有效,服务端禁用了该操作。 + + * \~english + The operation is not supported. Only the private cloud is valid, and the server disables this operation. + */ + RC_OPERATION_NOT_SUPPORT = 20606, + + /*! + * \~chinese + 发送的消息中包含敏感词 (发送方发送失败,接收方不会收到消息) + + * \~english + The message sent contains sensitive words (the sender fails to send, and the receiver does not receive the message). + */ + RC_MSG_BLOCKED_SENSITIVE_WORD = 21501, + + /*! + * \~chinese + 消息中敏感词已经被替换 (接收方可以收到被替换之后的消息) + + * \~english + The sensitive words in the message have been replaced (the receiver can receive the message after the replacement). + */ + RC_MSG_REPLACED_SENSITIVE_WORD = 21502, + + /*! + * \~chinese + 小视频时间长度超出限制,默认小视频时长上限为 2 分钟 + + * \~english + The length of small video exceeds the limit. By default, the maximum length of small video is 2 minutes. + */ + RC_SIGHT_MSG_DURATION_LIMIT_EXCEED = 34002, + + /*! + * \~chinese + GIF 消息文件大小超出限制, 默认 GIF 文件大小上限是 2 MB + + * \~english + The size of the GIF message file exceeds the limit and the maximum size of the default GIF file is 2 MB + */ + RC_GIF_MSG_SIZE_LIMIT_EXCEED = 34003, + + /** + * \~chinese + * 查询的公共服务信息不存在。 + *

请确认查询的公共服务的类型和公共服务 id 是否匹配。

+ + * \~english + * The public service information queried does not exist. + *

Please make sure that the type of public service queried matches the public service id.

+ */ + RC_PUBLIC_SERVICE_PROFILE_NOT_EXIST = 34007, + + /** + * \~chinese + * 消息不能被扩展。 + *

消息在发送时,RCMessage 对象的属性 canIncludeExpansion 置为 YES 才能进行扩展。

+ + * \~english + * Messages cannot be extended. + *

When a message is sent, the property canIncludeExpansion of the RCMessage object is set to YES before it can be extended. + */ + RC_MESSAGE_CANT_EXPAND = 34008, + + /** + * \~chinese + * 消息扩展失败。 + *

一般是网络原因导致的,请确保网络状态良好,并且融云 SDK 连接正常

+ + * \~english + * Message expansion failed. + *

Usually it is caused by the network. Make sure the network is in good condition and the cloud SDK connection is normal

. + */ + RC_MESSAGE_EXPAND_FAIL = 34009, + + /*! + * \~chinese + 消息扩展大小超出限制, 默认消息扩展字典 key 长度不超过 32 ,value 长度不超过 64 ,单次设置扩展数量最大为 20,消息的扩展总数不能超过 300 + + * \~english + The message extension size exceeds the limit. The default message extension dictionary key length does not exceed 32, the value length does not exceed 64, the maximum number of extensions set at a time is 20, and the total number of message extensions cannot exceed 300. + */ + RC_MSG_EXPANSION_SIZE_LIMIT_EXCEED = 34010, + + /*! + * \~chinese + 媒体消息媒体文件 http 上传失败 + + * \~english + Media message media file http upload failed + */ + RC_FILE_UPLOAD_FAILED = 34011, + + /*! + * \~chinese + 指定的会话类型不支持标签功能,会话标签仅支持单群聊会话、系统会话 + + * \~english + The specified conversation type does not support tag function, and conversation tag only supports single group chat conversation and system conversation + */ + RC_CONVERSATION_TAG_INVALID_CONVERSATION_TYPE = 34012, + + /*! + * \~chinese + 批量处理指定标签的会话个数超限,批量处理会话个数最大为 1000 + + * \~english + The number of conversations for batch processing of specified tags exceeds the limit, and the maximum number of conversations for batch processing is 1000 + */ + RC_CONVERSATION_TAG_LIMIT_EXCEED = 34013, + + /*! + * \~chinese + 群已读回执版本不支持 + + * \~english + Group read receipt version is not supported + */ + RC_Group_Read_Receipt_Version_Not_Support = 34014, + + /*! + * \~chinese + 视频消息压缩失败 + + * \~english + Video message compression failed + */ + RC_SIGHT_COMPRESS_FAILED = 34015, + + /*! + * \~chinese + 用户级别设置未开通 + + * \~english + User level settings are not enabled + */ + RC_USER_SETTING_DISABLED = 34016, + + /*! + * \~chinese + 消息处理失败 + *

一般是消息处理为 nil

+ + * \~english + Message processing failed. + *

Generally, messages are handled as nil

+ */ + RC_MESSAGE_NULL_EXCEPTION = 34017, + + /*! + * \~chinese + 媒体文件上传异常,媒体文件不存在或文件大小为 0 + + * \~english + Media file upload exception, media file does not exist or file size is 0 + */ + RC_MEDIA_EXCEPTION = 34018, +}; + +typedef NS_ENUM(NSInteger, RCDBErrorCode) { + RCDBOpenSuccess = 0, + RCDBOpenFailed = 33002, +}; + +#pragma mark - RCConnectionStatus + +#pragma mark RCConnectionStatus +/*! + * \~chinese + 网络连接状态码 + + * \~english + Network connection status code. + */ +typedef NS_ENUM(NSInteger, RCConnectionStatus) { + /*! + * \~chinese + 未知状态 + + @discussion 建立连接中出现异常的临时状态,SDK 会做好自动重连,开发者无须处理。 + + * \~english + Unknown state. + + @ discussion If an abnormal temporary state occurs during the connection establishment, SDK will reconnect automatically and developers need not deal with it. + */ + ConnectionStatus_UNKNOWN = -1, + + /*! + * \~chinese + 连接成功 + + * \~english + Connected successfully + */ + ConnectionStatus_Connected = 0, + + /*! + * \~chinese + 连接过程中,当前设备网络不可用 + + @discussion 当网络恢复可用时,SDK 会做好自动重连,开发者无须处理。 + + * \~english + The current device network is not available during connection. + + @ discussion When the network is available, SDK will reconnect automatically, so developers don't have to deal with it. + */ + ConnectionStatus_NETWORK_UNAVAILABLE = 1, + + /*! + * \~chinese + 当前用户在其他设备上登录,此设备被踢下线 + + * \~english + The current user is logged in on another device, and this device is kicked off the line. + */ + ConnectionStatus_KICKED_OFFLINE_BY_OTHER_CLIENT = 6, + + /*! + * \~chinese + 连接中 + + * \~english + Connecting + */ + ConnectionStatus_Connecting = 10, + + /*! + * \~chinese + 连接失败或未连接 + + * \~english + Connection failed or not connected. + */ + ConnectionStatus_Unconnected = 11, + + /*! + * \~chinese + 已登出 + + * \~english + Logged out. + */ + ConnectionStatus_SignOut = 12, + + /*! + * \~chinese + 连接暂时挂起(多是由于网络问题导致),SDK 会在合适时机进行自动重连 + + * \~english + Connection is temporarily suspended (mostly due to network problems that cause) and SDK will reconnect automatically at the appropriate time. + */ + ConnectionStatus_Suspend = 13, + + /*! + * \~chinese + 自动连接超时,SDK 将不会继续连接,用户需要做超时处理,再自行调用 connectWithToken 接口进行连接 + + * \~english + Automatic connection timeout, SDK will not continue to connect, users shall do timeout handling, and the connectWithToken interface is called to connect. + */ + ConnectionStatus_Timeout = 14, + + /*! + * \~chinese + Token无效 + + @discussion + Token 无效一般有两种原因。一是 token 错误,请您检查客户端初始化使用的 AppKey 和您服务器获取 token 使用的 AppKey + 是否一致;二是 token 过期,是因为您在开发者后台设置了 token 过期时间,您需要请求您的服务器重新获取 token + 并再次用新的 token 建立连接。 + + * \~english + Invalid Token. + + @ discussion + Generally there are two reasons why Token is invalid. One is the token error. Please check the AppKey used by the client initialization and the AppKey used by your server to obtain the token. + Whether it is consistent; Second, the token expires because you set the token expiration time in the developer background, and you shall request your server to retrieve the token and establish a connection with the new token again. + */ + ConnectionStatus_TOKEN_INCORRECT = 15, + + /*! + * \~chinese + 与服务器的连接已断开,用户被封禁 + + * \~english + The connection to the server has been disconnected and the user is blocked. + */ + ConnectionStatus_DISCONN_EXCEPTION = 16 +}; + +#pragma mark RCNetworkStatus +/*! + * \~chinese + 当前所处的网络 + + * \~english + Current network + */ +typedef NS_ENUM(NSUInteger, RCNetworkStatus) { + /*! + * \~chinese + 当前网络不可用 + + * \~english + The current network is not available + */ + RC_NotReachable = 0, + + /*! + * \~chinese + 当前处于 WiFi 网络 + + * \~english + Currently on WiFi network + */ + RC_ReachableViaWiFi = 1, + + /*! + * \~chinese + 移动网络 + + * \~english + Mobile network + */ + RC_ReachableViaWWAN = 2, +}; + +#pragma mark RCSDKRunningMode +/*! + * \~chinese + SDK 当前所处的状态 + + * \~english + The current state of SDK + */ +typedef NS_ENUM(NSUInteger, RCSDKRunningMode) { + /*! + * \~chinese + 后台运行状态 + + * \~english + Background running status + */ + RCSDKRunningMode_Background = 0, + + /*! + * \~chinese + 前台运行状态 + + * \~english + Foreground operation status + */ + RCSDKRunningMode_Foreground = 1 +}; + +#pragma mark - Conversation + +#pragma mark RCConversationType +/*! + * \~chinese + 会话类型 + + * \~english + Conversation type + */ +typedef NS_ENUM(NSUInteger, RCConversationType) { + /*! + * \~chinese + 单聊 + + * \~english + Chat alone + */ + ConversationType_PRIVATE = 1, + + /*! + * \~chinese + 讨论组 + + * \~english + Discussion group + */ + ConversationType_DISCUSSION = 2, + + /*! + * \~chinese + 群组 + + * \~english + Group + */ + ConversationType_GROUP = 3, + + /*! + * \~chinese + 聊天室 + + * \~english + chatroom + */ + ConversationType_CHATROOM = 4, + + /*! + * \~chinese + 客服 + + * \~english + Customer Service + */ + ConversationType_CUSTOMERSERVICE = 5, + + /*! + * \~chinese + 系统会话 + + * \~english + System conversation + */ + ConversationType_SYSTEM = 6, + + /*! + * \~chinese + 应用内公众服务会话 + + @discussion + 客服 2.0 使用应用内公众服务会话(ConversationType_APPSERVICE)的方式实现。 + 即客服 2.0 会话是其中一个应用内公众服务会话, 这种方式我们目前不推荐, + 请尽快升级到新客服,升级方法请参考官网的客服文档。文档链接 + https://docs.rongcloud.cn/services/public/app/prepare/ + + * \~english + In-application public service conversation. + + @ discussion + Customer service 2. 0 is implemented using an in-application public service conversation (ConversationType_APPSERVICE). + That is, customer service 2.0 conversation is one of the public service conversations in the application, which we do not recommend at this time. + Please upgrade to the new customer service as soon as possible. For upgrade methods, please refer to the customer service documentation on the official website. Document link. + https://docs.rongcloud.cn/services/public/app/prepare/ + */ + ConversationType_APPSERVICE = 7, + + /*! + * \~chinese + 跨应用公众服务会话 + + * \~english + Cross-application public service conversation + */ + ConversationType_PUBLICSERVICE = 8, + + /*! + * \~chinese + 推送服务会话 + + * \~english + Push service conversation + */ + ConversationType_PUSHSERVICE = 9, + + /*! + * \~chinese + 加密会话(仅对部分私有云用户开放,公有云用户不适用) + + * \~english + Encrypted conversation (only available to some private cloud users, not public cloud users) + */ + ConversationType_Encrypted = 11, + /** + * \~chinese + * RTC 会话 + + * \~english + * RTC conversation + */ + ConversationType_RTC = 12, + + /*! + * \~chinese + 无效类型 + + * \~english + Invalid type + */ + ConversationType_INVALID + +}; + +#pragma mark RCConversationNotificationStatus +/*! + * \~chinese + 会话提醒状态 + + * \~english + Conversation reminder status + */ +typedef NS_ENUM(NSUInteger, RCConversationNotificationStatus) { + /*! + * \~chinese + 免打扰 + + * \~english + Do not disturb + */ + DO_NOT_DISTURB = 0, + + /*! + * \~chinese + 新消息提醒 + + * \~english + New message reminder + */ + NOTIFY = 1, +}; + +#pragma mark RCReadReceiptMessageType +/*! + * \~chinese + 已读状态消息类型 + + * \~english + Read status message type + */ +typedef NS_ENUM(NSUInteger, RCReadReceiptMessageType) { + /*! + * \~chinese + 根据会话来更新未读消息状态 + + * \~english + Update the status of unread messages based on the conversation + */ + RC_ReadReceipt_Conversation = 1, +}; + +#pragma mark - Message + +#pragma mark RCMessagePersistent +/*! + * \~chinese + 消息的存储策略 + + * \~english + Storage strategy of messages + */ +typedef NS_ENUM(NSUInteger, RCMessagePersistent) { + /*! + * \~chinese + 在本地不存储,不计入未读数 + + * \~english + It is not stored locally and is not counted as unread number + */ + MessagePersistent_NONE = 0, + + /*! + * \~chinese + 在本地只存储,但不计入未读数 + + * \~english + Only stored locally, but not counted as unread number + */ + MessagePersistent_ISPERSISTED = 1, + + /*! + * \~chinese + 在本地进行存储并计入未读数 + + * \~english + Store locally and count as unread number + */ + MessagePersistent_ISCOUNTED = 3, + + /*! + * \~chinese + 在本地不存储,不计入未读数,并且如果对方不在线,服务器会直接丢弃该消息,对方如果之后再上线也不会再收到此消息。 + + @discussion 一般用于发送输入状态之类的消息,该类型消息的messageUId为nil。 + + * \~english + It is not stored locally and is not counted into unread number. If the other party is not online, the server will directly discard the message, and the other party will not receive the message if it goes online later. + + @ discussion It is typically used to send messages such as input status, and the messageUId for this type of message is nil. + */ + MessagePersistent_STATUS = 16 +}; + +#pragma mark RCMessageDirection +/*! + * \~chinese + 消息的方向 + + * \~english + The direction of the message. + */ +typedef NS_ENUM(NSUInteger, RCMessageDirection) { + /*! + * \~chinese + 发送 + + * \~english + Send + */ + MessageDirection_SEND = 1, + + /*! + * \~chinese + 接收 + + * \~english + Receive + */ + MessageDirection_RECEIVE = 2 +}; + +#pragma mark RCSentStatus +/*! + * \~chinese + 消息的发送状态 + + * \~english + The sending status of the message + */ +typedef NS_ENUM(NSUInteger, RCSentStatus) { + /*! + * \~chinese + 发送中 + + * \~english + Sending + */ + SentStatus_SENDING = 10, + + /*! + * \~chinese + 发送失败 + + * \~english + Failed to send + */ + SentStatus_FAILED = 20, + + /*! + * \~chinese + 已发送成功 + + * \~english + Sent successfully + */ + SentStatus_SENT = 30, + + /*! + * \~chinese + 对方已接收 + + * \~english + The other party has received + */ + SentStatus_RECEIVED = 40, + + /*! + * \~chinese + 对方已阅读 + + * \~english + The other party has read + */ + SentStatus_READ = 50, + + /*! + * \~chinese + 对方已销毁 + + * \~english + The other party has been destroyed + */ + SentStatus_DESTROYED = 60, + + /*! + * \~chinese + 发送已取消 + + * \~english + Sending is canceled + */ + SentStatus_CANCELED = 70, + + /*! + * \~chinese + 无效类型 + + * \~english + Invalid type + */ + SentStatus_INVALID +}; + +#pragma mark RCReceivedStatus +/*! + * \~chinese + 消息的接收状态 + + * \~english + The receiving status of the message + */ +typedef NS_ENUM(NSUInteger, RCReceivedStatus) { + /*! + * \~chinese + 未读 + + * \~english + Unread + */ + ReceivedStatus_UNREAD = 0, + + /*! + * \~chinese + 已读 + + * \~english + Read + */ + ReceivedStatus_READ = 1, + + /*! + * \~chinese + 已听 + + @discussion 仅用于语音消息 + + * \~english + Heard. + + @ discussion It is for voice messages only + */ + ReceivedStatus_LISTENED = 2, + + /*! + * \~chinese + 已下载 + + * \~english + Downloaded + */ + ReceivedStatus_DOWNLOADED = 4, + + /*! + * \~chinese + 该消息已经被其他登录的多端收取过。(即该消息已经被其他端收取过后。当前端才登录,并重新拉取了这条消息。客户可以通过这个状态更新 + UI,比如不再提示)。 + + * \~english + This message has been received by other logins. (That is, after the message has been received by other parties. The current side just logs in and pulls the message again. Customers can update UI through this status, for example, no more prompts). + */ + ReceivedStatus_RETRIEVED = 8, + + /*! + * \~chinese + 该消息是被多端同时收取的。(即其他端正同时登录,一条消息被同时发往多端。客户可以通过这个状态值更新自己的某些 UI + 状态)。 + + * \~english + The message is received by multiple parties at the same time. (That is, other terminals log in at the same time, and a message is sent to multiple terminals at the same time. Customers can update some of their UI status with this status value). + */ + ReceivedStatus_MULTIPLERECEIVE = 16, + +}; + +#pragma mark RCMediaType +/*! + * \~chinese + 消息内容中多媒体文件的类型 + + * \~english + The type of multimedia file in the message content + */ +typedef NS_ENUM(NSUInteger, RCMediaType) { + /*! + * \~chinese + 图片 + + * \~english + Image + */ + MediaType_IMAGE = 1, + + /*! + * \~chinese + 语音 + + * \~english + Voice + */ + MediaType_AUDIO = 2, + + /*! + * \~chinese + 视频 + + * \~english + Video + */ + MediaType_VIDEO = 3, + + /*! + * \~chinese + 其他文件 + + * \~english + Other documents + */ + MediaType_FILE = 4, + + /*! + * \~chinese + 小视频 + + * \~english + Small video + */ + MediaType_SIGHT = 5, + + /*! + * \~chinese + 合并转发 + + * \~english + Merge and forward + */ + MediaType_HTML = 6 +}; + +#pragma mark RCMentionedType +/*! + * \~chinese + @提醒的类型 + + * \~english + @ Type of reminder + */ +typedef NS_ENUM(NSUInteger, RCMentionedType) { + /*! + * \~chinese + @ 所有人 + + * \~english + @ Everyone + */ + RC_Mentioned_All = 1, + + /*! + * \~chinese + @ 部分指定用户 + + * \~english + @ Part of the specified user + */ + RC_Mentioned_Users = 2, +}; + +/** + * \~chinese + 语音消息采样率 + + - RCSample_Rate_8000: 8KHz + - RCSample_Rate_16000: 16KHz + + * \~english + Voice message sampling rate. + + -RCSample_Rate_8000: 8KHz. + -RCSample_Rate_16000: 16KHz + */ +typedef NS_ENUM(NSInteger, RCSampleRate) { + RCSample_Rate_8000 = 1, // 8KHz + RCSample_Rate_16000 = 2, // 16KHz +}; + +/** + * \~chinese + 语音消息类型 + + - RCVoiceMessageTypeOrdinary: 普通音质语音消息 + - RCVoiceMessageTypeHighQuality: 高音质语音消息 + + * \~english + Voice message type. + + -RCVoiceMessageTypeOrdinary: Normal sound quality voice message. + -RCVoiceMessageTypeHighQuality: High quality voice message. + */ +typedef NS_ENUM(NSInteger, RCVoiceMessageType) { + RCVoiceMessageTypeOrdinary = 1, + RCVoiceMessageTypeHighQuality = 2, +}; + +#pragma mark - PublicService + +#pragma mark RCPublicServiceType +/*! + * \~chinese + 公众服务账号类型 + + * \~english + Type of public service account + */ +typedef NS_ENUM(NSUInteger, RCPublicServiceType) { + /*! + * \~chinese + 应用内公众服务账号 + + * \~english + Public service account in the application + */ + RC_APP_PUBLIC_SERVICE = 7, + + /*! + * \~chinese + 跨应用公众服务账号 + + * \~english + Cross-application public service account + */ + RC_PUBLIC_SERVICE = 8, +}; + +#pragma mark RCPublicServiceMenuItemType +/*! + * \~chinese + 公众服务菜单类型 + + * \~english + Public service menu type + */ +typedef NS_ENUM(NSUInteger, RCPublicServiceMenuItemType) { + /*! + * \~chinese + 包含子菜单的一组菜单 + + * \~english + A set of menus containing submenus + */ + RC_PUBLIC_SERVICE_MENU_ITEM_GROUP = 0, + + /*! + * \~chinese + 包含查看事件的菜单 + + * \~english + Menu containing view events + */ + RC_PUBLIC_SERVICE_MENU_ITEM_VIEW = 1, + + /*! + * \~chinese + 包含点击事件的菜单 + + * \~english + Menu containing click events + */ + RC_PUBLIC_SERVICE_MENU_ITEM_CLICK = 2, +}; + +#pragma mark RCSearchType +/*! + * \~chinese + 公众服务查找匹配方式 + + * \~english + Public service search matching mode + */ +typedef NS_ENUM(NSUInteger, RCSearchType) { + /*! + * \~chinese + 精确匹配 + + * \~english + Exact matching + */ + RC_SEARCH_TYPE_EXACT = 0, + + /*! + * \~chinese + 模糊匹配 + + * \~english + Fuzzy matching + */ + RC_SEARCH_TYPE_FUZZY = 1, + /*! + * \~chinese + 无效类型 + + * \~english + Invalid type + */ + RCSearchType_INVALID +}; + +/*! + * \~chinese + 客服服务方式 + + * \~english + Customer service mode + */ +typedef NS_ENUM(NSUInteger, RCCSModeType) { + /*! + * \~chinese + 无客服服务 + + * \~english + No customer service + */ + RC_CS_NoService = 0, + + /*! + * \~chinese + 机器人服务 + + * \~english + Robot service + */ + RC_CS_RobotOnly = 1, + + /*! + * \~chinese + 人工服务 + + * \~english + Manual service + */ + RC_CS_HumanOnly = 2, + + /*! + * \~chinese + 机器人优先服务 + + * \~english + Robot priority service + */ + RC_CS_RobotFirst = 3, +}; + +/*! + * \~chinese + 客服评价时机 + + * \~english + Timing of customer service evaluation + */ +typedef NS_ENUM(NSUInteger, RCCSEvaEntryPoint) { + /*! + * \~chinese + 离开客服评价 + + * \~english + Leave customer service evaluation + */ + RCCSEvaLeave = 0, + + /*! + * \~chinese + 在扩展中展示客户主动评价按钮,离开客服不评价 + + * \~english + Show the customer active evaluation button in the expansion and leave the customer service without evaluation + */ + RCCSEvaExtention = 1, + + /*! + * \~chinese + 无评价入口 + + * \~english + No evaluation entrance + */ + RCCSEvaNone = 2, + + /*! + * \~chinese + 坐席结束会话评价 + + * \~english + Evaluation of the end of the conversation at the end of the seat + */ + RCCSEvaCSEnd = 3, +}; + +/*! + * \~chinese + 客服留言类型 + + * \~english + Customer service message type + */ +typedef NS_ENUM(NSUInteger, RCCSLMType) { + /*! + * \~chinese + 本地 Native 页面留言 + + * \~english + Local Native page message + */ + RCCSLMNative = 0, + + /*! + * \~chinese + web 页面留言 + + * \~english + Web page message + */ + RCCSLMWeb = 1, +}; + +/*! + * \~chinese + 客服问题解决状态 + + * \~english + Resolution status of customer service problem + */ +typedef NS_ENUM(NSUInteger, RCCSResolveStatus) { + /*! + * \~chinese + 未解决 + + * \~english + Unresolved + */ + RCCSUnresolved = 0, + + /*! + * \~chinese + 已解决 + + * \~english + Resolved + */ + RCCSResolved = 1, + + /*! + * \~chinese + 解决中 + + * \~english + Solving + */ + RCCSResolving = 2, +}; + +/*! + * \~chinese + 客服评价类型 + + * \~english + Type of customer service evaluation + */ +typedef NS_ENUM(NSUInteger, RCCSEvaType) { + /*! + * \~chinese + 人工机器人分开评价 + + * \~english + Separate evaluation of manual and robot + */ + RCCSEvaSeparately = 0, + + /*! + * \~chinese + 人工机器人统一评价 + + * \~english + Unified evaluation of manual and robot + */ + EVA_UNIFIED = 1, +}; + +#pragma mark RCLogLevel +/*! + * \~chinese + 日志级别 + + * \~english + Log level + */ +typedef NS_ENUM(NSUInteger, RCLogLevel) { + + /*! + * \~chinese + * 不输出任何日志 + + * \~english + * Do not output any logs + */ + RC_Log_Level_None = 0, + + /*! + * \~chinese + * 只输出错误的日志 + + * \~english + * Output only error logs + */ + RC_Log_Level_Error = 1, + + /*! + * \~chinese + * 输出错误和警告的日志 + + * \~english + * Output logs of errors and warnings + */ + RC_Log_Level_Warn = 2, + + /*! + * \~chinese + * 输出错误、警告和一般的日志 + + * \~english + * Output errors, warnings, and general logs + */ + RC_Log_Level_Info = 3, + + /*! + * \~chinese + * 输出输出错误、警告和一般的日志以及 debug 日志 + + * \~english + * Output errors, warnings and general logs as well as debug logs + */ + RC_Log_Level_Debug = 4, + + /*! + * \~chinese + * 输出所有日志 + + * \~english + * Output all logs + */ + RC_Log_Level_Verbose = 5, +}; + +#pragma mark RCTimestampOrder +/*! + * \~chinese + 时间戳顺序 + + * \~english + Timestamp Order + */ +typedef NS_ENUM(NSUInteger, RCTimestampOrder) { + /*! + * \~chinese + * 降序, 按照时间戳从大到小 + + * \~english + * Descending order, from large to small according to timestamp + */ + RC_Timestamp_Desc = 0, + + /*! + * \~chinese + * 升序, 按照时间戳从小到大 + + * \~english + * In ascending order, from small to large according to the timestamp + */ + RC_Timestamp_Asc = 1, +}; + +#pragma mark RCPlatform +/*! + * \~chinese + 在线平台 + + * \~english + Online platform + */ +typedef NS_ENUM(NSUInteger, RCPlatform) { + /*! + * \~chinese + 其它平台 + + * \~english + Other platforms + */ + RCPlatform_Other = 0, + + /*! + iOS + */ + RCPlatform_iOS = 1, + + /*! + Android + */ + RCPlatform_Android = 2, + + /*! + Web + */ + RCPlatform_Web = 3, + + /*! + PC + */ + RCPlatform_PC = 4 +}; + +#pragma mark RCPushLauguageType +/*! + * \~chinese + push 语言设置 + + * \~english + Push language Settings + */ +typedef NS_ENUM(NSUInteger, RCPushLauguage) { + /*! + * \~chinese + 英文 + + * \~english + English + */ + RCPushLauguage_EN_US = 1, + /*! + * \~chinese + 中文 + + * \~english + Chinese + */ + RCPushLauguage_ZH_CN = 2, + /*! + * \~chinese + 阿拉伯文 + + * \~english + Arabic + */ + RCPushLauguage_AR_SA +}; + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCStatusMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCStatusMessage.h new file mode 100644 index 0000000..d02e03f --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCStatusMessage.h @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCStatusMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" +/** + * \~chinese + 状态消息的抽象基类,表示某种状态,不会存入消息历史记录。 + 此类消息不保证一定到达接收方(但只是理论上存在丢失的可能),但是速度最快,所以通常用来传递状态信息。 + + * \~english + The abstract base class of a status message that represents a state and is not stored in the message history. + Such messages are not guaranteed to reach the receiver (but there is only the possibility of loss in theory), but they are the fastest, so they are usually used to convey status information. +*/ +@interface RCStatusMessage : RCMessageContent + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTSMutableDictionary.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTSMutableDictionary.h new file mode 100644 index 0000000..385a6e1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTSMutableDictionary.h @@ -0,0 +1,13 @@ +// +// RCTSMutableDictionary.h +// RongIMKit +// +// Created by RongCloud on 16/5/12. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +@interface RCTSMutableDictionary : NSMutableDictionary + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTagInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTagInfo.h new file mode 100644 index 0000000..cbca854 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTagInfo.h @@ -0,0 +1,69 @@ +// +// RCTagInfo.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#import +/*! + * \~chinese + 标签信息 + + * \~english + Tag information + */ +@interface RCTagInfo : NSObject +/*! + * \~chinese + 标签 ID + + * \~english + tag ID + */ +@property (nonatomic, copy) NSString *tagId; + +/*! + * \~chinese + 标签名称 + + * \~english + Tag name + */ +@property (nonatomic, copy) NSString *tagName; + +/*! + * \~chinese + 该标签下的会话个数 + + * \~english + The number of conversations under this tag + */ +@property (nonatomic, assign) NSInteger count; + +/*! + * \~chinese + 标签创建时间 + + * \~english + Tag creation time + */ +@property (nonatomic, assign) long long timestamp; + +/*! + * \~chinese + RCTagInfo 初始化方法 + + @param tagId 标签 id + @param tagName 标签名称 + + * \~english + RCTagInfo initialization method. + + @ param tagId tag id. + @ param tagName tag name. + */ +- (instancetype)initWithTagInfo:(NSString *)tagId + tagName:(NSString *)tagName; +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTagProtocol.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTagProtocol.h new file mode 100644 index 0000000..6d85545 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTagProtocol.h @@ -0,0 +1,47 @@ +// +// RCTagProtocol.h +// RongIMLib +// +// Created by RongCloud on 2021/1/27. +// Copyright © 2021 RongCloud. All rights reserved. +// + +#ifndef RCTagProtocol_h +#define RCTagProtocol_h + +@protocol RCTagDelegate + +/*! + * \~chinese + 标签变化 + + @discussion 本端添加删除更新标签,不会触发不会触发此回调方法,在相关调用方法的 block 块直接回调 + + * \~english + Tag change. + + @ discussion Local label addition, deletion and update will not trigger or trigger this callback method, which will be called back directly in the block of the relevant calling method. + */ +- (void)onTagChanged; + +@end + + +@protocol RCConversationTagDelegate + +/*! + * \~chinese + 会话标签变化 + + @discussion 本端添加删除更新会话标签,不会触发此回调方法,在相关调用方法的 block 块直接回调 + + * \~english + Conversation tag change. + + @ discussion Local addition, deletion and update of conversation tag will not trigger this callback method, and will be called back directly in the block of the relevant calling method. + */ + +- (void)onConversationTagChanged; + +@end +#endif /* RCTagProtocol_h */ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTextMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTextMessage.h new file mode 100644 index 0000000..99b16fe --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCTextMessage.h @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCTextMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 文本消息的类型名 + + * \~english + The type name of the text message + */ +#define RCTextMessageTypeIdentifier @"RC:TxtMsg" + +/*! + * \~chinese + 文本消息类 + + @discussion 文本消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Text message class. + + @ discussion Text message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCTextMessage : RCMessageContent + +/*! + * \~chinese + 文本消息的内容 + + * \~english + The content of a text message + */ +@property (nonatomic, copy) NSString *content; + +/*! + * \~chinese + 初始化文本消息 + + @param content 文本消息的内容 + @return 文本消息对象 + + * \~english + Initialize text message. + + @param content The content of a text message. + @ return text message object. + */ ++ (instancetype)messageWithContent:(NSString *)content; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUnknownMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUnknownMessage.h new file mode 100644 index 0000000..35568da --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUnknownMessage.h @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCUnknownMessage.h +// Created by xugang on 15/1/24. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 未知消息的类型名 + + * \~english + Type name of unknown message + */ +#define RCUnknownMessageTypeIdentifier @"RC:UnknownMsg" + +/*! + * \~chinese + 未知消息类 + + @discussion 所有未注册的消息类型,在 IMKit 中都会作为此类消息处理和显示。 + + * \~english + Unknown message class. + + @ discussion All unregistered message types are processed and displayed as such messages in IMKit. + */ +@interface RCUnknownMessage : RCMessageContent + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUploadImageStatusListener.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUploadImageStatusListener.h new file mode 100644 index 0000000..9860606 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUploadImageStatusListener.h @@ -0,0 +1,90 @@ +// +// RCUploadImageStatusListener.h +// RongIMLib +// +// Created by litao on 15/8/28. +// Copyright (c) 2015 RongCloud. All rights reserved. +// + +#import "RCMessage.h" +#import + +/*! + * \~chinese + 图片上传进度更新的IMKit监听 + + @discussion 此监听用于 IMKit 发送图片消息(上传到指定服务器)。 + App 在上传图片时,需要在监听中调用 updateBlock、successBlock 与 errorBlock,通知 IMKit + SDK 当前上传图片的进度和状态,SDK 会更新 UI。 + + * \~english + IMKit listening of image upload progress update. + + @ discussion This listening is used for IMKit to send image messages (uploaded to the specified server). + When uploading images, App shall call updateBlock, successBlock and errorBlock to notify IMKit SDK to upload the progress and status of the image during listening and SDK will update the UI. + */ +@interface RCUploadImageStatusListener : NSObject + +/*! + * \~chinese + 上传的图片消息的消息实体 + + * \~english + The message entity of the uploaded image message + */ +@property (nonatomic, strong) RCMessage *currentMessage; + +/*! + * \~chinese + 更新上传进度需要调用的 block [progress:当前上传的进度,0 <= progress < 100] + + * \~english + The block that shall be called to update the upload progress [progress: current upload progress, 0 < = progress < 100]. + */ +@property (nonatomic, strong) void (^updateBlock)(int progress); + +/*! + * \~chinese + 上传成功需要调用的 block [imageUrl:图片的网络 URL] + + * \~english + Block to be called for successful upload [imageUrl:network URL of image] + */ +@property (nonatomic, strong) void (^successBlock)(NSString *imageUrl); + +/*! + * \~chinese + 上传成功需要调用的 block [errorCode:上传失败的错误码,非 0 整数] + + * \~english + Block to be called for successful upload [errorCode: error code for failed upload, non-0 integer]. + */ +@property (nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode); + +/*! + * \~chinese + 初始化图片上传进度更新的IMKit监听 + + @param message 图片消息的消息实体 + @param progressBlock 更新上传进度需要调用的 block + @param successBlock 上传成功需要调用的 block + @param errorBlock 上传失败需要调用的 block + + @return 图片上传进度更新的 IMKit 监听对象 + + * \~english + Initialize IMKit listening for image upload progress updates. + + @param message The message entity of the image message. + @param message The block that shall be called to update the upload progress. + @param message The block to be called for successful upload. + @param message The block that shall be called for upload failure. + + @ return IMKit listener object for update of image upload progress. + */ +- (instancetype)initWithMessage:(RCMessage *)message + uploadProgress:(void (^)(int progress))progressBlock + uploadSuccess:(void (^)(NSString *imageUrl))successBlock + uploadError:(void (^)(RCErrorCode errorCode))errorBlock; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUploadMediaStatusListener.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUploadMediaStatusListener.h new file mode 100644 index 0000000..b377ca0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUploadMediaStatusListener.h @@ -0,0 +1,146 @@ +// +// RCUploadMediaStatusListener.h +// RongIMLib +// +// Created by litao on 15/8/28. +// Copyright (c) 2015 RongCloud. All rights reserved. +// + +#import "RCMessage.h" +#import + +/*! + * \~chinese + 媒体文件上传进度更新的 IMKit 监听 + + @discussion 此监听用于 IMKit 发送媒体文件消息(上传到指定服务器)。 + App 在上传媒体文件时,需要在监听中调用 updateBlock、successBlock 与 errorBlock,通知 IMKit + SDK 当前上传媒体文件的进度和状态,SDK 会更新 UI。 + + * \~english + IMKit listening of media file upload progress updates. + + @ discussion This listening is used for IMKit to send media file messages (uploaded to the specified server). + When uploading media files, App shall call updateBlock, successBlock and errorBlock to notify IMKit + SDK of the progress and status of the media file currently uploaded during listening and SDK will update the UI. + */ +@interface RCUploadMediaStatusListener : NSObject + +/*! + * \~chinese + 上传的媒体文件消息的消息实体 + + * \~english + The message entity of the uploaded media file message. + */ +@property (nonatomic, strong) RCMessage *currentMessage; + +/*! + * \~chinese + 更新上传进度需要调用的 block [progress:当前上传的进度,0 <= progress < 100] + + * \~english + The block that shall be called to update the upload progress [progress: current upload progress, 0 < = progress < 100]. + */ +@property (nonatomic, strong) void (^updateBlock)(int progress); + +/*! + * \~chinese + 上传成功需要调用的 block。 + content:上传成功之后,需要发送的消息内容。 + 您可以使用 currentMessage,把其中content属性对应的 url 字段设置成您上传成功的网络 URL。 + 请参考下面代码。 + + 升级说明:如果您之前使用了此接口,请参考下面代码把参数从 url 替换成 message。 + if ([currentMessage.content isKindOfClass:[RCImageMessage class]]) { + RCImageMessage *content = (RCImageMessage *)currentMessage.content; + content.imageUrl = remoteUrl; + successBlock(content); + } else if ([currentMessage.content isKindOfClass:[RCFileMessage class]]) { + RCFileMessage *content = (RCFilemessage *)currentMessage.content; + content.fileUrl = remoteUrl; + successBlock(content); + } + + * \~english + The block that shall be called for successful upload. + The content of the message to be sent after the content: is uploaded successfully. + You can use currentMessage to set the url field corresponding to the content attribute to the network URL that you successfully upload. + Please refer to the following code. + + Upgrade instructions: If you used this interface before, please refer to the following code to replace the parameter from url to message. + if ([currentMessage.content isKindOfClass:[RCImageMessage class]]) { + RCImageMessage *content = (RCImageMessage *)currentMessage.content; + content.imageUrl = remoteUrl; + successBlock(content); + } else if ([currentMessage.content isKindOfClass:[RCFileMessage class]]) { + RCFileMessage *content = (RCFilemessage *)currentMessage.content; + content.fileUrl = remoteUrl; + successBlock(content); + } + */ +@property (nonatomic, strong) void (^successBlock)(RCMessageContent *content); + +/*! + * \~chinese + 上传成功需要调用的 block [errorCode:上传失败的错误码,非 0 整数] + + * \~english + Block to be called for successful upload [errorCode: error code for failed upload, non-0 integer]. + */ +@property (nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode); + +/*! + * \~chinese + 上传取消需要调用的 block + + * \~english + The block that shall be called to cancel upload + */ +@property (nonatomic, strong) void (^cancelBlock)(void); + +/*! + * \~chinese + 初始化媒体文件上传进度更新的 IMKit 监听 + + @param message 媒体文件消息的消息实体 + @param progressBlock 更新上传进度需要调用的 block + @param successBlock 上传成功需要调用的 block + @param errorBlock 上传失败需要调用的 block + @param cancelBlock 上传取消需要调用的 block( 如果未实现,传 nil 即可) + + @return 媒体文件上传进度更新的 IMKit 监听对象 + + * \~english + Initialize IMKit listening for media file upload progress updates. + + @param message The message entity of the media file message. + @param progressBlock The block that shall be called to update the upload progress. + @param successBlock Block to be called for successful upload. + @param errorBlock The block that shall be called for upload failure. + @param cancelBlock The block that shall be called to cancel upload (if it is not implemented, you can send it to nil). + + @ return IMKit listener object for media file upload progress updates. + */ +- (instancetype)initWithMessage:(RCMessage *)message + uploadProgress:(void (^)(int progress))progressBlock + uploadSuccess:(void (^)(RCMessageContent *content))successBlock + uploadError:(void (^)(RCErrorCode errorCode))errorBlock + uploadCancel:(void (^)(void))cancelBlock; + +/*! + * \~chinese + 取消当前上传 + + @discussion 如果您实现取消正在上传的媒体消息功能,则必须实现此回调。 + 您需要在取消成功之后,调用 cancelBlock 通知 SDK,SDK 会自动更新 UI。 + + * \~english + Cancel the current upload. + + @ discussion If you implement the ability to cancel media messages being uploaded, you must implement this callback. + You shall call cancelBlock to notify SDK and SDK will update automatically UI after the cancellation is successful. + */ +- (void)cancelUpload; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserInfo.h new file mode 100644 index 0000000..bbee08c --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserInfo.h @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCUserInfo.h +// Created by Heq.Shinoda on 14-6-16. + +#import + +/*! + * \~chinese + 用户信息类 + + * \~english + User information class + */ +@interface RCUserInfo : NSObject + +/*! + * \~chinese + 用户 ID + + * \~english + User ID + */ +@property (nonatomic, copy) NSString *userId; + +/*! + * \~chinese + 用户名称 + + * \~english + User name + */ +@property (nonatomic, copy) NSString *name; + +/*! + * \~chinese + 用户头像的 URL + + * \~english + The URL of the user's portrait + */ +@property (nonatomic, copy) NSString *portraitUri; + +/** + * \~chinese + 用户信息附加字段 + + * \~english + Additional fields of user information + */ +@property (nonatomic, copy) NSString *extra; + +/*! + * \~chinese + 用户信息的初始化方法 + + @param userId 用户 ID + @param username 用户名称 + @param portrait 用户头像的 URL + @return 用户信息对象 + + * \~english + Initialization method of user information. + + @param userId User ID. + @param username User name. + @param portrait The URL of the user's portrait. + @ return user Information object. + */ +- (instancetype)initWithUserId:(NSString *)userId name:(NSString *)username portrait:(NSString *)portrait; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserOnlineStatusInfo.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserOnlineStatusInfo.h new file mode 100644 index 0000000..04a60c1 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserOnlineStatusInfo.h @@ -0,0 +1,58 @@ +// +// RCUserOnlineStatusInfo.h +// RongIMLib +// +// Created by RongCloud on 16/9/26. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import "RCStatusDefine.h" +#import + +/*! + * \~chinese + 用户在线状态 + + * \~english + User online status + */ +@interface RCUserOnlineStatusInfo : NSObject + +/*! + * \~chinese + 在线的平台 + + * \~english + Online platform +*/ +@property (nonatomic, assign) RCPlatform platform; + +/*! + * \~chinese + 融云服务在线状态 + + @discussion 0 表示离线,1 表示在线 + + * \~english + Online status of financial cloud service. + + @ discussion 0 means offline, 1 means online. + */ +@property (nonatomic, assign) int rcServiceStatus; + +/*! + * \~chinese + 用户自定义的在线状态(1 < customerStatus <= 255) + + @discussion + 如果没有通过 RCIMClient 的 setUserOnlineStatus:success:error: 设置自定义的在线状态,默认的在线状态值为 1,若离线则为 0。 + + * \~english + User-defined presence status (1 < customerStatus < = 255). + + @ discussion + If failed, perform setUserOnlineStatus:success:error: of RCIMClient. Set the custom online status. The default online status value is 1. if offline, it is 0. + */ +@property (nonatomic, assign) int customerStatus; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserTypingStatus.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserTypingStatus.h new file mode 100644 index 0000000..5bbb7f0 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUserTypingStatus.h @@ -0,0 +1,65 @@ +// +// RCUserTypingStatus.h +// RongIMLib +// +// Created by RongCloud on 16/1/8. +// Copyright © 2016 RongCloud. All rights reserved. +// + +#import + +/*! + * \~chinese + 用户输入状态类 + + * \~english + User input status class. + */ +@interface RCUserTypingStatus : NSObject + +/*! + * \~chinese + 当前正在输入的用户 ID + + * \~english + The user ID that is currently being entered. + */ +@property (nonatomic, copy) NSString *userId; + +/*! + * \~chinese + 当前正在输入的消息类型名 + + @discussion + contentType 为用户当前正在编辑的消息类型名,即 RCMessageContent 中 getObjectName 的返回值。 + 如文本消息,应该传类型名"RC:TxtMsg"。 + + * \~english + The name of the message type currently being entered. + + @ discussion + ContentType is the name of the message type that the user is currently editing, that is, the return value of getObjectName in RCMessageContent. + E.g. for a text message, pass the type name "RC:TxtMsg". + */ +@property (nonatomic, copy) NSString *contentType; + +/*! + * \~chinese + 初始化用户输入状态对象 + + @param userId 当前正在输入的用户ID + @param objectName 当前正在输入的消息类型名 + + @return 用户输入状态对象 + + * \~english + Initialize user input status object. + + @param userId The user ID that is currently being entered. + @param objectName The name of the message type currently being entered. + + @ return user input status object. + */ +- (instancetype)initWithUserId:(NSString *)userId contentType:(NSString *)objectName; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUtilities.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUtilities.h new file mode 100644 index 0000000..7035dc8 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCUtilities.h @@ -0,0 +1,545 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCUtilities.h +// Created by Heq.Shinoda on 14-5-15. + +#ifndef __RCUtilities +#define __RCUtilities + +#import "RCMessage.h" +#import + +/*! + * \~chinese + 工具类 + + * \~english + Tool class + */ +@interface RCUtilities : NSObject + +/*! + * \~chinese + 将 base64 编码的字符串解码并转换为 NSData 数据 + + @param string base64 编码的字符串 + @return 解码后的 NSData 数据 + + @discussion 此方法主要用于 iOS6 解码 base64。 + + * \~english + Decode and convert base64-encoded strings into NSData data. + + @param string Base64 encoded string. + @ return decoded NSData data. + + @ discussion This method is mainly used for iOS6 decoding base64. + */ ++ (NSData *)dataWithBase64EncodedString:(NSString *)string; + +/*! + * \~chinese + 将 NSData 数据转化并编码为 base64 的字符串 + + @param data 未编码的 NSData 数据 + @return 编码后的 base64 字符串 + + @discussion 此方法主要用于 iOS6 编码 base64。 + + * \~english + Convert and encode NSData data into base64 strings. + + @param data Unencoded NSData data. + @ return encoded base64 string. + + @ discussion This method is mainly used for iOS6 encoding base64. + */ ++ (NSString *)base64EncodedStringFrom:(NSData *)data; + +/*! + * \~chinese + scaleImage + + @param image image + @param scaleSize scaleSize + + @return scaled image + + * \~english + ScaleImage. + + @param image Image. + @param scaleSize ScaleSize. + + @ return scaled image. + */ ++ (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize; + +/*! + * \~chinese + imageByScalingAndCropSize + + @param image image + @param targetSize targetSize + + @return image + + * \~english + ImageByScalingAndCropSize. + + @param image Image. + @param targetSize TarGetize. + + @ return image. + */ ++ (UIImage *)imageByScalingAndCropSize:(UIImage *)image targetSize:(CGSize)targetSize; + +/*! + * \~chinese +根据配置压缩图片,如果设置了[RCCoreClient sharedCoreClient].imageCompressConfig ,就按照此设置进行压缩。如果没有设置,就按照RCConfigg.plis文件中的配置进行压缩。 + + @param image 原图片 + @return 压缩后的图片 + + * \~english + Compress the image according to the configuration, and compress the image according to this setting if [RCCoreClient sharedCoreClient]. ImageCompressConfig, is set. If it is not set, compress it according to the configuration in the RCConfigg.plis file. + + @param image Original image. + @ return compressed image. + */ ++ (UIImage *)generateThumbnailByConfig:(UIImage *)image; + +/*! + generate thumbnail from image + + @param image image + @param targetSize targetSize + + @return image + */ ++ (UIImage *)generateThumbnail:(UIImage *)image targetSize:(CGSize)targetSize; + +/*! + generate thumbnail from image + + @param image image + @param targetSize targetSize + @param percent percent + + @return image + */ ++ (UIImage *)generateThumbnail:(UIImage *)image targetSize:(CGSize)targetSize percent:(CGFloat)percent; +/*! + compressedImageWithMaxDataLength + + @param image image + @param maxDataLength maxDataLength + + @return nsdate + */ ++ (NSData *)compressedImageWithMaxDataLength:(UIImage *)image maxDataLength:(CGFloat)maxDataLength; + +/*! + compressedImageAndScalingSize + + @param image image + @param targetSize targetSize + @param maxDataLen maxDataLen + + @return image nsdata + */ ++ (NSData *)compressedImageAndScalingSize:(UIImage *)image targetSize:(CGSize)targetSize maxDataLen:(CGFloat)maxDataLen; + +/*! + compressedImageAndScalingSize + + @param image image + @param targetSize targetSize + @param percent percent + + @return image nsdata + */ ++ (NSData *)compressedImageAndScalingSize:(UIImage *)image targetSize:(CGSize)targetSize percent:(CGFloat)percent; +/*! + compressedImage + + @param image image + @param percent percent + + @return image nsdata + */ ++ (NSData *)compressedImage:(UIImage *)image percent:(CGFloat)percent; + +/*! + * \~chinese + 获取文字显示的尺寸 + + @param text 文字 + @param font 字体 + @param constrainedSize 文字显示的容器大小 + + @return 文字显示的尺寸 + + @discussion 该方法在计算 iOS 7 以下系统显示的时候默认使用 NSLineBreakByTruncatingTail 模式。 + + * \~english + Get the size of the text display. + + @param text Words. + @param font Font. + @param constrainedSize Container size for text display. + + @ return The size of text display. + + @ discussion This method uses NSLineBreakByTruncatingTail mode by default when the system display below iOS 7 is calculated. + */ ++ (CGSize)getTextDrawingSize:(NSString *)text font:(UIFont *)font constrainedSize:(CGSize)constrainedSize; + +/*! + * \~chinese + 判断是否是本地路径 + + @param path 路径 + + @return 是否是本地路径 + + * \~english + Determine whether it is a local path. + + @param path Path. + + @ return Whether it is a local path. + */ ++ (BOOL)isLocalPath:(NSString *)path; + +/*! + * \~chinese + 判断是否是网络地址 + + @param url 地址 + + @return 是否是网络地址 + + * \~english + Determine whether it is a network address. + + @param url Address. + + @ return Whether it is a network address. + */ ++ (BOOL)isRemoteUrl:(NSString *)url; + +/*! + * \~chinese + 获取沙盒修正后的文件路径 + + @param localPath 本地路径 + + @return 修正后的文件路径 + + * \~english + Get the revised file path of sandboxes + + @param localPath Local path. + + @ return revised file path. + */ ++ (NSString *)getCorrectedFilePath:(NSString *)localPath; + +/*! + * \~chinese + * 获取文件存储路径 + + * \~english + * Obtain the file storage path + */ ++ (NSString *)getFileStoragePath; + +/*! + excludeBackupKeyForURL + + @param storageURL storageURL + + @return BOOL + */ ++ (BOOL)excludeBackupKeyForURL:(NSURL *)storageURL; + +/*! + * \~chinese + 获取 App 的文件存放路径 + + @return App 的文件存放路径 + + * \~english + Get the file storage path of App. + + @ return App's file storage path. + */ ++ (NSString *)applicationDocumentsDirectory; + +/*! + * \~chinese + 获取融云 SDK 的文件存放路径 + + @return 融云 SDK 的文件存放路径 + + * \~english + Get the file storage path of the RongCloud SDK. + + @ return the file storage path of RongCloud SDK. + */ ++ (NSString *)rongDocumentsDirectory; + +/*! + * \~chinese + 获取融云 SDK 的缓存路径 + + @return 融云 SDK 的缓存路径 + + * \~english + Get the cache path of RongCloud SDK. + + @ return the cache path of RongCloud SDK. + */ ++ (NSString *)rongImageCacheDirectory; + +/*! + * \~chinese + 获取当前系统时间 + + @return 当前系统时间 + + * \~english + Get the current system time. + + @ return current system time. + */ ++ (NSString *)currentSystemTime; + +/*! + * \~chinese + 获取当前运营商名称 + + @return 当前运营商名称 + + * \~english + Get the current operator name. + + @ return current operator name. + */ ++ (NSString *)currentCarrier; + +/*! + * \~chinese + 获取当前网络类型 + + @return 当前网络类型 + + * \~english + Get the current network type. + + @ return current network type. + */ ++ (NSString *)currentNetWork; + +/*! + * \~chinese + 获取当前网络类型 + + @return 当前网络类型 + + * \~english + Get the current network type. + + @ return current network type. + */ ++ (NSString *)currentNetworkType; + +/*! + * \~chinese + 获取系统版本 + + @return 系统版本 + + * \~english + Get system version. + + @ return system version. + */ ++ (NSString *)currentSystemVersion; + +/*! + * \~chinese + 获取设备型号 + + @return 设备型号 + + * \~english + Get the device model. + + @ return device model. + */ ++ (NSString *)currentDeviceModel; + +/*! + * \~chinese + 获取非换行的字符串 + + @param originalString 原始的字符串 + + @return 非换行的字符串 + + @discussion 所有换行符将被替换成单个空格 + + * \~english + Get a string that is not a newline. + + @param originalString Original string. + + @ return non-newline string. + + @ discussion All newline characters will be replaced with a single space. + */ ++ (NSString *)getNowrapString:(NSString *)originalString; + +/** + * \~chinese + 获取消息类型对应的描述 + + @param mediaType 消息类型 + @return 描述 + + * \~english + Get the description corresponding to the message type. + + @param mediaType Message type. + @ return description. + */ ++ (NSString *)getMediaTypeString:(RCMediaType)mediaType; + +/** + * \~chinese + 获取消息内容对应的媒体类型 + + @param content 消息内容 + @return 媒体类型,如果是不支持的媒体类型或者消息,将返回 -1 + + * \~english + Get the media type corresponding to the message content. + + @param content Message content. + @ return media type. If it is an unsupported media type or message,-1 will be returned. + */ ++ (RCMediaType)getMediaType:(RCMessageContent *)content; + +/** + * \~chinese + 判断一张照片是否是含透明像素的照片 + + @param image 原始照片 + @return 是否包含透明像素,YES 包含, NO 不包含 + + * \~english + Determine whether a image is a image with transparent pixels. + + @param image Original image. + Whether @ return contains transparent pixels, YES does, and NO does not. + */ ++ (BOOL)isOpaque:(UIImage *)image; + +/** + * \~chinese + URL 编码 + + @return 编码后的 URL + + * \~english + URL coding. + + @ return encoded URL. + */ ++ (NSString *)encodeURL:(NSString *)url; + ++ (NSData *)compressImage:(UIImage *)sourceImage; + +/** + * \~chinese + 检查字符串是否符合聊天室属性名称的格式 + + @param key 聊天室属性名称 + @return 是否符合聊天室属性名称的格式,YES 符合, NO 不符合 + + @discussion Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式 + + * \~english + Check whether the string matches the format of the chat room attribute name. + + @param key Chat room attribute name. + Whether @ return conforms to the format of chat room attribute names, YES does, but NO does not. + + @ discussion Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. + */ ++ (BOOL)checkChatroomKey:(NSString *)key; + +/** + * \~chinese +生成 22 位的 UUID + +@return 22 位的 UUID + + * \~english + Generate 22-bit UUID. + + @ return 22-bit UUID. +*/ ++ (NSString *)get22bBitUUID; + +/** + * \~chinese +生成 UUID + +@return UUID + + * \~english + Generate UUID. + + @ return UUID. +*/ ++ (NSString *)getUUID; + +/** + * \~chinese +生成 DeviceId + +@return DeviceId 连接改造使用的 + + * \~english + Generate DeviceId. + + @ return DeviceId connection transformation. + */ ++ (NSString *)getDeviceId:(NSString *)appKey; + +/** + * \~chinese +获取手机型号 + +@return 手机型号 + + * \~english + Get the phone model. + + @ return mobile phone model + */ ++ (NSString *)iphoneType; + +@end + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCVoiceMessage.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCVoiceMessage.h new file mode 100644 index 0000000..c8e1eec --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCVoiceMessage.h @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RCVoiceMessage.h +// Created by Heq.Shinoda on 14-6-13. + +#import "RCMessageContent.h" + +/*! + * \~chinese + 语音消息的类型名 + + * \~english + The type name of the voice message + */ +#define RCVoiceMessageTypeIdentifier @"RC:VcMsg" + +/*! + * \~chinese + 语音消息类 + + @discussion 语音消息类,此消息会进行存储并计入未读消息数。 + + @remarks 内容类消息 + + * \~english + Voice message class. + + @ discussion voice message class, which is stored and counted as unread messages. + + @ remarks content class message. + */ +@interface RCVoiceMessage : RCMessageContent + +/*! + * \~chinese + wav 格式的音频数据 + + * \~english + Audio data in wav format. + */ +@property (nonatomic, strong) NSData *wavAudioData; + +/*! + * \~chinese + 语音消息的时长, 以秒为单位 + + * \~english + The duration of the voice message, in seconds. + */ +@property (nonatomic, assign) long duration; + + +/*! + * \~chinese + 初始化语音消息 + + @param audioData wav格式的音频数据 + @param duration 语音消息的时长,以秒为单位 + @return 语音消息对象 + + @discussion + 如果您不是使用IMKit中的录音功能,则在初始化语音消息的时候,需要确保以下几点。 + 1. audioData 必须是单声道的 wav 格式音频数据; + 2. audioData 的采样率必须是 8000Hz,采样位数(精度)必须为 16 位。 + + 您可以参考 IMKit 中的录音参数: + NSDictionary *settings = @{AVFormatIDKey: @(kAudioFormatLinearPCM), + AVSampleRateKey: @8000.00f, + AVNumberOfChannelsKey: @1, + AVLinearPCMBitDepthKey: @16, + AVLinearPCMIsNonInterleaved: @NO, + AVLinearPCMIsFloatKey: @NO, + AVLinearPCMIsBigEndianKey: @NO}; + + * \~english + Initialize voice messages. + + @param audioData Audio data in wav format. + @param duration The duration of the voice message, in seconds. + @ return voice message object. + + @ discussion + If you are not using the recording feature in IMKit, you shall ensure the following when initializing voice messages. + 1. AudioData must be mono wav format audio data. + 2. The sampling rate of audioData must be 8000Hz and the number of sampling bits (precision) must be 16 bits. + + You can refer to the recording parameters in IMKit: + NSDictionary *settings = @{AVFormatIDKey: @(kAudioFormatLinearPCM), + AVSampleRateKey: @8000.00f, + AVNumberOfChannelsKey: @1, + AVLinearPCMBitDepthKey: @16, + AVLinearPCMIsNonInterleaved: @NO, + AVLinearPCMIsFloatKey: @NO, + AVLinearPCMIsBigEndianKey: @NO}; + */ ++ (instancetype)messageWithAudio:(NSData *)audioData duration:(long)duration; + +@end diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCWatchKitStatusDelegate.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCWatchKitStatusDelegate.h new file mode 100644 index 0000000..364957f --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCWatchKitStatusDelegate.h @@ -0,0 +1,272 @@ +// +// RCWatchKitStatusDelegate.h +// RongIMLib +// +// Created by litao on 15/6/4. +// Copyright (c) 2015 RongCloud. All rights reserved. +// + +#ifndef RongIMLib_RCwatchKitStatusDelegate_h +#define RongIMLib_RCwatchKitStatusDelegate_h + +/*! + * \~chinese + 用于 Apple Watch 的 IMLib 事务监听器 + + @discussion 此协议定义了 IMLib 在状态变化和各种活动时的回调,主要用于 Apple + Watch。 + + * \~english + IMLib transaction listener for Apple Watch. + + @ discussion This protocol defines the callback for IMLib in case of state changes and various activities, and is mainly used for Apple. + Watch . + */ +@protocol RCWatchKitStatusDelegate + +@optional + +#pragma mark Connection status +/*! + * \~chinese + 连接状态发生变化的回调 + + @param status SDK 与融云服务器的连接状态 + + * \~english + Callback for a change in connection status. + + @param status Connection status between SDK and CVM. + */ +- (void)notifyWatchKitConnectionStatusChanged:(RCConnectionStatus)status; + +#pragma mark Message Receive + +/*! + * \~chinese + 收到消息的回调 + + @param receivedMsg 收到的消息实体 + + * \~english + Callback for receiving message. + + @param receivedMsg Received message entity. + */ +- (void)notifyWatchKitReceivedMessage:(RCMessage *)receivedMsg; + +/*! + * \~chinese + 向外发送消息的回调 + + @param message 待发送消息 + + * \~english + Callback for sending messages out. + + @param message Message to be sent. + */ +- (void)notifyWatchKitSendMessage:(RCMessage *)message; + +/*! + * \~chinese + 发送消息完成的回调 + + @param messageId 消息 ID + @param status 完成的状态吗。0 表示成功,非 0 表示失败 + + * \~english + Callback for sending message completely + + @param messageId Message ID. + @param status The state of completion. 0 indicates success, and non-0 indicates failure. + */ +- (void)notifyWatchKitSendMessageCompletion:(long)messageId status:(RCErrorCode)status; + +/*! + * \~chinese + 上传图片进度更新的回调 + + @param progress 进度 + @param messageId 消息 ID + + * \~english + Callback for progress update for uploading images. + + @param progress Progress. + @param messageId Message ID. + */ +- (void)notifyWatchKitUploadFileProgress:(int)progress messageId:(long)messageId; + +#pragma mark Message & Conversation +/*! + * \~chinese + 删除会话的回调 + + @param conversationTypeList 会话类型的数组 + + * \~english + Callback for deleting the conversation. + + @param conversationTypeList An array of conversation types. + */ +- (void)notifyWatchKitClearConversations:(NSArray *)conversationTypeList; + +/*! + * \~chinese + 删除消息的回调 + + @param conversationType 会话类型 + @param targetId 会话 ID + + * \~english + Callback for deleting the message. + + @param conversationType Conversation type + @param targetId Conversation ID. + */ +- (void)notifyWatchKitClearMessages:(RCConversationType)conversationType targetId:(NSString *)targetId; + +/*! + * \~chinese + 删除消息的回调 + + @param messageIds 消息 ID 的数组 + + * \~english + Callback for deleting the message. + + @param messageIds Array of message ID. + */ +- (void)notifyWatchKitDeleteMessages:(NSArray *)messageIds; + +/*! + * \~chinese + 清除未读消息数的回调 + + @param conversationType 会话类型 + @param targetId 会话 ID + + * \~english + Callback for clearing the number of unread messages. + + @param conversationType Conversation type + @param targetId Conversation ID. + */ +- (void)notifyWatchKitClearUnReadStatus:(RCConversationType)conversationType targetId:(NSString *)targetId; + +#pragma mark Discussion + +/*! + * \~chinese + 创建讨论组的回调 + + @param name 讨论组名称 + @param userIdList 成员的用户 ID 列表 + + * \~english + Callback for creating a discussion group. + + @param name Discussion Group name. + @param userIdList User ID list of members. + */ +- (void)notifyWatchKitCreateDiscussion:(NSString *)name userIdList:(NSArray *)userIdList; + +/*! + * \~chinese + 创建讨论组成功的回调 + + @param discussionId 讨论组的 ID + + * \~english + Callback for creating a discussion group successfully + + @param discussionId ID of the discussion group. + */ +- (void)notifyWatchKitCreateDiscussionSuccess:(NSString *)discussionId; + +/*! + * \~chinese + 创建讨论组失败 + + @param errorCode 创建失败的错误码 + + * \~english + Failed to create discussion group. + + @param errorCode Create a failed error code. + */ +- (void)notifyWatchKitCreateDiscussionError:(RCErrorCode)errorCode; + +/*! + * \~chinese + 讨论组加人的回调 + + @param discussionId 讨论组的 ID + @param userIdList 添加成员的用户 ID 列表 + + @discussion 加人的结果可以通过 notifyWatchKitDiscussionOperationCompletion 获得。 + + * \~english + Callback for discussion group members. + + @param discussionId ID of the discussion group. + @param userIdList ID list of users who add members. + + @ discussion The added results can be obtained through notifyWatchKitDiscussionOperationCompletion. + */ +- (void)notifyWatchKitAddMemberToDiscussion:(NSString *)discussionId userIdList:(NSArray *)userIdList; + +/*! + * \~chinese + 讨论组踢人的回调 + + @param discussionId 讨论组 ID + @param userId 用户 ID + + @discussion 踢人的结果可以通过 notifyWatchKitDiscussionOperationCompletion 获得。 + + * \~english + Callback for kicking in the discussion group. + + @param discussionId Discussion group ID. + @param userId User ID. + + @ discussion The result of kicking can be obtained through notifyWatchKitDiscussionOperationCompletion. + */ +- (void)notifyWatchKitRemoveMemberFromDiscussion:(NSString *)discussionId userId:(NSString *)userId; + +/*! + * \~chinese + 退出讨论组的回调 + + @param discussionId 讨论组 ID + + @discussion 创建的结果可以通过 notifyWatchKitDiscussionOperationCompletion 获得。 + + * \~english + Callback for exiting the discussion group. + + @param discussionId Discussion group ID. + + @ discussion The results created can be obtained through notifyWatchKitDiscussionOperationCompletion. + */ +- (void)notifyWatchKitQuitDiscussion:(NSString *)discussionId; + +/*! + * \~chinese + 讨论组操作的回调。tag:100-邀请;101-踢人;102-退出。status:0 成功,非 0 失败 + + @param tag 讨论组的操作类型。100 为加人,101 为踢人,102 为退出 + @param status 操作的结果。0表示成功,非0表示失败 + + * \~english + Callback for discussion group operation. Tag:100- invitation; 101-kick; 102-quit. Status:0 for success, non-zero for failure + + @param tag The type of operation for the discussion group. 100 for joining, 101 for kicking and 102 for quitting. + @param status The result of the operation. 0 indicates success, and non-0 indicates failure. + */ +- (void)notifyWatchKitDiscussionOperationCompletion:(int)tag status:(RCErrorCode)status; + +@end +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCiOSConfig.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCiOSConfig.h new file mode 100644 index 0000000..3cc4a64 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCiOSConfig.h @@ -0,0 +1,63 @@ +// +// RCiOSConfig.h +// RongIMLib +// +// Created by RongCloud on 2020/9/17. +// Copyright © 2020 RongCloud. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCiOSConfig : NSObject + +/*! + * \~chinese + iOS 平台通知栏分组 ID + 相同的 thread-id 推送分为一组 + iOS10 开始支持 + + * \~english + Group ID of iOS platform notification bar + The push with same thread-id is divided into a group. + IOS10 starts to support. + */ +@property (nonatomic, copy) NSString *threadId; + +/*! + * \~chinese + iOS 标识推送的类型 + 如果不设置后台默认取消息类型字符串,如 RC:TxtMsg + + * \~english + Type of pushed iOS identifier + If you do not set the background to take the message type string by default, such as RC:TxtMsg. + */ +@property (nonatomic, copy) NSString *category; + +/*! + * \~chinese + iOS 平台通知覆盖 ID + apnsCollapseId 相同时,新收到的通知会覆盖老的通知,最大 64 字节 + iOS10 开始支持 + + * \~english + Overriding ID of iOS platform notification + When the apnsCollapseId is the same, the new notification will overwrite the old notification with maximum of 64 bytes. + iOS10 starts to support it + */ +@property (nonatomic, copy) NSString *apnsCollapseId; + +/*! + * \~chinese + iOS 富文本推送内容 + + * \~english + Content of pushed iOS rich text + */ +@property (nonatomic, copy) NSString *richMediaUri; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RongIMLibCore.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RongIMLibCore.h new file mode 100644 index 0000000..a019146 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RongIMLibCore.h @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2014-2015, RongCloud. + * All rights reserved. + * + * All the contents are the copyright of RongCloud Network Technology Co.Ltd. + * Unless otherwise credited. http://rongcloud.cn + * + */ + +// RongIMLibCore.h +// Created by xugang on 14/12/11. + +#import + +//! Project version number for RongIMLibCore. +FOUNDATION_EXPORT double RongIMLibCoreVersionNumber; + +//! Project version string for RongIMLibCore. +FOUNDATION_EXPORT const unsigned char RongIMLibCoreVersionString[]; + +/// IMLib +#import +#import +#import +#import +/// Conversation +#import +#import +#import +/// Message +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +/// Util +#import +#import +#import +#import +#import + +/// Other +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import + +// log +#import + +// Downlad +#import +#import diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/interf_dec.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/interf_dec.h new file mode 100644 index 0000000..5edba0c --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/interf_dec.h @@ -0,0 +1,34 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 2009 Martin Storsjo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ + +#ifndef OPENCORE_AMRNB_INTERF_DEC_H +#define OPENCORE_AMRNB_INTERF_DEC_H + +#ifdef __cplusplus +extern "C" { +#endif + +void *Decoder_Interface_init(void); +void Decoder_Interface_exit(void *state); +void Decoder_Interface_Decode(void *state, const unsigned char *in, short *out, int bfi); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/interf_enc.h b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/interf_enc.h new file mode 100644 index 0000000..781e2fe --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/interf_enc.h @@ -0,0 +1,50 @@ +/* ------------------------------------------------------------------ + * Copyright (C) 2009 Martin Storsjo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the License for the specific language governing permissions + * and limitations under the License. + * ------------------------------------------------------------------- + */ + +#ifndef OPENCORE_AMRNB_INTERF_ENC_H +#define OPENCORE_AMRNB_INTERF_ENC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef AMRNB_WRAPPER_INTERNAL +/* Copied from enc/src/gsmamr_enc.h */ +enum Mode { + MR475 = 0, /* 4.75 kbps */ + MR515, /* 5.15 kbps */ + MR59, /* 5.90 kbps */ + MR67, /* 6.70 kbps */ + MR74, /* 7.40 kbps */ + MR795, /* 7.95 kbps */ + MR102, /* 10.2 kbps */ + MR122, /* 12.2 kbps */ + MRDTX, /* DTX */ + N_MODES /* Not Used */ +}; +#endif + +void *Encoder_Interface_init(int dtx); +void Encoder_Interface_exit(void *state); +int Encoder_Interface_Encode(void *state, enum Mode mode, const short *speech, unsigned char *out, int forceSpeech); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Info.plist b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Info.plist new file mode 100644 index 0000000..3aff6b6 Binary files /dev/null and b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Info.plist differ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Modules/module.modulemap b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Modules/module.modulemap new file mode 100644 index 0000000..ee665e7 --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RongIMLibCore { + umbrella header "RongIMLibCore.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/RongIMLibCore b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/RongIMLibCore new file mode 100644 index 0000000..80a6914 Binary files /dev/null and b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/RongIMLibCore differ diff --git a/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..dcb86eb --- /dev/null +++ b/nativeplugins/ios/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/_CodeSignature/CodeResources @@ -0,0 +1,1092 @@ + + + + + files + + Headers/RCAMRDataConverter.h + + z82A8pT37Su0Trz2TFD8JnoBsV8= + + Headers/RCAndroidConfig.h + + CUfttSZyDOOH7r8GP1P+YeKZC6w= + + Headers/RCChannelClient.h + + DVHXzbtlt0amNwt7mMBbXllGAAU= + + Headers/RCCommandMessage.h + + 9J3Uk3CXXhn8BBJbMxZ4Niq0f9Y= + + Headers/RCCommandNotificationMessage.h + + zJ2Q6SxBDESNqrJkM9phu5wUB4A= + + Headers/RCContactNotificationMessage.h + + 4ZdwrYySNZVNOahxOB4WTWa/vHs= + + Headers/RCConversation.h + + EcFFJIdI9YQPOnVF0wzhcPvTHuA= + + Headers/RCConversationChannelProtocol.h + + Eqk7tzNzQm++TWxcEMriP+rZ9x0= + + Headers/RCConversationIdentifier.h + + ev9iFFAllQdMtrfh8qayGy02FKE= + + Headers/RCConversationStatusInfo.h + + zd4EzEDoRoS6JOQVEuEdBKTVXVc= + + Headers/RCConversationTagInfo.h + + JPMapGS1Bt2DgsLltG9gAssYHzs= + + Headers/RCCoreClient.h + + fTLKTGAKjUqNjqMMDkAbSZWHIik= + + Headers/RCDownloadItem.h + + uUxMJPJUub3kI+D9XIZmQZwSqWQ= + + Headers/RCFileMessage.h + + ETYYNnrA/I/Z9r3BPHPoI7K7pEA= + + Headers/RCFileUtility.h + + /fYWIopRzVhBM36CRnKEYZVVGuc= + + Headers/RCFwLog.h + + z2xBa7jqDb+D3akVfDtwqgue1HA= + + Headers/RCGIFMessage.h + + THA3P3rAxO/GiMWunSbSb4Lf/mc= + + Headers/RCGroup.h + + QPHfV6mabNlczy0x1IAUoPFTm44= + + Headers/RCGroupMessageReaderV2.h + + 9AQw+VUYIiG6L0IWuo3lj4mjphI= + + Headers/RCGroupNotificationMessage.h + + E4wgZxjkrjt9mvQk4FLZvw5dS/A= + + Headers/RCGroupReadReceiptInfoV2.h + + CqwAC233kpRqdjiVGt89FYLjDzg= + + Headers/RCGroupReadReceiptV2Manager.h + + cH7nAU7sn64Hpm9kd0Xciezf4p0= + + Headers/RCGroupReadReceiptV2Protocol.h + + gCPcphSMWIbWW7ZiODSOEMpe5xo= + + Headers/RCHQVoiceMessage.h + + aTWhNDyi4LYX19dWxpPba/1+9ZE= + + Headers/RCHistoryMessageOption.h + + SQkiWf4YCOZdlg1LstTUQzOD9Z0= + + Headers/RCIMClientProtocol.h + + Xv0xB9mt8aI9fjCXyarayKvtMOY= + + Headers/RCImageCompressConfig.h + + 5Ptf+r4cwJvCpO5DZVsYNcmC54I= + + Headers/RCImageMessage.h + + 04AQ8vxkxDdXTgVh2Tjhs569P2Y= + + Headers/RCInformationNotificationMessage.h + + tDVzRchCtUOCjJGGyOEoETG+LYE= + + Headers/RCMediaMessageContent.h + + Bu2mIpcp9X7QT+V59QtkhUG9jFA= + + Headers/RCMentionedInfo.h + + 9tXPz4Z1hka5gIcelfjtO72nW5I= + + Headers/RCMessage.h + + uuzZsXJXKrosslhRLGkW+idmnUE= + + Headers/RCMessageConfig.h + + Yk1r8WDG89nlb3VIhIXL8jJuHic= + + Headers/RCMessageContent.h + + zYqmSrMMSBYb0qiZ5uJX+NzvfBA= + + Headers/RCMessagePushConfig.h + + u6mC8WshompDwLB9ZdGX5n2zWdo= + + Headers/RCProfileNotificationMessage.h + + kiMXoQRArMJ3VSbdHneHZprk8NA= + + Headers/RCPushProfile.h + + KBit+jgr57aAV10diEmSMHAjWpM= + + Headers/RCReadReceiptInfo.h + + l3NBqKg7HSnjPzJreZjVf2JDoT8= + + Headers/RCRecallNotificationMessage.h + + /RNRVAcZ3RgUhrmxjj30R0/pznQ= + + Headers/RCReferenceMessage.h + + X2uSK2dFnznjfnuESlcCyh4sxRc= + + Headers/RCRemoteHistoryMsgOption.h + + tnuLbn79PpBdTycpLVkM4rySD6k= + + Headers/RCResumeableDownloader.h + + bW/Auhycaaw/4MT+5IKfouFLr74= + + Headers/RCRichContentMessage.h + + mYTdThRKCzLB+VWwV9UJYwB3hjQ= + + Headers/RCSearchConversationResult.h + + utf6uw3R6xtotm/Andtx1qSakdg= + + Headers/RCSendMessageOption.h + + 1dHvdStFceNuPq45TViSUWQoulI= + + Headers/RCSightMessage.h + + QWa7aqsLta1ECa4gYWZkFUC6HCE= + + Headers/RCStatusDefine.h + + XBA7WyFWNS175j2CjwIEhYsFluM= + + Headers/RCStatusMessage.h + + 6dil9GAidLcFuZ5fwVi0DAeHlu4= + + Headers/RCTSMutableDictionary.h + + MwNWvK9j99I3xgzLTBtsA42A2GM= + + Headers/RCTagInfo.h + + jNixmJoIkWcx78PSzrST/WAouR8= + + Headers/RCTagProtocol.h + + AR3j2+AoAKtnBK92D0/9P95RzaI= + + Headers/RCTextMessage.h + + N62GZuK0LvSK9roYAqNnK+i2zcE= + + Headers/RCUnknownMessage.h + + soda3kJO++dj39d1hl37j0MllIs= + + Headers/RCUploadImageStatusListener.h + + 7mI4F0fgpJqFTAy3aWDIom5XB5I= + + Headers/RCUploadMediaStatusListener.h + + 8OGHirviQMc5pB2uRNR5lsZSyjw= + + Headers/RCUserInfo.h + + 64MgB0F1T81Wm1hXlyz/ghbNNCI= + + Headers/RCUserOnlineStatusInfo.h + + k1AnrSuyz/8FMiIN74mn2BCO+Wc= + + Headers/RCUserTypingStatus.h + + XKFBM07pnNcxEYVX1u6LxFszFWc= + + Headers/RCUtilities.h + + Kpvr8ncpWpM2L80yrARwRJ8MxSA= + + Headers/RCVoiceMessage.h + + FtyDE2/GPPGgJW+xg6aBDBvEN4Y= + + Headers/RCWatchKitStatusDelegate.h + + g4z9xfDM4W5528EDfIOe8udx+J0= + + Headers/RCiOSConfig.h + + u7YYwtKNxnAkL6WclNy6uilNCfI= + + Headers/RongIMLibCore.h + + JtRkl4ECMMNwctJfNt6k9scWTTw= + + Headers/interf_dec.h + + UCTkStJiMKHFE7G0UoVGa1SjAhY= + + Headers/interf_enc.h + + 6wK3TxTgoBKfb5BhHXn/uThe7og= + + Info.plist + + BfT52jp8HmXv1LhVeCGs5bXsrG4= + + Modules/module.modulemap + + H1rer/SL6j8CPbSoGiUA4HpEz6Q= + + + files2 + + Headers/RCAMRDataConverter.h + + hash + + z82A8pT37Su0Trz2TFD8JnoBsV8= + + hash2 + + di3CLYRYWBJuru7J1h/8WOa1+y5TZ9x6LMGB/UKCtUo= + + + Headers/RCAndroidConfig.h + + hash + + CUfttSZyDOOH7r8GP1P+YeKZC6w= + + hash2 + + Ig7IaQVhryGth11RaVW8ykFxB+7thNseWiD+bDw9mKw= + + + Headers/RCChannelClient.h + + hash + + DVHXzbtlt0amNwt7mMBbXllGAAU= + + hash2 + + QTmPNeSMS/w/Qasbut4mi7zwmuNbTo/N7KHQrZl0+Ds= + + + Headers/RCCommandMessage.h + + hash + + 9J3Uk3CXXhn8BBJbMxZ4Niq0f9Y= + + hash2 + + wrvo6wAikwDTRxXOaf0hEi6qTbcXjrmzAKpa+CTYbdE= + + + Headers/RCCommandNotificationMessage.h + + hash + + zJ2Q6SxBDESNqrJkM9phu5wUB4A= + + hash2 + + j85vKqViVZOBaSNrVGM7fV3IoPVBojUgAWwIzPaSafw= + + + Headers/RCContactNotificationMessage.h + + hash + + 4ZdwrYySNZVNOahxOB4WTWa/vHs= + + hash2 + + oak/WE98vh8bGMjdJB2Ip7Fzj4wqKC9HcFbUC2WXZf0= + + + Headers/RCConversation.h + + hash + + EcFFJIdI9YQPOnVF0wzhcPvTHuA= + + hash2 + + Na1jfJdhd+7JCTNz7NiQsr0/6UoXGeJhIDgWZshlN20= + + + Headers/RCConversationChannelProtocol.h + + hash + + Eqk7tzNzQm++TWxcEMriP+rZ9x0= + + hash2 + + UlJVje4z9HhrRBNZDdUmTDF/GKgzFnhtu9pQtqLV09g= + + + Headers/RCConversationIdentifier.h + + hash + + ev9iFFAllQdMtrfh8qayGy02FKE= + + hash2 + + hS9qnRR7mc769LzP16jy0iT1Y/2wLkIfY4xuONucNxk= + + + Headers/RCConversationStatusInfo.h + + hash + + zd4EzEDoRoS6JOQVEuEdBKTVXVc= + + hash2 + + IgPJEEpMr8XGJ99auXkdhSmBIdnWOVW6ExJ1wZSJaec= + + + Headers/RCConversationTagInfo.h + + hash + + JPMapGS1Bt2DgsLltG9gAssYHzs= + + hash2 + + ZZxR5dIZn+9vD7UnBrxxJGi1Qi7eAJqOMdcUY35/kDU= + + + Headers/RCCoreClient.h + + hash + + fTLKTGAKjUqNjqMMDkAbSZWHIik= + + hash2 + + vyrxnF+Kd8p0Xz1zwOletEbKpTWHGcpLI4cmXBmfMus= + + + Headers/RCDownloadItem.h + + hash + + uUxMJPJUub3kI+D9XIZmQZwSqWQ= + + hash2 + + kAyNs/2EEJ34k3aj3Uq485Yz7FWlus+Ui+Gbw7tc8J0= + + + Headers/RCFileMessage.h + + hash + + ETYYNnrA/I/Z9r3BPHPoI7K7pEA= + + hash2 + + pFV+qSUF+ZuGZu7I//IH4Ys5j7FINHZXYs21KqWMcqQ= + + + Headers/RCFileUtility.h + + hash + + /fYWIopRzVhBM36CRnKEYZVVGuc= + + hash2 + + /Qzub2EUx24k0Wae4n+LopJxk/S1/GfzJKVbmHRRywY= + + + Headers/RCFwLog.h + + hash + + z2xBa7jqDb+D3akVfDtwqgue1HA= + + hash2 + + ANCO/UmVzEt5aOsHDVjhp73AAL/+zEViSHrnw2+4Ce0= + + + Headers/RCGIFMessage.h + + hash + + THA3P3rAxO/GiMWunSbSb4Lf/mc= + + hash2 + + ds0izXVARahr7HMXe74qRrvpdIYvwg6BQ7aqM1MzFzg= + + + Headers/RCGroup.h + + hash + + QPHfV6mabNlczy0x1IAUoPFTm44= + + hash2 + + 36vP8YEPSXIA8YIamFIQFSvZoqAYgTS9B/OPvQoyT4k= + + + Headers/RCGroupMessageReaderV2.h + + hash + + 9AQw+VUYIiG6L0IWuo3lj4mjphI= + + hash2 + + WNjq45wCW6AuIaBBOKhb3vkNUJFDcJy/fUWK7YdhwzM= + + + Headers/RCGroupNotificationMessage.h + + hash + + E4wgZxjkrjt9mvQk4FLZvw5dS/A= + + hash2 + + AQ920K9Vr+cFvtNxOLBK0HHhhW3zjOkAy/uYsuFWgOs= + + + Headers/RCGroupReadReceiptInfoV2.h + + hash + + CqwAC233kpRqdjiVGt89FYLjDzg= + + hash2 + + 5OuEVg2QL0K4KBxM7t+b6opSYkto1Gs8qYGtwBdlBBY= + + + Headers/RCGroupReadReceiptV2Manager.h + + hash + + cH7nAU7sn64Hpm9kd0Xciezf4p0= + + hash2 + + kh3yXIIcjFU+O4DBgLwRb+nDKf6/u2Om3cG6LGR2tAo= + + + Headers/RCGroupReadReceiptV2Protocol.h + + hash + + gCPcphSMWIbWW7ZiODSOEMpe5xo= + + hash2 + + 9nPTIPwfKnjJrnJXFrgUwSC6Dg6Z7TEssXM6bttc08s= + + + Headers/RCHQVoiceMessage.h + + hash + + aTWhNDyi4LYX19dWxpPba/1+9ZE= + + hash2 + + qbjRFMN+mDJQ1TdQVhqmS1UTniXmgMbrSKRaill4vQI= + + + Headers/RCHistoryMessageOption.h + + hash + + SQkiWf4YCOZdlg1LstTUQzOD9Z0= + + hash2 + + av7UDHGEth1779i+f6vktpFHCKAaAlxZZD4Tx5cdAzQ= + + + Headers/RCIMClientProtocol.h + + hash + + Xv0xB9mt8aI9fjCXyarayKvtMOY= + + hash2 + + VcUEkjCYbSVQKN5R/SLdRjRq5YakCiCkgbbfV9OPI3E= + + + Headers/RCImageCompressConfig.h + + hash + + 5Ptf+r4cwJvCpO5DZVsYNcmC54I= + + hash2 + + wbJTWq9TRcEQmCB2xqjUsjuagQGSE2v9NiN0/zSk/lE= + + + Headers/RCImageMessage.h + + hash + + 04AQ8vxkxDdXTgVh2Tjhs569P2Y= + + hash2 + + oFiWap56BFntqOfAV/2ML3Kt9gUnEtPW7jRoXa7S+N0= + + + Headers/RCInformationNotificationMessage.h + + hash + + tDVzRchCtUOCjJGGyOEoETG+LYE= + + hash2 + + A8uTHs/Glh1RyAkcS9dDh6VZgaKItRhhXwVf1JIR8a8= + + + Headers/RCMediaMessageContent.h + + hash + + Bu2mIpcp9X7QT+V59QtkhUG9jFA= + + hash2 + + tiWLO0PDe1+NtJ4nJArite2f51Vgt3tCasa65x7psLo= + + + Headers/RCMentionedInfo.h + + hash + + 9tXPz4Z1hka5gIcelfjtO72nW5I= + + hash2 + + ivQzLUhJ1cEA2HN0fkGSIzFVWqlFgnQTjPABmWggDQY= + + + Headers/RCMessage.h + + hash + + uuzZsXJXKrosslhRLGkW+idmnUE= + + hash2 + + NSGzonmNXXQAsToZvSRhUIAl7Trm4JPBg2sqyb67mj8= + + + Headers/RCMessageConfig.h + + hash + + Yk1r8WDG89nlb3VIhIXL8jJuHic= + + hash2 + + IEkQnXVZbKDv0ss6pO4I+Bb70Ksd5SjdMd6c4r3sLDM= + + + Headers/RCMessageContent.h + + hash + + zYqmSrMMSBYb0qiZ5uJX+NzvfBA= + + hash2 + + YeC8fV9ofsDUvnv91f+nx+PnfBNnlnT+eR3Ebte5rA8= + + + Headers/RCMessagePushConfig.h + + hash + + u6mC8WshompDwLB9ZdGX5n2zWdo= + + hash2 + + mb2Wc726MefGU+LKaIOnpIbwXrhGytxoF9UT+Jmicz4= + + + Headers/RCProfileNotificationMessage.h + + hash + + kiMXoQRArMJ3VSbdHneHZprk8NA= + + hash2 + + VImo7oQe3BEfthK5gpQcCU9eMgKSEzsRBjpom2ku9co= + + + Headers/RCPushProfile.h + + hash + + KBit+jgr57aAV10diEmSMHAjWpM= + + hash2 + + AWm9KZy954uAyEtA+nqLtq+/DFLPzKZibs96MBRc5/E= + + + Headers/RCReadReceiptInfo.h + + hash + + l3NBqKg7HSnjPzJreZjVf2JDoT8= + + hash2 + + PDv6FlRFe2AwVA+fk4y/MysdYwTAtFRR3vqdtPoFCM4= + + + Headers/RCRecallNotificationMessage.h + + hash + + /RNRVAcZ3RgUhrmxjj30R0/pznQ= + + hash2 + + gRtpWW01ztdHusDOrMa9MiPhIV0WKuHjyZAeZq4iZeI= + + + Headers/RCReferenceMessage.h + + hash + + X2uSK2dFnznjfnuESlcCyh4sxRc= + + hash2 + + rpV7Wru8tEH1D8g4iQQuZ4zgB/M7AJdzPQbaddT9dWk= + + + Headers/RCRemoteHistoryMsgOption.h + + hash + + tnuLbn79PpBdTycpLVkM4rySD6k= + + hash2 + + 6Iu+VuUNslXkuPbZpzCW/nHH8jrDKhwaGgN/7u87n/E= + + + Headers/RCResumeableDownloader.h + + hash + + bW/Auhycaaw/4MT+5IKfouFLr74= + + hash2 + + lpJJhAGIj1rgggzPfAHejpoO4d/iXyD7P+jf6wZiJQU= + + + Headers/RCRichContentMessage.h + + hash + + mYTdThRKCzLB+VWwV9UJYwB3hjQ= + + hash2 + + 5G3CuQc8DQP+eaU21e2YsSb2QVbRx0Fs/oEENldHRxA= + + + Headers/RCSearchConversationResult.h + + hash + + utf6uw3R6xtotm/Andtx1qSakdg= + + hash2 + + UJn1QSDtIr8gch/pho/MH2EbMhgLh+gAL41myb1qTc0= + + + Headers/RCSendMessageOption.h + + hash + + 1dHvdStFceNuPq45TViSUWQoulI= + + hash2 + + Xda9KNi+NupRHS4jlV4m2jcnM2iMk7d1mdqhslzCFKI= + + + Headers/RCSightMessage.h + + hash + + QWa7aqsLta1ECa4gYWZkFUC6HCE= + + hash2 + + m0q/TVTMAiqmW9QuieHciq1nFoBKVMvcI3/UVDRznnc= + + + Headers/RCStatusDefine.h + + hash + + XBA7WyFWNS175j2CjwIEhYsFluM= + + hash2 + + wHNzkSW918BE8ws7RFQb/tzmYI3UYH172Zaa/TSBGkA= + + + Headers/RCStatusMessage.h + + hash + + 6dil9GAidLcFuZ5fwVi0DAeHlu4= + + hash2 + + cBdmKolJ/sv4/XwnzGR4qpGikXY0voEjXUYCSOFqN5E= + + + Headers/RCTSMutableDictionary.h + + hash + + MwNWvK9j99I3xgzLTBtsA42A2GM= + + hash2 + + Y8iXI+OLVsmY+7PVp2HrNH68m7FIKrZc75449pGSjDc= + + + Headers/RCTagInfo.h + + hash + + jNixmJoIkWcx78PSzrST/WAouR8= + + hash2 + + 53UEDchQZ9hrKYpggnWh0E9AsyJsuwjUKV3lfnaihPo= + + + Headers/RCTagProtocol.h + + hash + + AR3j2+AoAKtnBK92D0/9P95RzaI= + + hash2 + + 4V3mdGUWeyEOLwCV2xTn3fJUj8CXNlxfLFzRSmFLR3U= + + + Headers/RCTextMessage.h + + hash + + N62GZuK0LvSK9roYAqNnK+i2zcE= + + hash2 + + DE0ccr39N0kLE1kw35SDhSJua9wpSFZ/hu+t31Zn1pQ= + + + Headers/RCUnknownMessage.h + + hash + + soda3kJO++dj39d1hl37j0MllIs= + + hash2 + + mNVbKD5KzOOsVJHXSj3vVN/E1wJh8izARME19eNvkYY= + + + Headers/RCUploadImageStatusListener.h + + hash + + 7mI4F0fgpJqFTAy3aWDIom5XB5I= + + hash2 + + U4WTYWCSCYOjOOxdtQa/d4wg1lUYlGuyqZAuWup96aY= + + + Headers/RCUploadMediaStatusListener.h + + hash + + 8OGHirviQMc5pB2uRNR5lsZSyjw= + + hash2 + + J2pFtDw8P7A0y65jOhIzwvy1UgUMMD0VcUT6pnVPDYU= + + + Headers/RCUserInfo.h + + hash + + 64MgB0F1T81Wm1hXlyz/ghbNNCI= + + hash2 + + a7vQicqh2mjSJpOgPASy3thBb2h0BrP7/0Mbn+1lLkw= + + + Headers/RCUserOnlineStatusInfo.h + + hash + + k1AnrSuyz/8FMiIN74mn2BCO+Wc= + + hash2 + + ruxnzMsLvzAjBbU/NgUgrN78XYgI77OXver2QENR4lo= + + + Headers/RCUserTypingStatus.h + + hash + + XKFBM07pnNcxEYVX1u6LxFszFWc= + + hash2 + + F5pMbOL9Adk+DWxiQrw5f6AksA/jJtz72nng8zzEwZU= + + + Headers/RCUtilities.h + + hash + + Kpvr8ncpWpM2L80yrARwRJ8MxSA= + + hash2 + + TIvU7ckXV3oPtmMAyo92HvxRoub413eM6TOLm8uJHCo= + + + Headers/RCVoiceMessage.h + + hash + + FtyDE2/GPPGgJW+xg6aBDBvEN4Y= + + hash2 + + X237clUTkA1QVbJFRTp6R/2bDghM5/w46xZGuEuYSHg= + + + Headers/RCWatchKitStatusDelegate.h + + hash + + g4z9xfDM4W5528EDfIOe8udx+J0= + + hash2 + + VuQkwGMCZFoD2hzCTycrgDyiTGzKNY/aNuCi+cbI4VE= + + + Headers/RCiOSConfig.h + + hash + + u7YYwtKNxnAkL6WclNy6uilNCfI= + + hash2 + + eIizqKA/zraVdtVK2K11GHwpSkP+8yGOxGCl0vWjPys= + + + Headers/RongIMLibCore.h + + hash + + JtRkl4ECMMNwctJfNt6k9scWTTw= + + hash2 + + h1VQ58aqy/uSXChgT9kHj3rmV4yPGDmA9yVoZCg9UEQ= + + + Headers/interf_dec.h + + hash + + UCTkStJiMKHFE7G0UoVGa1SjAhY= + + hash2 + + g9dPxTpPMYzmqspWl8kjlYO8W0zKrGAuOVA5I9v3ai4= + + + Headers/interf_enc.h + + hash + + 6wK3TxTgoBKfb5BhHXn/uThe7og= + + hash2 + + aU92pNvAQ0pIhvtSGkCjKMU7BxZyS6FJb08rMcI+Few= + + + Modules/module.modulemap + + hash + + H1rer/SL6j8CPbSoGiUA4HpEz6Q= + + hash2 + + SmT6rIo46jrL5oVu0v0y8QH83cqHbgW6VoKiosRQ8RQ= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/Info.plist b/nativeplugins/ios/RongIMWrapper.xcframework/Info.plist new file mode 100644 index 0000000..163b434 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/Info.plist @@ -0,0 +1,40 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + RongIMWrapper.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-x86_64-simulator + LibraryPath + RongIMWrapper.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWCommandMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWCommandMessage.h new file mode 100644 index 0000000..dcbe5f3 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWCommandMessage.h @@ -0,0 +1,14 @@ +// +// RCIMIWCommandMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWCommandMessageIdentifier @"RC:IWCmdMsg" + +@interface RCIMIWCommandMessage : RCIMIWMessageContent + +@end diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWConverter.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWConverter.h new file mode 100644 index 0000000..e930676 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWConverter.h @@ -0,0 +1,32 @@ +// +// RCIMIWConverter.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/21. +// + +#import +#import +//#import +#import "RCIMIWPushNotificationMessage.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWConverter : NSObject + ++ (NSDictionary *)fromMessage:(RCMessage *)message; ++ (NSDictionary *)fromMessageContent:(NSString *)objectName messageContent:(RCMessageContent *)messageContent; ++ (NSDictionary *)fromConversation:(RCConversation *)conversation; ++ (NSDictionary *)fromConversationIdentifier:(RCConversationIdentifier *)conversationIdentifier; ++ (NSDictionary *)fromPushNotificationMessage:(RCIMIWPushNotificationMessage *)message; + + ++ (RCMessage *)toMessage:(NSDictionary *)map; ++ (RCMessageContent *)toMessageContent:(NSDictionary *)map; ++ (RCConversation *)toConversation:(NSDictionary *)map; ++ (RCConversationIdentifier *)toConversationIdentifier:(NSDictionary *)map; ++ (RCIMIWPushNotificationMessage *)toPushNotificationMessage:(NSDictionary *)map; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWDefine.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWDefine.h new file mode 100644 index 0000000..0f65064 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWDefine.h @@ -0,0 +1,95 @@ +// +// RCIMIWDefine.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/24. +// + +#ifndef RCIMIWDefine_h +#define RCIMIWDefine_h + +#import +#import + +@class RCIMIWPushNotificationMessage; + +/// 连接状态 +typedef NS_ENUM(NSInteger, RCIMIWConnectionStatus) { + + /// 未知错误 + RCIMIWConnectionStatusUnknown = -1, + + /// 连接成功 + RCIMIWConnectionStatusConnected = 0, + + /// 连接中 + RCIMIWConnectionStatusConnecting = 1, + + /// 用户账户在其他设备登录,本机会被踢掉线 + RCIMIWConnectionStatusKickedByOtherClient = 2, + + /// 网络不可用 + RCIMIWConnectionStatusNetworkUnavailable = 3, + + /// Token 不正确 + RCIMIWConnectionStatusTokenIncorrect = 4, + + /// 用户被开发者后台封禁 + RCIMIWConnectionStatusUserBlocked = 5, + + /// 用户主动调用 disconnect 或 logout 接口断开连接 + RCIMIWConnectionStatusDisConnected = 6, + + /// 连接暂时挂起(多是由于网络问题导致),SDK 会在合适时机进行自动重连 + RCIMIWConnectionStatusSuspend = 13, + + /// 自动连接超时,SDK 将不会继续连接,用户需要做超时处理,再自行调用 connectWithToken 接口进行连接 + RCIMIWConnectionStatusTimeout = 14 +}; + +typedef NSString * RCIMIWPushType; +extern RCIMIWPushType const RCIMIWPushType_UNKNOWN; +extern RCIMIWPushType const RCIMIWPushType_RONG; +extern RCIMIWPushType const RCIMIWPushType_HW; +extern RCIMIWPushType const RCIMIWPushType_MI; +extern RCIMIWPushType const RCIMIWPushType_FCM; +extern RCIMIWPushType const RCIMIWPushType_GCM; +extern RCIMIWPushType const RCIMIWPushType_MEIZU; +extern RCIMIWPushType const RCIMIWPushType_VIVO; +extern RCIMIWPushType const RCIMIWPushType_OPPO; +extern RCIMIWPushType const RCIMIWPushType_APPLE; + +typedef NSString * RCIMIWPushSourceType; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeUnkown; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeOfflineMessage; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeFromAdmin; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeLocalMessage; + + +@protocol RCIMIWNotificationMessageListener + +- (void)OnNotificationMessageArrived:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; + +- (void)OnNotificationMessageClicked:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; + +@end + +typedef void(^RCIMIWOperationCallback)(RCErrorCode code); +typedef void(^RCIMIWOperationCallbackWithBool)(RCErrorCode code, BOOL flag); +typedef void(^RCIMIWOperationCallbackWithInt)(RCErrorCode code, int value); +typedef void(^RCIMIWOperationCallbackWithString)(RCErrorCode code, NSString *string); +typedef void(^RCIMIWOperationCallbackWithPushLanguage)(RCErrorCode code, RCPushLauguage pushLang); +typedef void(^RCIMIWOperationCallbackWithMessage)(RCErrorCode code, RCMessage *message); +typedef void(^RCIMIWOperationCallbackWithMessageList)(RCErrorCode code, NSArray *messages); +typedef void(^RCIMIWOperationCallbackWithConversation)(RCErrorCode code, RCConversation *conversation); +typedef void(^RCIMIWOperationCallbackWithConversationList)(RCErrorCode code, NSArray *conversations); +typedef void(^RCIMIWOperationCallbackWithConversationIdentifier)(RCErrorCode code, RCConversationIdentifier *identifier); +typedef void(^RCIMIWOperationCallbackWithSearchConversationResultList)(RCErrorCode code, NSArray *searchConversationResults); +typedef void(^RCIMIWOperationCallbackWithConversationNotificationStatus)(RCErrorCode code, RCConversationNotificationStatus status); +typedef void(^RCIMIWOperationCallbackWithRecallNotificationMessage)(RCErrorCode code, RCRecallNotificationMessage *messageContent); + + + +#endif /* RCIMIWDefine_h */ diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWEngine.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWEngine.h new file mode 100644 index 0000000..4131032 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWEngine.h @@ -0,0 +1,264 @@ +// +// RCIMIWEngine.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/15. +// + +#import +#import "RCIMIWDefine.h" + +@class RCIMIWEngineSetup; + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWEngine : NSObject + ++ (instancetype)initWithAppKey:(NSString *)key; + ++ (instancetype)initWithAppKey:(NSString *)key config:(RCIMIWEngineSetup *)config; + ++ (instancetype)getInstance; + +- (void)setDeviceTokenForApplePush:(NSString *)deviceToken; + +- (void)setPushContentShowStatus:(BOOL)showContent callback:(RCIMIWOperationCallback)callback; +- (void)getPushContentShowStatus:(RCIMIWOperationCallbackWithBool)callback; + +- (void)setPushLanguage:(RCPushLauguage)lang callback:(RCIMIWOperationCallback)callback; +- (void)getPushLanguage:(RCIMIWOperationCallbackWithPushLanguage)callback; + +- (void)setPushReceiveStatus:(BOOL)receive callback:(RCIMIWOperationCallback)callback; +- (void)getPushReceiveStatus:(RCIMIWOperationCallbackWithBool)callback; + +- (void)notifyOnNotificationMessageArrived:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; +- (void)notifyOnNotificationMessageClicked:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; +- (void)setOnNotificationMessageListener:(id)listener; + +- (void)setOfflineMessageDuration:(int)duration callback:(RCIMIWOperationCallback)callback; +- (void)getOfflineMessageDuration:(RCIMIWOperationCallbackWithInt)callback; + +- (void)setKickReconnectedDevice:(BOOL)kick; + +- (long long)getDeltaTime; + +- (NSString *)getCurrentUserID; + +// 连接管理 +- (RCIMIWConnectionStatus)getConnectionStatus; +- (void)connect:(NSString *)token callback:(RCIMIWOperationCallbackWithString)callback; +- (void)disconnect; +- (void)logout; + +// 会话管理 +- (void)getConversation:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithConversation)callback; +- (void)removeConversation:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; +- (void)getConversationList:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallbackWithConversationList)callback; +- (void)getConversationListByPage:(NSArray *)conversationTypes + count:(int)count + startTime:(long long)startTime + callback:(RCIMIWOperationCallbackWithConversationList)callback; +- (void)searchConversation:(NSString *)keyword + conversationTypeList:(NSArray *)conversationTypes + objectNameList:(NSArray *)objectNames + callback:(RCIMIWOperationCallbackWithSearchConversationResultList)callback; +- (void)clearConversations:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallback)callback; + +// 草稿 +- (void)getTextMessageDraft:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithString)callback; +- (void)saveTextMessageDraft:(RCConversationIdentifier *)identifier + textDraft:(NSString *)textDraft + callback:(RCIMIWOperationCallback)callback; +- (void)clearTextMessageDraft:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; + +// 未读计数 +- (void)getUnreadCount:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithInt)callback; +- (void)getUnreadCountByTag:(NSString *)tagId + containBlocked:(BOOL)containBlocked + callback:(RCIMIWOperationCallbackWithInt)callback; +- (void)getUnreadCountByConversationTypes:(NSArray *)conversationTypes + containsDND:(BOOL)containsDND + callback:(RCIMIWOperationCallbackWithInt)callback; +- (void)getTotalUnreadCount:(RCIMIWOperationCallbackWithInt)callback; +- (void)clearMessagesUnreadStatus:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; +- (void)getFirstUnreadMessage:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithMessage)callback; +- (void)getUnreadMentionedMessages:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithMessageList)callback; + +// 会话提醒管理 +- (void)setConversationNotificationStatus:(RCConversationIdentifier *)identifier + isBlocked:(BOOL)isBlocked + callback:(RCIMIWOperationCallbackWithConversationNotificationStatus)callback; + +- (void)getConversationNotificationStatus:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithConversationNotificationStatus)callback; + +- (void)getBlockedConversationList:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallbackWithConversationList)callback; + + +// 会话置顶 +- (void)setConversationStatusListener:(id)listener; +- (void)setConversationToTop:(RCConversationIdentifier *)identifier + isTop:(BOOL)isTop + callback:(RCIMIWOperationCallback)callback; +- (void)getToppedConversationList:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallbackWithConversationList)callback; + +// 输入状态 +- (void)setTypingStatusChangedListener:(id)listener; +- (void)setTypingUpdateSeconds:(NSInteger)typingUpdateSeconds; +- (void)sendTypingStatus:(RCConversationIdentifier *)identifier typingContent:(NSString *)typingContent; + +// 消息管理 +- (void)setOnMessageReceivedListener:(id)listener; + +- (void)getMessage:(long)messageId callback:(RCIMIWOperationCallbackWithMessage)callback; +- (void)getMessageByUid:(NSString *)messageUId callback:(RCIMIWOperationCallbackWithMessage)callback; +- (void)setMessageReceivedStatus:(long)messageId + status:(RCReceivedStatus)status + callback:(RCIMIWOperationCallback)callback; +- (void)setMessageSentStatus:(long)messageId + status:(RCSentStatus)status + callback:(RCIMIWOperationCallback)callback; +- (void)setMessageExtra:(long)messageId + extra:(NSString *)extra + callback:(RCIMIWOperationCallback)callback; + +// 加载消息 +- (void)getMessages:(RCConversationIdentifier *)identifier + option:(RCHistoryMessageOption *)option + callback:(RCIMIWOperationCallbackWithMessageList)callback; +// 以 messageId 为依据分页加载本地消息 +- (void)getHistoryMessages:(RCConversationIdentifier *)identifier + lastMessageId:(long)lastMessageId + count:(int)count + callback:(RCIMIWOperationCallbackWithMessageList)callback; +// 本方法仅为指定时间跳转到消息,不可作为分页加载方法使用 +- (void)getHistoryMessages:(RCConversationIdentifier *)identifier + sentTime:(long)sentTime + beforeCount:(int)beforeCount + afterCount:(int)afterCount + callback:(RCIMIWOperationCallbackWithMessageList)callback; +// 以时间为依据分页加载远端消息 +- (void)getRemoteHistoryMessages:(RCConversationIdentifier *)identifier + remoteHistoryMsgOption:(RCRemoteHistoryMsgOption *)option + callback:(RCIMIWOperationCallbackWithMessageList)callback; + +- (void)searchMessages:(RCConversationIdentifier *)identifier + keyword:(NSString *)keyword + count:(int)count + beginTime:(long)beginTime + callback:(RCIMIWOperationCallbackWithMessageList)callback; + + + + +// 发送消息 +- (RCMessage *)sendMessage:(RCConversationIdentifier *)identifier + messageContent:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + messageConfig:(RCMessageConfig *)messageConfig + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +- (RCMessage *)sendMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + sendOption:(RCSendMessageOption *)sendOption + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +// 发送媒体消息 +- (RCMessage *)sendMediaMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progressBlock:(void (^)(int progress, RCMessage *progressMessage))progressBlock + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock + cancel:(void (^)(RCMessage *cancelMessage))cancelBlock; + +// 发送定向消息 +- (RCMessage *)sendDirectionalMessage:(RCConversationIdentifier *)identifier + userIdList:(NSArray *)userIdList + messageContent:(RCMessageContent *)messageContent + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +// 媒体消息下载管理 +- (void)downloadMediaMessage:(RCMessage *)message + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +- (void)cancelDownloadMediaMessage:(RCMessage *)message; + +// 本地插入消息 +- (void)insertMessages:(NSArray *)messageList + callback:(RCIMIWOperationCallback)callback; + +- (void)insertIncomingMessage:(RCConversationIdentifier *)identifier + senderId:(NSString *)senderId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime + callback:(RCIMIWOperationCallbackWithMessage)callback; + +- (void)insertOutgoingMessage:(RCConversationIdentifier *)identifier + senderId:(NSString *)senderId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime + callback:(RCIMIWOperationCallbackWithMessage)callback; + +// 撤回 +- (void)recallMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + callback:(RCIMIWOperationCallbackWithRecallNotificationMessage)callback; + +// 删除消息 +- (void)deleteMessages:(NSArray *)messageIdList + callback:(RCIMIWOperationCallback)callback; +- (void)deleteRemoteMessages:(RCConversationIdentifier *)identifier + messageList:(NSArray *)messageList + callback:(RCIMIWOperationCallback)callback; +- (void)clearMessages:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; +- (void)clearRemoteMessages:(RCConversationIdentifier *)identifier + recordTime:(long long)recordTime + callback:(RCIMIWOperationCallback)callback; + +// 已读回执 +- (void)sendReadReceiptMessage:(RCConversationIdentifier *)identifier + timestamp:(long long)timestamp + callback:(RCIMIWOperationCallback)callback; + +- (void)sendReadReceiptRequest:(RCMessage *)message + callback:(RCIMIWOperationCallback)callback; + +- (void)sendReadReceiptResponse:(RCConversationIdentifier *)identifier + messageList:(NSArray *)messageList + callback:(RCIMIWOperationCallback)callback; + +- (void)syncConversationReadStatus:(RCConversationIdentifier *)identifier + timestamp:(long long)timestamp + callback:(RCIMIWOperationCallbackWithConversationIdentifier)callback; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWEngineSetup.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWEngineSetup.h new file mode 100644 index 0000000..6d564c2 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWEngineSetup.h @@ -0,0 +1,24 @@ +// +// RCIMIWEngineSetup.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/15. +// + +#import + +@class RCIMIWImageCompressConfig; + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWEngineSetup : NSObject + +@property (nonatomic, copy) NSString *naviServer; +@property (nonatomic, copy) NSString *fileServer; +@property (nonatomic, copy) NSString *statisticServer; +@property (nonatomic, copy) NSString *appVersion; +@property (nonatomic, strong) RCIMIWImageCompressConfig *imageCompressConfig; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWImageCompressConfig.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWImageCompressConfig.h new file mode 100644 index 0000000..7cc5136 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWImageCompressConfig.h @@ -0,0 +1,37 @@ +// +// RCIMIWImageCompressConfig.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWImageCompressConfig : NSObject +// 大图压缩率 +@property(nonatomic, assign) int imageQuality; + +// 大图压缩最大边 +@property(nonatomic, assign) int imageMaxSize; + +// 大图剪裁阈值 200k, +@property(nonatomic, assign) int imageMinLength; + +// 缩略图压缩率 +@property(nonatomic, assign) int thumbQuality; + +// 生成缩略图最大边 +@property(nonatomic, assign) int thumbMaxSize; + +// 缩略图最小边,小于则使用原图 +@property(nonatomic, assign) int thumbMinSize; + +@property(nonatomic, assign) int sightCompressWidth; + +@property(nonatomic, assign) int sightCompressHeight; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWMessageContent.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWMessageContent.h new file mode 100644 index 0000000..e129e37 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWMessageContent.h @@ -0,0 +1,19 @@ +// +// RCIMIWMessageContent.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +@interface RCIMIWMessageContent : RCMessageContent + +@property (nonatomic, copy) NSString *messageType; + +@property (nonatomic, strong) NSDictionary *mFields; + ++ (instancetype)messageWithType:(NSString *)messageType fields:(NSDictionary *)fields; + +@end + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWNormalMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWNormalMessage.h new file mode 100644 index 0000000..858c59d --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWNormalMessage.h @@ -0,0 +1,14 @@ +// +// RCIMIWNormalMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWNormalMessageIdentifier @"RC:IWNormalMsg" + +@interface RCIMIWNormalMessage : RCIMIWMessageContent + +@end diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWPushNotificationMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWPushNotificationMessage.h new file mode 100644 index 0000000..12a34ba --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWPushNotificationMessage.h @@ -0,0 +1,45 @@ +// +// RCIMIWPushNotificationMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/24. +// + +#import +#import +#import "RCIMIWDefine.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWPushNotificationMessage : NSObject + +/// 对应推送消息的唯一Id,如果是消息转push,则为消息的uid +@property (nonatomic, copy) NSString *pushId; +@property (nonatomic, copy) NSString *targetId; +@property (nonatomic, copy) NSString *objectName; +@property (nonatomic, copy) NSString *senderId; +@property (nonatomic, copy) NSString *senderName; +@property (nonatomic, copy) NSString *senderPortrait; +@property (nonatomic, copy) NSString *targetUserName; +@property (nonatomic, copy) NSString *toUserId; +@property (nonatomic, copy) NSString *pushTitle; +@property (nonatomic, copy) NSString *pushContent; +@property (nonatomic, copy) NSString *pushData; +@property (nonatomic, copy) NSString *extra; +@property (nonatomic, assign) RCConversationType conversationType; +@property (nonatomic, assign) long receivedTime; +@property (nonatomic, assign) bool showPushTitle; +@property (nonatomic, assign) bool showPushContent; +///是push消息时为true, 后台消息时为false +@property (nonatomic, assign) bool isFromPush; +@property (nonatomic, copy) RCIMIWPushSourceType pushSource; + +@property (nonatomic, copy) NSString *notifycationId; +@property (nonatomic, copy) NSString *channelId; +@property (nonatomic, copy) NSString *collapseKeyFCM; +@property (nonatomic, copy) NSString *imageUrl; +@property (nonatomic, copy) NSString *busChannel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWStatusMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWStatusMessage.h new file mode 100644 index 0000000..9487046 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWStatusMessage.h @@ -0,0 +1,14 @@ +// +// RCIMIWStatusMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWStatusMessageIdentifier @"RC:IWStatusMsg" + +@interface RCIMIWStatusMessage : RCIMIWMessageContent + +@end diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWStorageMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWStorageMessage.h new file mode 100644 index 0000000..da0ed92 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RCIMIWStorageMessage.h @@ -0,0 +1,15 @@ +// +// RCIMIWStorageMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWStorageMessageIdentifier @"RC:IWStorageMsg" + +@interface RCIMIWStorageMessage : RCIMIWMessageContent + +@end + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RongIMWrapper.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RongIMWrapper.h new file mode 100644 index 0000000..9d03b32 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Headers/RongIMWrapper.h @@ -0,0 +1,32 @@ +// +// RongIMWrapper.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/15. +// + +#import + +//! Project version number for RongIMWrapper. +FOUNDATION_EXPORT double RongIMWrapperVersionNumber; + +//! Project version string for RongIMWrapper. +FOUNDATION_EXPORT const unsigned char RongIMWrapperVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import + +#import +#import +#import +#import +#import + +#import +#import +#import + + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Info.plist b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Info.plist new file mode 100644 index 0000000..e423627 Binary files /dev/null and b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Info.plist differ diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Modules/module.modulemap b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Modules/module.modulemap new file mode 100644 index 0000000..5e074f2 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RongIMWrapper { + umbrella header "RongIMWrapper.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/RongIMWrapper b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/RongIMWrapper new file mode 100755 index 0000000..7f5f7b2 Binary files /dev/null and b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/RongIMWrapper differ diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..45e787b --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-arm64_armv7/RongIMWrapper.framework/_CodeSignature/CodeResources @@ -0,0 +1,297 @@ + + + + + files + + Headers/RCIMIWCommandMessage.h + + ZQ52UXbOAdfigPH2FHGziwZqfPU= + + Headers/RCIMIWConverter.h + + 2tcFF2QxQCl85x6urcAMfmiwvw0= + + Headers/RCIMIWDefine.h + + FmyCcBBaD7dErYWHZFmUUNwzXhs= + + Headers/RCIMIWEngine.h + + HCzSGfMsaj7eU+qHhreiR463PfE= + + Headers/RCIMIWEngineSetup.h + + yJvIW/xyt+7/PmxrigAVL1jpFHk= + + Headers/RCIMIWImageCompressConfig.h + + 7WK7aVAPQUYENqtDkD99KoKlZoA= + + Headers/RCIMIWMessageContent.h + + MlVDCiMBsT/avbkHRcEBPIaHBNw= + + Headers/RCIMIWNormalMessage.h + + dovprQVgKElUjkMd56usnPz2Lbo= + + Headers/RCIMIWPushNotificationMessage.h + + shi/Ni1iEM4JuypF+QVvrkelfC8= + + Headers/RCIMIWStatusMessage.h + + LsuAf4sUNhY1PP3lphtJRHRXfmk= + + Headers/RCIMIWStorageMessage.h + + lFiInD5zn5libwMvZHx0w8tL/AU= + + Headers/RongIMWrapper.h + + 1gv4zl3JTEKX+BYouhW3Z0UKD5k= + + Info.plist + + OqLI6UwlZHc1+keO1Y+jGGeP130= + + Modules/module.modulemap + + NZ9No+S4WqrWW5TykXH9+Z5euVk= + + + files2 + + Headers/RCIMIWCommandMessage.h + + hash + + ZQ52UXbOAdfigPH2FHGziwZqfPU= + + hash2 + + w4P9G/xC1kTZtnTRphUldOWNv6mIOLUtkQ0Dwyxj6SU= + + + Headers/RCIMIWConverter.h + + hash + + 2tcFF2QxQCl85x6urcAMfmiwvw0= + + hash2 + + Z4at3N/ctR77daoY0a+eG61yCBouipwUC5ThtcSJTcc= + + + Headers/RCIMIWDefine.h + + hash + + FmyCcBBaD7dErYWHZFmUUNwzXhs= + + hash2 + + S5sxx8KM53v03Z+UFiaXuj6Rc3wzIgvMbC6l/bWEXw8= + + + Headers/RCIMIWEngine.h + + hash + + HCzSGfMsaj7eU+qHhreiR463PfE= + + hash2 + + a4ZuKdqzB7fZ6UMT2iIazi/HhmdaTL1eQdTvD//uVGY= + + + Headers/RCIMIWEngineSetup.h + + hash + + yJvIW/xyt+7/PmxrigAVL1jpFHk= + + hash2 + + WwOFxDTsd5y3Fb/2uDYz/tSAbJbBvY60oEBZwpSrqQs= + + + Headers/RCIMIWImageCompressConfig.h + + hash + + 7WK7aVAPQUYENqtDkD99KoKlZoA= + + hash2 + + T5qobD0evP7Y0ZtOkdJHncg3g8lDRWzmenyo/5epAXw= + + + Headers/RCIMIWMessageContent.h + + hash + + MlVDCiMBsT/avbkHRcEBPIaHBNw= + + hash2 + + cUiPIlFoZznMI3Nsalfu6JDS//jeoNLSQNz/YnsKWzc= + + + Headers/RCIMIWNormalMessage.h + + hash + + dovprQVgKElUjkMd56usnPz2Lbo= + + hash2 + + F12ip8NDW07mlsxBBwB6EikQvKjkLckG2hu7UpI+RIU= + + + Headers/RCIMIWPushNotificationMessage.h + + hash + + shi/Ni1iEM4JuypF+QVvrkelfC8= + + hash2 + + jONoPwmkgjzj/vWRK418D1FYhfwIxb47PrYjb/ns4M0= + + + Headers/RCIMIWStatusMessage.h + + hash + + LsuAf4sUNhY1PP3lphtJRHRXfmk= + + hash2 + + e0AyCQ91MrhfQIKRe+2ImiOUgno0lWmAQHqdoyeuAZE= + + + Headers/RCIMIWStorageMessage.h + + hash + + lFiInD5zn5libwMvZHx0w8tL/AU= + + hash2 + + mD7LP94vSu9PLlQu/nX/fTkOy/rpUWVy/hFCk0dxF2g= + + + Headers/RongIMWrapper.h + + hash + + 1gv4zl3JTEKX+BYouhW3Z0UKD5k= + + hash2 + + qwXDwPwI5ZmvEHUipj9mZpudfUTYwrwG+HaR6+mZ+LA= + + + Modules/module.modulemap + + hash + + NZ9No+S4WqrWW5TykXH9+Z5euVk= + + hash2 + + 36RjpvjhhFKiIU/yFLXix/9LoU9JtswsvCOB2uxmCKE= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWCommandMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWCommandMessage.h new file mode 100644 index 0000000..dcbe5f3 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWCommandMessage.h @@ -0,0 +1,14 @@ +// +// RCIMIWCommandMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWCommandMessageIdentifier @"RC:IWCmdMsg" + +@interface RCIMIWCommandMessage : RCIMIWMessageContent + +@end diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWConverter.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWConverter.h new file mode 100644 index 0000000..e930676 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWConverter.h @@ -0,0 +1,32 @@ +// +// RCIMIWConverter.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/21. +// + +#import +#import +//#import +#import "RCIMIWPushNotificationMessage.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWConverter : NSObject + ++ (NSDictionary *)fromMessage:(RCMessage *)message; ++ (NSDictionary *)fromMessageContent:(NSString *)objectName messageContent:(RCMessageContent *)messageContent; ++ (NSDictionary *)fromConversation:(RCConversation *)conversation; ++ (NSDictionary *)fromConversationIdentifier:(RCConversationIdentifier *)conversationIdentifier; ++ (NSDictionary *)fromPushNotificationMessage:(RCIMIWPushNotificationMessage *)message; + + ++ (RCMessage *)toMessage:(NSDictionary *)map; ++ (RCMessageContent *)toMessageContent:(NSDictionary *)map; ++ (RCConversation *)toConversation:(NSDictionary *)map; ++ (RCConversationIdentifier *)toConversationIdentifier:(NSDictionary *)map; ++ (RCIMIWPushNotificationMessage *)toPushNotificationMessage:(NSDictionary *)map; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWDefine.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWDefine.h new file mode 100644 index 0000000..0f65064 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWDefine.h @@ -0,0 +1,95 @@ +// +// RCIMIWDefine.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/24. +// + +#ifndef RCIMIWDefine_h +#define RCIMIWDefine_h + +#import +#import + +@class RCIMIWPushNotificationMessage; + +/// 连接状态 +typedef NS_ENUM(NSInteger, RCIMIWConnectionStatus) { + + /// 未知错误 + RCIMIWConnectionStatusUnknown = -1, + + /// 连接成功 + RCIMIWConnectionStatusConnected = 0, + + /// 连接中 + RCIMIWConnectionStatusConnecting = 1, + + /// 用户账户在其他设备登录,本机会被踢掉线 + RCIMIWConnectionStatusKickedByOtherClient = 2, + + /// 网络不可用 + RCIMIWConnectionStatusNetworkUnavailable = 3, + + /// Token 不正确 + RCIMIWConnectionStatusTokenIncorrect = 4, + + /// 用户被开发者后台封禁 + RCIMIWConnectionStatusUserBlocked = 5, + + /// 用户主动调用 disconnect 或 logout 接口断开连接 + RCIMIWConnectionStatusDisConnected = 6, + + /// 连接暂时挂起(多是由于网络问题导致),SDK 会在合适时机进行自动重连 + RCIMIWConnectionStatusSuspend = 13, + + /// 自动连接超时,SDK 将不会继续连接,用户需要做超时处理,再自行调用 connectWithToken 接口进行连接 + RCIMIWConnectionStatusTimeout = 14 +}; + +typedef NSString * RCIMIWPushType; +extern RCIMIWPushType const RCIMIWPushType_UNKNOWN; +extern RCIMIWPushType const RCIMIWPushType_RONG; +extern RCIMIWPushType const RCIMIWPushType_HW; +extern RCIMIWPushType const RCIMIWPushType_MI; +extern RCIMIWPushType const RCIMIWPushType_FCM; +extern RCIMIWPushType const RCIMIWPushType_GCM; +extern RCIMIWPushType const RCIMIWPushType_MEIZU; +extern RCIMIWPushType const RCIMIWPushType_VIVO; +extern RCIMIWPushType const RCIMIWPushType_OPPO; +extern RCIMIWPushType const RCIMIWPushType_APPLE; + +typedef NSString * RCIMIWPushSourceType; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeUnkown; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeOfflineMessage; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeFromAdmin; +extern RCIMIWPushSourceType const RCIMIWPushSourceTypeLocalMessage; + + +@protocol RCIMIWNotificationMessageListener + +- (void)OnNotificationMessageArrived:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; + +- (void)OnNotificationMessageClicked:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; + +@end + +typedef void(^RCIMIWOperationCallback)(RCErrorCode code); +typedef void(^RCIMIWOperationCallbackWithBool)(RCErrorCode code, BOOL flag); +typedef void(^RCIMIWOperationCallbackWithInt)(RCErrorCode code, int value); +typedef void(^RCIMIWOperationCallbackWithString)(RCErrorCode code, NSString *string); +typedef void(^RCIMIWOperationCallbackWithPushLanguage)(RCErrorCode code, RCPushLauguage pushLang); +typedef void(^RCIMIWOperationCallbackWithMessage)(RCErrorCode code, RCMessage *message); +typedef void(^RCIMIWOperationCallbackWithMessageList)(RCErrorCode code, NSArray *messages); +typedef void(^RCIMIWOperationCallbackWithConversation)(RCErrorCode code, RCConversation *conversation); +typedef void(^RCIMIWOperationCallbackWithConversationList)(RCErrorCode code, NSArray *conversations); +typedef void(^RCIMIWOperationCallbackWithConversationIdentifier)(RCErrorCode code, RCConversationIdentifier *identifier); +typedef void(^RCIMIWOperationCallbackWithSearchConversationResultList)(RCErrorCode code, NSArray *searchConversationResults); +typedef void(^RCIMIWOperationCallbackWithConversationNotificationStatus)(RCErrorCode code, RCConversationNotificationStatus status); +typedef void(^RCIMIWOperationCallbackWithRecallNotificationMessage)(RCErrorCode code, RCRecallNotificationMessage *messageContent); + + + +#endif /* RCIMIWDefine_h */ diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWEngine.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWEngine.h new file mode 100644 index 0000000..4131032 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWEngine.h @@ -0,0 +1,264 @@ +// +// RCIMIWEngine.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/15. +// + +#import +#import "RCIMIWDefine.h" + +@class RCIMIWEngineSetup; + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWEngine : NSObject + ++ (instancetype)initWithAppKey:(NSString *)key; + ++ (instancetype)initWithAppKey:(NSString *)key config:(RCIMIWEngineSetup *)config; + ++ (instancetype)getInstance; + +- (void)setDeviceTokenForApplePush:(NSString *)deviceToken; + +- (void)setPushContentShowStatus:(BOOL)showContent callback:(RCIMIWOperationCallback)callback; +- (void)getPushContentShowStatus:(RCIMIWOperationCallbackWithBool)callback; + +- (void)setPushLanguage:(RCPushLauguage)lang callback:(RCIMIWOperationCallback)callback; +- (void)getPushLanguage:(RCIMIWOperationCallbackWithPushLanguage)callback; + +- (void)setPushReceiveStatus:(BOOL)receive callback:(RCIMIWOperationCallback)callback; +- (void)getPushReceiveStatus:(RCIMIWOperationCallbackWithBool)callback; + +- (void)notifyOnNotificationMessageArrived:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; +- (void)notifyOnNotificationMessageClicked:(RCIMIWPushType)pushType + notificationMessage:(RCIMIWPushNotificationMessage *)notificationMessage; +- (void)setOnNotificationMessageListener:(id)listener; + +- (void)setOfflineMessageDuration:(int)duration callback:(RCIMIWOperationCallback)callback; +- (void)getOfflineMessageDuration:(RCIMIWOperationCallbackWithInt)callback; + +- (void)setKickReconnectedDevice:(BOOL)kick; + +- (long long)getDeltaTime; + +- (NSString *)getCurrentUserID; + +// 连接管理 +- (RCIMIWConnectionStatus)getConnectionStatus; +- (void)connect:(NSString *)token callback:(RCIMIWOperationCallbackWithString)callback; +- (void)disconnect; +- (void)logout; + +// 会话管理 +- (void)getConversation:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithConversation)callback; +- (void)removeConversation:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; +- (void)getConversationList:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallbackWithConversationList)callback; +- (void)getConversationListByPage:(NSArray *)conversationTypes + count:(int)count + startTime:(long long)startTime + callback:(RCIMIWOperationCallbackWithConversationList)callback; +- (void)searchConversation:(NSString *)keyword + conversationTypeList:(NSArray *)conversationTypes + objectNameList:(NSArray *)objectNames + callback:(RCIMIWOperationCallbackWithSearchConversationResultList)callback; +- (void)clearConversations:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallback)callback; + +// 草稿 +- (void)getTextMessageDraft:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithString)callback; +- (void)saveTextMessageDraft:(RCConversationIdentifier *)identifier + textDraft:(NSString *)textDraft + callback:(RCIMIWOperationCallback)callback; +- (void)clearTextMessageDraft:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; + +// 未读计数 +- (void)getUnreadCount:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithInt)callback; +- (void)getUnreadCountByTag:(NSString *)tagId + containBlocked:(BOOL)containBlocked + callback:(RCIMIWOperationCallbackWithInt)callback; +- (void)getUnreadCountByConversationTypes:(NSArray *)conversationTypes + containsDND:(BOOL)containsDND + callback:(RCIMIWOperationCallbackWithInt)callback; +- (void)getTotalUnreadCount:(RCIMIWOperationCallbackWithInt)callback; +- (void)clearMessagesUnreadStatus:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; +- (void)getFirstUnreadMessage:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithMessage)callback; +- (void)getUnreadMentionedMessages:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithMessageList)callback; + +// 会话提醒管理 +- (void)setConversationNotificationStatus:(RCConversationIdentifier *)identifier + isBlocked:(BOOL)isBlocked + callback:(RCIMIWOperationCallbackWithConversationNotificationStatus)callback; + +- (void)getConversationNotificationStatus:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallbackWithConversationNotificationStatus)callback; + +- (void)getBlockedConversationList:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallbackWithConversationList)callback; + + +// 会话置顶 +- (void)setConversationStatusListener:(id)listener; +- (void)setConversationToTop:(RCConversationIdentifier *)identifier + isTop:(BOOL)isTop + callback:(RCIMIWOperationCallback)callback; +- (void)getToppedConversationList:(NSArray *)conversationTypes + callback:(RCIMIWOperationCallbackWithConversationList)callback; + +// 输入状态 +- (void)setTypingStatusChangedListener:(id)listener; +- (void)setTypingUpdateSeconds:(NSInteger)typingUpdateSeconds; +- (void)sendTypingStatus:(RCConversationIdentifier *)identifier typingContent:(NSString *)typingContent; + +// 消息管理 +- (void)setOnMessageReceivedListener:(id)listener; + +- (void)getMessage:(long)messageId callback:(RCIMIWOperationCallbackWithMessage)callback; +- (void)getMessageByUid:(NSString *)messageUId callback:(RCIMIWOperationCallbackWithMessage)callback; +- (void)setMessageReceivedStatus:(long)messageId + status:(RCReceivedStatus)status + callback:(RCIMIWOperationCallback)callback; +- (void)setMessageSentStatus:(long)messageId + status:(RCSentStatus)status + callback:(RCIMIWOperationCallback)callback; +- (void)setMessageExtra:(long)messageId + extra:(NSString *)extra + callback:(RCIMIWOperationCallback)callback; + +// 加载消息 +- (void)getMessages:(RCConversationIdentifier *)identifier + option:(RCHistoryMessageOption *)option + callback:(RCIMIWOperationCallbackWithMessageList)callback; +// 以 messageId 为依据分页加载本地消息 +- (void)getHistoryMessages:(RCConversationIdentifier *)identifier + lastMessageId:(long)lastMessageId + count:(int)count + callback:(RCIMIWOperationCallbackWithMessageList)callback; +// 本方法仅为指定时间跳转到消息,不可作为分页加载方法使用 +- (void)getHistoryMessages:(RCConversationIdentifier *)identifier + sentTime:(long)sentTime + beforeCount:(int)beforeCount + afterCount:(int)afterCount + callback:(RCIMIWOperationCallbackWithMessageList)callback; +// 以时间为依据分页加载远端消息 +- (void)getRemoteHistoryMessages:(RCConversationIdentifier *)identifier + remoteHistoryMsgOption:(RCRemoteHistoryMsgOption *)option + callback:(RCIMIWOperationCallbackWithMessageList)callback; + +- (void)searchMessages:(RCConversationIdentifier *)identifier + keyword:(NSString *)keyword + count:(int)count + beginTime:(long)beginTime + callback:(RCIMIWOperationCallbackWithMessageList)callback; + + + + +// 发送消息 +- (RCMessage *)sendMessage:(RCConversationIdentifier *)identifier + messageContent:(RCMessageContent *)content + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + messageConfig:(RCMessageConfig *)messageConfig + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +- (RCMessage *)sendMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + sendOption:(RCSendMessageOption *)sendOption + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +// 发送媒体消息 +- (RCMessage *)sendMediaMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + progressBlock:(void (^)(int progress, RCMessage *progressMessage))progressBlock + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock + cancel:(void (^)(RCMessage *cancelMessage))cancelBlock; + +// 发送定向消息 +- (RCMessage *)sendDirectionalMessage:(RCConversationIdentifier *)identifier + userIdList:(NSArray *)userIdList + messageContent:(RCMessageContent *)messageContent + pushContent:(NSString *)pushContent + pushData:(NSString *)pushData + successBlock:(void (^)(RCMessage *successMessage))successBlock + errorBlock:(void (^)(RCErrorCode nErrorCode, RCMessage *errorMessage))errorBlock; + +// 媒体消息下载管理 +- (void)downloadMediaMessage:(RCMessage *)message + progress:(void (^)(int progress))progressBlock + success:(void (^)(NSString *mediaPath))successBlock + error:(void (^)(RCErrorCode errorCode))errorBlock + cancel:(void (^)(void))cancelBlock; + +- (void)cancelDownloadMediaMessage:(RCMessage *)message; + +// 本地插入消息 +- (void)insertMessages:(NSArray *)messageList + callback:(RCIMIWOperationCallback)callback; + +- (void)insertIncomingMessage:(RCConversationIdentifier *)identifier + senderId:(NSString *)senderId + receivedStatus:(RCReceivedStatus)receivedStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime + callback:(RCIMIWOperationCallbackWithMessage)callback; + +- (void)insertOutgoingMessage:(RCConversationIdentifier *)identifier + senderId:(NSString *)senderId + sentStatus:(RCSentStatus)sentStatus + content:(RCMessageContent *)content + sentTime:(long long)sentTime + callback:(RCIMIWOperationCallbackWithMessage)callback; + +// 撤回 +- (void)recallMessage:(RCMessage *)message + pushContent:(NSString *)pushContent + callback:(RCIMIWOperationCallbackWithRecallNotificationMessage)callback; + +// 删除消息 +- (void)deleteMessages:(NSArray *)messageIdList + callback:(RCIMIWOperationCallback)callback; +- (void)deleteRemoteMessages:(RCConversationIdentifier *)identifier + messageList:(NSArray *)messageList + callback:(RCIMIWOperationCallback)callback; +- (void)clearMessages:(RCConversationIdentifier *)identifier + callback:(RCIMIWOperationCallback)callback; +- (void)clearRemoteMessages:(RCConversationIdentifier *)identifier + recordTime:(long long)recordTime + callback:(RCIMIWOperationCallback)callback; + +// 已读回执 +- (void)sendReadReceiptMessage:(RCConversationIdentifier *)identifier + timestamp:(long long)timestamp + callback:(RCIMIWOperationCallback)callback; + +- (void)sendReadReceiptRequest:(RCMessage *)message + callback:(RCIMIWOperationCallback)callback; + +- (void)sendReadReceiptResponse:(RCConversationIdentifier *)identifier + messageList:(NSArray *)messageList + callback:(RCIMIWOperationCallback)callback; + +- (void)syncConversationReadStatus:(RCConversationIdentifier *)identifier + timestamp:(long long)timestamp + callback:(RCIMIWOperationCallbackWithConversationIdentifier)callback; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWEngineSetup.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWEngineSetup.h new file mode 100644 index 0000000..6d564c2 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWEngineSetup.h @@ -0,0 +1,24 @@ +// +// RCIMIWEngineSetup.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/15. +// + +#import + +@class RCIMIWImageCompressConfig; + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWEngineSetup : NSObject + +@property (nonatomic, copy) NSString *naviServer; +@property (nonatomic, copy) NSString *fileServer; +@property (nonatomic, copy) NSString *statisticServer; +@property (nonatomic, copy) NSString *appVersion; +@property (nonatomic, strong) RCIMIWImageCompressConfig *imageCompressConfig; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWImageCompressConfig.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWImageCompressConfig.h new file mode 100644 index 0000000..7cc5136 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWImageCompressConfig.h @@ -0,0 +1,37 @@ +// +// RCIMIWImageCompressConfig.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWImageCompressConfig : NSObject +// 大图压缩率 +@property(nonatomic, assign) int imageQuality; + +// 大图压缩最大边 +@property(nonatomic, assign) int imageMaxSize; + +// 大图剪裁阈值 200k, +@property(nonatomic, assign) int imageMinLength; + +// 缩略图压缩率 +@property(nonatomic, assign) int thumbQuality; + +// 生成缩略图最大边 +@property(nonatomic, assign) int thumbMaxSize; + +// 缩略图最小边,小于则使用原图 +@property(nonatomic, assign) int thumbMinSize; + +@property(nonatomic, assign) int sightCompressWidth; + +@property(nonatomic, assign) int sightCompressHeight; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWMessageContent.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWMessageContent.h new file mode 100644 index 0000000..e129e37 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWMessageContent.h @@ -0,0 +1,19 @@ +// +// RCIMIWMessageContent.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +@interface RCIMIWMessageContent : RCMessageContent + +@property (nonatomic, copy) NSString *messageType; + +@property (nonatomic, strong) NSDictionary *mFields; + ++ (instancetype)messageWithType:(NSString *)messageType fields:(NSDictionary *)fields; + +@end + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWNormalMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWNormalMessage.h new file mode 100644 index 0000000..858c59d --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWNormalMessage.h @@ -0,0 +1,14 @@ +// +// RCIMIWNormalMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWNormalMessageIdentifier @"RC:IWNormalMsg" + +@interface RCIMIWNormalMessage : RCIMIWMessageContent + +@end diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWPushNotificationMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWPushNotificationMessage.h new file mode 100644 index 0000000..12a34ba --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWPushNotificationMessage.h @@ -0,0 +1,45 @@ +// +// RCIMIWPushNotificationMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/24. +// + +#import +#import +#import "RCIMIWDefine.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface RCIMIWPushNotificationMessage : NSObject + +/// 对应推送消息的唯一Id,如果是消息转push,则为消息的uid +@property (nonatomic, copy) NSString *pushId; +@property (nonatomic, copy) NSString *targetId; +@property (nonatomic, copy) NSString *objectName; +@property (nonatomic, copy) NSString *senderId; +@property (nonatomic, copy) NSString *senderName; +@property (nonatomic, copy) NSString *senderPortrait; +@property (nonatomic, copy) NSString *targetUserName; +@property (nonatomic, copy) NSString *toUserId; +@property (nonatomic, copy) NSString *pushTitle; +@property (nonatomic, copy) NSString *pushContent; +@property (nonatomic, copy) NSString *pushData; +@property (nonatomic, copy) NSString *extra; +@property (nonatomic, assign) RCConversationType conversationType; +@property (nonatomic, assign) long receivedTime; +@property (nonatomic, assign) bool showPushTitle; +@property (nonatomic, assign) bool showPushContent; +///是push消息时为true, 后台消息时为false +@property (nonatomic, assign) bool isFromPush; +@property (nonatomic, copy) RCIMIWPushSourceType pushSource; + +@property (nonatomic, copy) NSString *notifycationId; +@property (nonatomic, copy) NSString *channelId; +@property (nonatomic, copy) NSString *collapseKeyFCM; +@property (nonatomic, copy) NSString *imageUrl; +@property (nonatomic, copy) NSString *busChannel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWStatusMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWStatusMessage.h new file mode 100644 index 0000000..9487046 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWStatusMessage.h @@ -0,0 +1,14 @@ +// +// RCIMIWStatusMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWStatusMessageIdentifier @"RC:IWStatusMsg" + +@interface RCIMIWStatusMessage : RCIMIWMessageContent + +@end diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWStorageMessage.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWStorageMessage.h new file mode 100644 index 0000000..da0ed92 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RCIMIWStorageMessage.h @@ -0,0 +1,15 @@ +// +// RCIMIWStorageMessage.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/20. +// + +#import + +#define RCIMIWStorageMessageIdentifier @"RC:IWStorageMsg" + +@interface RCIMIWStorageMessage : RCIMIWMessageContent + +@end + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RongIMWrapper.h b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RongIMWrapper.h new file mode 100644 index 0000000..9d03b32 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Headers/RongIMWrapper.h @@ -0,0 +1,32 @@ +// +// RongIMWrapper.h +// RongIMWrapper +// +// Created by joyoki on 2021/12/15. +// + +#import + +//! Project version number for RongIMWrapper. +FOUNDATION_EXPORT double RongIMWrapperVersionNumber; + +//! Project version string for RongIMWrapper. +FOUNDATION_EXPORT const unsigned char RongIMWrapperVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import + +#import +#import +#import +#import +#import + +#import +#import +#import + + diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Info.plist b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Info.plist new file mode 100644 index 0000000..f7d661d Binary files /dev/null and b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Info.plist differ diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Modules/module.modulemap b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Modules/module.modulemap new file mode 100644 index 0000000..5e074f2 --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RongIMWrapper { + umbrella header "RongIMWrapper.h" + + export * + module * { export * } +} diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/RongIMWrapper b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/RongIMWrapper new file mode 100755 index 0000000..7c5d54b Binary files /dev/null and b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/RongIMWrapper differ diff --git a/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/_CodeSignature/CodeResources b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..778d54e --- /dev/null +++ b/nativeplugins/ios/RongIMWrapper.xcframework/ios-x86_64-simulator/RongIMWrapper.framework/_CodeSignature/CodeResources @@ -0,0 +1,297 @@ + + + + + files + + Headers/RCIMIWCommandMessage.h + + ZQ52UXbOAdfigPH2FHGziwZqfPU= + + Headers/RCIMIWConverter.h + + 2tcFF2QxQCl85x6urcAMfmiwvw0= + + Headers/RCIMIWDefine.h + + FmyCcBBaD7dErYWHZFmUUNwzXhs= + + Headers/RCIMIWEngine.h + + HCzSGfMsaj7eU+qHhreiR463PfE= + + Headers/RCIMIWEngineSetup.h + + yJvIW/xyt+7/PmxrigAVL1jpFHk= + + Headers/RCIMIWImageCompressConfig.h + + 7WK7aVAPQUYENqtDkD99KoKlZoA= + + Headers/RCIMIWMessageContent.h + + MlVDCiMBsT/avbkHRcEBPIaHBNw= + + Headers/RCIMIWNormalMessage.h + + dovprQVgKElUjkMd56usnPz2Lbo= + + Headers/RCIMIWPushNotificationMessage.h + + shi/Ni1iEM4JuypF+QVvrkelfC8= + + Headers/RCIMIWStatusMessage.h + + LsuAf4sUNhY1PP3lphtJRHRXfmk= + + Headers/RCIMIWStorageMessage.h + + lFiInD5zn5libwMvZHx0w8tL/AU= + + Headers/RongIMWrapper.h + + 1gv4zl3JTEKX+BYouhW3Z0UKD5k= + + Info.plist + + AVfHN1OoaK4PwhZdjvTuZZnLPR4= + + Modules/module.modulemap + + NZ9No+S4WqrWW5TykXH9+Z5euVk= + + + files2 + + Headers/RCIMIWCommandMessage.h + + hash + + ZQ52UXbOAdfigPH2FHGziwZqfPU= + + hash2 + + w4P9G/xC1kTZtnTRphUldOWNv6mIOLUtkQ0Dwyxj6SU= + + + Headers/RCIMIWConverter.h + + hash + + 2tcFF2QxQCl85x6urcAMfmiwvw0= + + hash2 + + Z4at3N/ctR77daoY0a+eG61yCBouipwUC5ThtcSJTcc= + + + Headers/RCIMIWDefine.h + + hash + + FmyCcBBaD7dErYWHZFmUUNwzXhs= + + hash2 + + S5sxx8KM53v03Z+UFiaXuj6Rc3wzIgvMbC6l/bWEXw8= + + + Headers/RCIMIWEngine.h + + hash + + HCzSGfMsaj7eU+qHhreiR463PfE= + + hash2 + + a4ZuKdqzB7fZ6UMT2iIazi/HhmdaTL1eQdTvD//uVGY= + + + Headers/RCIMIWEngineSetup.h + + hash + + yJvIW/xyt+7/PmxrigAVL1jpFHk= + + hash2 + + WwOFxDTsd5y3Fb/2uDYz/tSAbJbBvY60oEBZwpSrqQs= + + + Headers/RCIMIWImageCompressConfig.h + + hash + + 7WK7aVAPQUYENqtDkD99KoKlZoA= + + hash2 + + T5qobD0evP7Y0ZtOkdJHncg3g8lDRWzmenyo/5epAXw= + + + Headers/RCIMIWMessageContent.h + + hash + + MlVDCiMBsT/avbkHRcEBPIaHBNw= + + hash2 + + cUiPIlFoZznMI3Nsalfu6JDS//jeoNLSQNz/YnsKWzc= + + + Headers/RCIMIWNormalMessage.h + + hash + + dovprQVgKElUjkMd56usnPz2Lbo= + + hash2 + + F12ip8NDW07mlsxBBwB6EikQvKjkLckG2hu7UpI+RIU= + + + Headers/RCIMIWPushNotificationMessage.h + + hash + + shi/Ni1iEM4JuypF+QVvrkelfC8= + + hash2 + + jONoPwmkgjzj/vWRK418D1FYhfwIxb47PrYjb/ns4M0= + + + Headers/RCIMIWStatusMessage.h + + hash + + LsuAf4sUNhY1PP3lphtJRHRXfmk= + + hash2 + + e0AyCQ91MrhfQIKRe+2ImiOUgno0lWmAQHqdoyeuAZE= + + + Headers/RCIMIWStorageMessage.h + + hash + + lFiInD5zn5libwMvZHx0w8tL/AU= + + hash2 + + mD7LP94vSu9PLlQu/nX/fTkOy/rpUWVy/hFCk0dxF2g= + + + Headers/RongIMWrapper.h + + hash + + 1gv4zl3JTEKX+BYouhW3Z0UKD5k= + + hash2 + + qwXDwPwI5ZmvEHUipj9mZpudfUTYwrwG+HaR6+mZ+LA= + + + Modules/module.modulemap + + hash + + NZ9No+S4WqrWW5TykXH9+Z5euVk= + + hash2 + + 36RjpvjhhFKiIU/yFLXix/9LoU9JtswsvCOB2uxmCKE= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..f0d04c4 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "zhhealth", + "version": "1.0.0", + "description": "ZH健康", + "main": "main.js", + "dependencies": { + "bitcore-lib": "^8.25.25", + "bitcore-mnemonic": "^8.25.25", + "uni-simple-router": "^2.0.7", + "uview-ui": "^2.0.19", + "vuex": "^3.6.2", + "uni-read-pages": "^1.0.5" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://git.yuzhankeji.cn/TmOct5/ZhHealth.git" + }, + "author": "唐明明", + "license": "ISC" +} diff --git a/pages.json b/pages.json index 14a9d4b..b75455e 100644 --- a/pages.json +++ b/pages.json @@ -27,7 +27,7 @@ "float": "right", "text": "\ue603", "fontSrc": "/static/iconfont.ttf", - "color": "#666", + "color": "#000", "fontSize": "20px" }] } @@ -203,7 +203,31 @@ "path": "pages/im/index", "name": "IM", "style": { - "navigationBarTitleText": "im", + "navigationBarTitleText": "聊聊", + "navigationBarBackgroundColor": "#FFFFFF", + "app-plus": { + "titleNView": { + "buttons": [{ + "float": "right", + "text": "\ue605", + "fontSrc": "/static/iconfont.ttf", + "color": "#000", + "fontSize": "20px" + }, { + "float": "left", + "text": "\ue606", + "fontSrc": "/static/iconfont.ttf", + "color": "#000", + "fontSize": "20px" + }] + } + } + } + }, { + "path": "pages/im/chum", + "name": "ImChum", + "style": { + "navigationBarTitleText": "好友", "enablePullDownRefresh": false } }], diff --git a/pages/im/chat.nvue b/pages/im/chat.nvue new file mode 100644 index 0000000..9f50918 --- /dev/null +++ b/pages/im/chat.nvue @@ -0,0 +1,1212 @@ +