new version sdk

main
hrxiang 3 years ago
parent f3261d2ce4
commit b71cd22dce
  1. 265
      README.md
  2. 2063
      README.zh-cn.md
  3. 2
      android/build.gradle
  4. 2
      android/src/main/java/io/openim/flutter_openim_sdk/listener/OnAdvancedMsgListener.java
  5. 25
      android/src/main/java/io/openim/flutter_openim_sdk/listener/OnFriendshipListener.java
  6. 41
      android/src/main/java/io/openim/flutter_openim_sdk/listener/OnGroupListener.java
  7. 18
      android/src/main/java/io/openim/flutter_openim_sdk/listener/OnMsgSendListener.java
  8. 3
      android/src/main/java/io/openim/flutter_openim_sdk/listener/OnUserListener.java
  9. 1
      android/src/main/java/io/openim/flutter_openim_sdk/manager/IMManager.java
  10. 2
      example/ios/Runner.xcodeproj/project.pbxproj
  11. 2
      example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  12. 539
      example/lib/main.dart
  13. 9
      ios/Classes/BaseCallback.swift
  14. 3
      ios/Classes/CommonUtil.swift
  15. 7
      ios/Classes/JsonUtil.swift
  16. 7
      ios/Classes/Module/BaseServiceManager.swift
  17. 8
      ios/Classes/Module/ConversationManager.swift
  18. 38
      ios/Classes/Module/FriendshipManager.swift
  19. 17
      ios/Classes/Module/GroupManager.swift
  20. 12
      ios/Classes/Module/IMManager.swift
  21. 26
      ios/Classes/Module/MessageManager.swift
  22. 4
      ios/Classes/Module/UserManager.swift
  23. 1
      ios/Classes/SwiftFlutterOpenimSdkPlugin.swift
  24. 15
      ios/Framework/OpenIMCore.framework/Headers/OpenIMCore.h
  25. 206
      ios/Framework/OpenIMCore.framework/Headers/Open_im_sdk.objc.h
  26. 29
      ios/Framework/OpenIMCore.framework/Headers/Universe.objc.h
  27. 35
      ios/Framework/OpenIMCore.framework/Headers/ref.h
  28. 9
      ios/Framework/OpenIMCore.framework/Modules/module.modulemap
  29. BIN
      ios/Framework/OpenIMCore.framework/OpenIMCore
  30. 6
      ios/Framework/OpenIMCore.framework/Resources/Info.plist
  31. 10
      ios/Framework/OpenIMCore.xcframework/Info.plist
  32. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Headers
  33. 15
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Headers/OpenIMCore.h
  34. 206
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Headers/Open_im_sdk.objc.h
  35. 29
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Headers/Universe.objc.h
  36. 35
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Headers/ref.h
  37. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Modules
  38. 9
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Modules/module.modulemap
  39. BIN
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/OpenIMCore
  40. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/OpenIMCore
  41. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Resources
  42. 6
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Resources/Info.plist
  43. 4
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/A/Headers/Open_im_sdk.objc.h
  44. 205
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/A/Headers/Open_im_sdk_callback.objc.h
  45. BIN
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/A/OpenIMCore
  46. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current
  47. 15
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current/Headers/OpenIMCore.h
  48. 206
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current/Headers/Open_im_sdk.objc.h
  49. 29
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current/Headers/Universe.objc.h
  50. 35
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current/Headers/ref.h
  51. 9
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current/Modules/module.modulemap
  52. BIN
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current/OpenIMCore
  53. 6
      ios/Framework/OpenIMCore.xcframework/ios-arm64/OpenIMCore.framework/Versions/Current/Resources/Info.plist
  54. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Headers
  55. 15
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Headers/OpenIMCore.h
  56. 206
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Headers/Open_im_sdk.objc.h
  57. 29
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Headers/Universe.objc.h
  58. 35
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Headers/ref.h
  59. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Modules
  60. 9
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Modules/module.modulemap
  61. BIN
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/OpenIMCore
  62. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/OpenIMCore
  63. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Resources
  64. 6
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Resources/Info.plist
  65. 4
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/A/Headers/Open_im_sdk.objc.h
  66. 205
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/A/Headers/Open_im_sdk_callback.objc.h
  67. BIN
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/A/OpenIMCore
  68. 1
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current
  69. 15
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current/Headers/OpenIMCore.h
  70. 206
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current/Headers/Open_im_sdk.objc.h
  71. 29
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current/Headers/Universe.objc.h
  72. 35
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current/Headers/ref.h
  73. 9
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current/Modules/module.modulemap
  74. BIN
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current/OpenIMCore
  75. 6
      ios/Framework/OpenIMCore.xcframework/ios-arm64_x86_64-simulator/OpenIMCore.framework/Versions/Current/Resources/Info.plist
  76. 2
      ios/flutter_openim_sdk.podspec
  77. 4
      lib/flutter_openim_sdk.dart
  78. 4
      lib/src/enum/conversation_type.dart
  79. 5
      lib/src/enum/group_role.dart
  80. 7
      lib/src/enum/group_role_level.dart
  81. 2
      lib/src/listener/advanced_msg_listener.dart
  82. 4
      lib/src/listener/group_listener.dart
  83. 4
      lib/src/listener/impl/advanced_msg_listener.dart
  84. 23
      lib/src/listener/impl/friendship_listener.dart
  85. 44
      lib/src/listener/impl/group_listener.dart
  86. 107
      lib/src/manager/im_conversation_manager.dart
  87. 84
      lib/src/manager/im_friendship_manager.dart
  88. 120
      lib/src/manager/im_group_manager.dart
  89. 117
      lib/src/manager/im_manager.dart
  90. 126
      lib/src/manager/im_message_manager.dart
  91. 30
      lib/src/manager/im_user_manager.dart
  92. 13
      lib/src/models/conversation_info.dart
  93. 63
      lib/src/models/group_info.dart
  94. 72
      lib/src/models/message.dart
  95. 27
      lib/src/utils.dart
  96. 38
      test/flutter_openim_sdk_test.dart

@ -27,68 +27,31 @@ A flutter im plugin for android and ios.
#### 3, Init config
```
// Initialize SDK
// Initialize SDK
OpenIM.iMManager
..initSDK(
platform: Platform.isAndroid ? IMPlatform.android : IMPlatform.ios,
ipApi: '',
ipWs: '',
dbPath: '',
listener: OnInitSDKListener(
onConnecting: () {},
onConnectFailed: (code, error) {},
onConnectSuccess: () {},
onKickedOffline: () {},
onUserSigExpired: () {},
onSelfInfoUpdated: (user) {},
),
apiAddr: '',
wsAddr: '',
dataDir: '',
listener: OnConnectListener(),
)
// Set up current user info changed listener
..userManager.setUserListener(OnUserListener())
// Add message listener (remove when not in use)
..messageManager.addAdvancedMsgListener(OnAdvancedMsgListener(
onRecvMessageRevoked: (msgId) {},
onRecvC2CReadReceipt: (list) {},
onRecvNewMessage: (msg) {},
))
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener())
// Set up message sending progress listener
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
onProgress: (msgId, progress) {},
))
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener())
// Set up friend relationship listener
..friendshipManager.setFriendshipListener(OnFriendshipListener(
onBlackListAdd: (u) {},
onBlackListDeleted: (u) {},
onFriendApplicationListAccept: (u) {},
onFriendApplicationListAdded: (u) {},
onFriendApplicationListDeleted: (u) {},
onFriendApplicationListReject: (u) {},
onFriendInfoChanged: (u) {},
onFriendListAdded: (u) {},
onFriendListDeleted: (u) {},
))
..friendshipManager.setFriendshipListener(OnFriendshipListener())
// Set up conversation listener
..conversationManager.setConversationListener(OnConversationListener(
onConversationChanged: (list) {},
onNewConversation: (list) {},
onTotalUnreadMessageCountChanged: (count) {},
onSyncServerFailed: () {},
onSyncServerFinish: () {},
onSyncServerStart: () {},
))
..conversationManager.setConversationListener(OnConversationListener())
// Set up group listener
..groupManager.setGroupListener(OnGroupListener(
onApplicationProcessed: (groupId, opUser, agreeOrReject, opReason) {},
onGroupCreated: (groupId) {},
onGroupInfoChanged: (groupId, info) {},
onMemberEnter: (groupId, list) {},
onMemberInvited: (groupId, opUser, list) {},
onMemberKicked: (groupId, opUser, list) {},
onMemberLeave: (groupId, info) {},
onReceiveJoinApplication: (groupId, info, opReason) {},
));
```
@ -139,7 +102,7 @@ var message = await OpenIM.iMManager.messageManager.createTextMessage(
// Send
OpenIM.iMManager.messageManager.sendMessage(
message: message,
onlineUserOnly: false,
offlinePushInfo: offlinePushInfo,
userID: uid, // Single chat value is not null
groupID: gid, // The group chat value is not null
).then((v) {
@ -153,120 +116,116 @@ OpenIM.iMManager.messageManager.sendMessage(
OpenIM.iMManager.logout();
```
#### OpenIM.iMManager
| method | description |
| ---------------- | ------------------------------- |
| initSDK | Initialize SDK |
| unInitSDK | |
| login | Log in |
| logout | Sign out |
| getLoginStatus | Login status |
| getLoginUid | Current user id |
| getLoginUserInfo | Current user information |
| setSelfInfo | Modify current user information |
| getUsersInfo | Get user information by user id |
| enabledSDKLog | Setup sdk log |
| method | description |
| ---------------- | ------------------------ |
| initSDK | Initialize SDK |
| unInitSDK | |
| login | Log in |
| logout | Sign out |
| getLoginStatus | Login status |
| getLoginUid | Current user id |
| getLoginUserInfo | Current user information |
#### OpenIM.userManager
| method | description |
| --------------- | --------------------------------------------------- |
| setSelfInfo | Modify current user information |
| getUsersInfo | Get user information by user id |
| getSelfUserInfo | Get the information of the currently logged in user |
#### OpenIM.iMManager.conversationManager
| method | description |
| ----------------------------- | --------------------------------------- |
| setConversationListener | Listener |
| getAllConversationList | Get all conversation |
| getSingleConversation | Get single conversation |
| getMultipleConversation | Get multiple conversation |
| deleteConversation | Delete conversation |
| setConversationDraft | Set conversation draftText |
| pinConversation | Top conversation |
| markSingleMessageHasRead | Mark single chat messages as read |
| markGroupMessageHasRead | Mark group chat messages as read |
| getTotalUnreadMsgCount | Get the total number of unread messages |
| getConversationID | Query conversation id |
| setConversationRecvMessageOpt | Setup message do not disturb |
| getConversationRecvMessageOpt | Message do not disturb status |
| method | description |
| ------------------------------ | ------------------------------------------------------------ |
| setConversationListener | Listener |
| getAllConversationList | Get all conversation |
| getConversationListSplit | Paging to get conversation |
| getOneConversation | Get a conversation, if it doesn't exist it will be created automatically |
| getMultipleConversation | Get conversation list by id list |
| deleteConversation | Delete conversation by id |
| setConversationDraft | Set conversation draftText |
| pinConversation | Pinned conversation |
| markGroupMessageHasRead | Mark group chat messages as read |
| getTotalUnreadMsgCount | Get the total number of unread messages |
| getConversationIDBySessionType | Query conversation id |
| setConversationRecvMessageOpt | Setup message do not disturb |
| getConversationRecvMessageOpt | Message do not disturb status |
#### OpenIM.iMManager.friendshipManager
| method | description |
| ------------------------ | ------------------------------------------------------------ |
| setFriendshipListener | Listener |
| getFriendsInfo | Get friend information |
| addFriend | Send an friend application |
| getFriendApplicationList | Get all friend application, sent to you by others |
| getFriendList | Find all friends including those who have been added to the blacklist |
| setFriendInfo | Modify friend information, only comment can be modified |
| addToBlackList | Add to blacklist |
| getBlackList | Get blacklist list |
| deleteFromBlackList | Remove from blacklist |
| checkFriend | Check friendship |
| deleteFromFriendList | Remove friend |
| acceptFriendApplication | Accept friend application |
| refuseFriendApplication | Reject friend application |
| method | description |
| ---------------------------- | ------------------------------------------------------------ |
| setFriendshipListener | Set up a friend relationship listener |
| getFriendsInfo | Get friend info by user id |
| addFriend | Send an friend application |
| getRecvFriendApplicationList | Get someone's request to add me as a friend |
| getSendFriendApplicationList | Get friend requests from me |
| getFriendList | Find all friends including those who have been added to the blacklist |
| setFriendRemark | Modify friend remark name |
| addBlacklist | Add friends to blacklist |
| getBlacklist | Get blacklist list |
| removeBlacklist | Remove from blacklist |
| checkFriend | Determine if there is a friendship by userId |
| deleteFriend | Dissolve friendship from friend list |
| acceptFriendApplication | Accept application of be friend |
| refuseFriendApplication | Refuse application of be friend |
#### OpenIM.iMManager.messageManager
| method | description |
| --------------------------------- | --------------------------------- |
| addAdvancedMsgListener | Add message listener |
| setMsgSendProgressListener | Message sending progress listener |
| sendMessage | Send a message |
| getHistoryMessageList | Get history news |
| revokeMessage | Revoke message |
| deleteMessageFromLocalStorage | Delete message |
| insertSingleMessageToLocalStorage | Insert message |
| findMessages | Query the message by id |
| markC2CMessageAsRead | Mark c2c message as read |
| typingStatusUpdate | Typing prompt |
| createTextMessage | Create text message |
| createTextAtMessage | Create @ message |
| createImageMessage | Create picture message |
| createImageMessageFromFullPath | Create picture message |
| createSoundMessage | Create voice message |
| createSoundMessageFromFullPath | Create voice message |
| createVideoMessage | Create video message |
| createVideoMessageFromFullPath | Create video message |
| createFileMessage | Create file message |
| createFileMessageFromFullPath | Create file message |
| createMergerMessage | Create merge message |
| createForwardMessage | Create a forwarded message |
| createLocationMessage | Create location message |
| createCustomMessage | Create custom message |
| createQuoteMessage | Create quote message |
| createCardMessage | Create card message |
| clearC2CHistoryMessage | Clear all message history |
| clearGroupHistoryMessage | Clear all message history |
| method | description |
| --------------------------------- | ------------------------------------------ |
| setAdvancedMsgListener | Set a message listener |
| setMsgSendProgressListener | Set up message sending progress monitoring |
| sendMessage | Send a message to user or to group |
| getHistoryMessageList | Find all history message |
| revokeMessage | Revoke the sent information |
| deleteMessageFromLocalStorage | Delete message |
| insertSingleMessageToLocalStorage | Insert message |
| markC2CMessageAsRead | Mark c2c message as read |
| typingStatusUpdate | Typing prompt |
| createTextMessage | Create text message |
| createTextAtMessage | Create @ message |
| createImageMessage | Create picture message |
| createImageMessageFromFullPath | Create picture message |
| createSoundMessage | Create voice message |
| createSoundMessageFromFullPath | Create voice message |
| createVideoMessage | Create video message |
| createVideoMessageFromFullPath | Create video message |
| createFileMessage | Create file message |
| createFileMessageFromFullPath | Create file message |
| createMergerMessage | Create merge message |
| createForwardMessage | Create a forwarded message |
| createLocationMessage | Create location message |
| createCustomMessage | Create custom message |
| createQuoteMessage | Create quote message |
| createCardMessage | Create card message |
| clearC2CHistoryMessage | Clear all c2c history message |
| clearGroupHistoryMessage | Clear all group history |
#### OpenIM.iMManager.groupManager
| method | description |
| ----------------------- | ------------------------------- |
| setGroupListener | Listener |
| inviteUserToGroup | Invite into the group |
| kickGroupMember | Remove group members |
| getGroupMembersInfo | Get group member information |
| getGroupMemberList | Get group members |
| getJoinedGroupList | Get joined groups |
| isJoinedGroup | Check you have joined the group |
| createGroup | Create a group |
| setGroupInfo | Edit group information |
| getGroupsInfo | Get group information |
| joinGroup | Join group |
| quitGroup | Exit group |
| transferGroupOwner | Group permission transfer |
| getGroupApplicationList | Get group application list |
| acceptGroupApplication | Accept group invitation |
| refuseGroupApplication | Refuse group application |
| method | description |
| --------------------------- | ------------------------------------------------------------ |
| setGroupListener | Set up group relationship monitoring |
| inviteUserToGroup | Invite friends into the group |
| kickGroupMember | Remove member from group |
| getGroupMembersInfo | Get group member information |
| getGroupMemberList | Get the list of group members |
| getJoinedGroupList | Find all groups you have joined |
| isJoinedGroup | Check if you are a member of the group |
| createGroup | Create a group |
| setGroupInfo | Edit group information |
| getGroupsInfo | Find group information by group id |
| joinGroup | Apply to join the group |
| quitGroup | Leave group |
| transferGroupOwner | Give group permissions to others |
| getRecvGroupApplicationList | As the group owner or administrator, get the list of received group members' applications to join the group. |
| getSendGroupApplicationList | Get the record of the group membership application issued by yourself |
| acceptGroupApplication | Accept group application |
| refuseGroupApplication | Refuse group application |
#### Other
@ -323,19 +282,19 @@ Platform
static const linux = 7;
```
Group member role
Group member role level
```
static const member = 0;
static const owner = 1;
static const admin = 2;
static const member = 1;
static const owner = 2;
static const admin = 3;
```
Conversation type
```
static const single_chat = 1;
static const group_chat = 2;
static const single = 1;
static const group = 2;
```
Message status

File diff suppressed because it is too large Load Diff

@ -41,5 +41,5 @@ android {
}
}
dependencies {
implementation 'io.openim:client-sdk:1.5.4@aar'
implementation 'io.openim:client-sdk:1.6.1@aar'
}

@ -7,12 +7,10 @@ import java.util.Map;
import io.openim.flutter_openim_sdk.util.CommonUtil;
public class OnAdvancedMsgListener implements open_im_sdk_callback.OnAdvancedMsgListener {
// final Map<String, String> values = new HashMap<>();
private final String id;
public OnAdvancedMsgListener(String listenerId) {
this.id = listenerId;
// this.values.put("id", listenerId);
}
@Override

@ -2,31 +2,6 @@ package io.openim.flutter_openim_sdk.listener;
import io.openim.flutter_openim_sdk.util.CommonUtil;
/**
* 申请添加好友
* 主动申请者收到OnFriendApplicationAdded
* 被添加者收到OnFriendApplicationAdded ok 111加222
* <p>
* 同意好友申请
* 操作者收到 OnFriendApplicationAccepted OnFriendAdded
* 申请者收到OnFriendApplicationAccepted OnFriendAdded ok
* <p>
* 好友拒绝申请
* 操作者收到OnFriendApplicationRejected
* 申请者收到OnFriendApplicationRejected ok
* <p>
* 删除好友
* 操作者收到OnFriendDeleted ok
* <p>
* 修改备注
* 操作者收到OnFriendInfoChanged ok
* <p>
* 添加黑名单
* 操作者收到OnBlackAdded ok
* <p>
* 移除黑名单
* 操作者收到OnBlackDeleted ok
*/
public class OnFriendshipListener implements open_im_sdk_callback.OnFriendshipListener {
@Override

@ -2,37 +2,6 @@ package io.openim.flutter_openim_sdk.listener;
import io.openim.flutter_openim_sdk.util.CommonUtil;
/**
* 创建群
* 初始成员收到OnJoinedGroupAdded 验证ok 1111 创建 2222
* <p>
* 退出群
* 退出者收到OnJoinedGroupDeleted
* 群成员收到OnGroupMemberDeleted 2222退出群 验证ok
* <p>
* 踢出群
* 被踢者收到OnJoinedGroupDeleted
* 群成员收到OnGroupMemberDeleted 验证ok
* <p>
* 邀请进群
* 被邀请者收到OnJoinedGroupAdded
* 群成员不包括被邀请者收到OnGroupMemberAdded 1111邀请2222 验证ok
* <p>
* 申请加群
* 申请者收到OnGroupApplicationAdded
* 群主+管理员收到OnReceiveJoinGroupApplicationAdded 验证ok
* <p>
* 同意进群
* 申请者收到OnJoinedGroupAdded OnGroupApplicationAccepted
* 群成员不包括申请者收到OnGroupMemberAdded
* 审批者群主或者管理员收到OnGroupMemberAdded OnGroupApplicationAccepted 验证ok
* <p>
* 拒绝进群
* 申请者收到OnGroupApplicationRejected
* 审批者群主或者管理员收到OnGroupApplicationRejected 验证ok
* <p>
* 修改群资料 群成员收到 OnGroupInfoChanged 验证ok
*/
public class OnGroupListener implements open_im_sdk_callback.OnGroupListener {
@Override
@ -84,14 +53,4 @@ public class OnGroupListener implements open_im_sdk_callback.OnGroupListener {
public void onJoinedGroupDeleted(String s) {
CommonUtil.emitEvent("groupListener", "onJoinedGroupDeleted", s);
}
@Override
public void onReceiveJoinGroupApplicationAdded(String s) {
CommonUtil.emitEvent("groupListener", "onReceiveJoinGroupApplicationAdded", s);
}
@Override
public void onReceiveJoinGroupApplicationDeleted(String s) {
CommonUtil.emitEvent("groupListener", "onReceiveJoinGroupApplicationDeleted", s);
}
}

@ -11,14 +11,14 @@ import open_im_sdk_callback.SendMsgCallBack;
public class OnMsgSendListener implements SendMsgCallBack {
final private MethodChannel.Result result;
// final private MethodCall call;
final private Object clientMsgID;
private Object clientMsgID;
public OnMsgSendListener(MethodChannel.Result result, MethodCall call) {
this.result = result;
// this.call = call;
Map<String, Object> args = call.argument("message");
this.clientMsgID = args.get("clientMsgID");
if (null != args) {
this.clientMsgID = args.get("clientMsgID");
}
}
@Override
@ -28,10 +28,12 @@ public class OnMsgSendListener implements SendMsgCallBack {
@Override
public void onProgress(long l) {
final Map<String, Object> values = new ArrayMap<>();
values.put("clientMsgID", clientMsgID);
values.put("progress", l);
CommonUtil.emitEvent("msgSendProgressListener", "onProgress", values);
if (null != clientMsgID) {
final Map<String, Object> values = new ArrayMap<>();
values.put("clientMsgID", clientMsgID);
values.put("progress", l);
CommonUtil.emitEvent("msgSendProgressListener", "onProgress", values);
}
}
@Override

@ -4,9 +4,6 @@ import io.openim.flutter_openim_sdk.util.CommonUtil;
public class OnUserListener implements open_im_sdk_callback.OnUserListener {
/**
* 登录用户个人资料有变化时回调
*/
@Override
public void onSelfInfoUpdated(String s) {
CommonUtil.emitEvent("userListener", "onSelfInfoUpdated", s);

@ -15,7 +15,6 @@ public class IMManager extends BaseManager {
value(methodCall, "operationID"),
jsonValue(methodCall))
);
// CommonUtil.runMainThreadReturn(result, null);
}
public void login(MethodCall methodCall, MethodChannel.Result result) {

@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

@ -1,4 +1,3 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
@ -15,7 +14,6 @@ class MyApp extends StatefulWidget {
class _MyAppState extends State<MyApp> {
@override
void initState() {
_initSDK();
super.initState();
}
@ -28,43 +26,526 @@ class _MyAppState extends State<MyApp> {
),
body: Column(
children: [
TextButton(onPressed: _login, child: Text('login')),
TextButton(onPressed: () {}, child: Text('login')),
],
),
),
);
}
void _login() {
OpenIM.iMManager.login(uid: '', token: '');
void initSDK() {
OpenIM.iMManager
.initSDK(
// "当前平台,参照IMPlatform类",
platform: 0,
// SDK的API接口地址http:xxx:10000
apiAddr: "",
// SDK的web socket地址 ws:xxx:17778
wsAddr: "",
// var apath =(await getApplicationDocumentsDirectory()).path
dataDir: "",
listener: OnConnectListener(
onConnectSuccess: () {
//
},
onConnecting: () {
// UI
},
onConnectFailed: (code, errorMsg) {
//
},
onUserSigExpired: () {
// 使 UserSig
},
onKickedOffline: () {
// 线 UI
},
),
)
.then((value) {
if (value == true) {
//
}
});
}
void _initSDK() async {
// Initialize SDK
void setLisenter() {
OpenIM.iMManager
..initSDK(
platform: Platform.isAndroid ? IMPlatform.android : IMPlatform.ios,
apiAddr: '',
wsAddr: '',
dataDir: '',
listener: OnConnectListener(),
)
//
..userManager.setUserListener(OnUserListener())
// Add message listener (remove when not in use)
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener())
// Set up message sending progress listener
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener())
// Set up friend relationship listener
..friendshipManager.setFriendshipListener(OnFriendshipListener())
// Set up conversation listener
..conversationManager.setConversationListener(OnConversationListener())
// Set up group listener
..userManager.setUserListener(OnUserListener(
onSelfInfoUpdated: (userInfo) {
//
},
))
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener(
onRecvNewMessage: (message) {
//
},
onRecvMessageRevoked: (messageID) {
//
},
onRecvC2CReadReceipt: (list) {
//
},
))
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
onProgress: (messageID, progress) {
//
},
))
..friendshipManager.setFriendshipListener(OnFriendshipListener(
onFriendApplicationRejected: (applicationInfo) {
//
},
onFriendApplicationDeleted: (applicationInfo) {
//
},
onFriendApplicationAdded: (applicationInfo) {
//
},
onFriendApplicationAccepted: (applicationInfo) {
//
},
onFriendAdded: (frinedInfo) {
//
},
onFriendDeleted: (frinedInfo) {
//
},
onFriendInfoChanged: (frinedInfo) {
//
},
onBlacklistDeleted: (blackInfo) {
//
},
onBlacklistAdded: (blackInfo) {
//
},
))
..conversationManager.setConversationListener(OnConversationListener(
onNewConversation: (list) {
//
},
onConversationChanged: (list) {
//
},
onTotalUnreadMessageCountChanged: (count) {
//
},
))
..groupManager.setGroupListener(OnGroupListener(
onGroupMemberInfoChanged: (memberInfo) {
//
},
onGroupMemberDeleted: (memberInfo) {
// 退
},
onGroupMemberAdded: (memberInfo) {
//
},
onGroupApplicationRejected: (applicationInfo) {
//
},
onGroupApplicationDeleted: (applicationInfo) {
//
},
onGroupApplicationAdded: (applicationInfo) {
//
},
onGroupApplicationAccepted: (applicationInfo) {
//
},
onJoinedGroupDeleted: (groupInfo) {
// 退退
},
onJoinedGroupAdded: (groupInfo) {
//
},
onGroupInfoChanged: (groupInfo) {
//
},
));
}
void login() {
OpenIM.iMManager
.login(
uid: "", // uid来自于自身业务服务器
token: "", // token需要业务服务器根据secret向OpenIM服务端交换获取
)
.then((value) {
//
});
}
void imMager() {
OpenIM.iMManager.logout().then((_) {
// 退
});
OpenIM.iMManager.getLoginUserInfo().then((userInfo) {
//
});
OpenIM.iMManager.getLoginUserID().then((userID) {
// ID
});
}
void userManager() {
OpenIM.iMManager.userManager.getUsersInfo(
uidList: [], // ID集合
).then((userInfoList) {
//
});
OpenIM.iMManager.userManager.getSelfUserInfo().then((userInfo) {
//
});
OpenIM.iMManager.userManager
.setSelfInfo(
nickname: '',
//
faceURL: '',
//
gender: 0,
// : 10
phoneNumber: '',
//
email: '',
//
birth: 0,
//
ex: '', //
)
.then((_) {});
}
void conversationManager() {
OpenIM.iMManager.conversationManager.getAllConversationList().then((list) {
// List<ConversationInfo>
});
OpenIM.iMManager.conversationManager.getConversationListSplit(
offset: 0, // 1offet0count202offset20
count: 0, //
);
OpenIM.iMManager.conversationManager.getOneConversation(
sourceID: "", // userIDgroupID
sessionType: 1, // 12
);
OpenIM.iMManager.conversationManager.getMultipleConversation(
conversationIDList: [], // ID集合
).then((list) {
// id匹配的会话列表
});
OpenIM.iMManager.conversationManager
.deleteConversation(
conversationID: "", // id
)
.then((_) => null)
.catchError((_) {});
OpenIM.iMManager.conversationManager.setConversationDraft(
conversationID: "", // id
draftText: "", // 稿
);
OpenIM.iMManager.conversationManager.pinConversation(
conversationID: "", // id
isPinned: true, // truefalse
);
OpenIM.iMManager.conversationManager.markGroupMessageHasRead(
groupID: "", // id
);
OpenIM.iMManager.conversationManager.getTotalUnreadMsgCount();
OpenIM.iMManager.conversationManager.getConversationIDBySessionType(
sourceID: "", // userIDgroupID
sessionType: 1, // 12
);
OpenIM.iMManager.conversationManager.setConversationRecvMessageOpt(
conversationIDList: [], // id列表
status: 1, // 12线线0
);
OpenIM.iMManager.conversationManager.getConversationRecvMessageOpt(
conversationIDList: [], // id列表
);
OpenIM.iMManager.conversationManager.simpleSort([]);
}
void friendManager() {
OpenIM.iMManager.friendshipManager.getFriendsInfo(
uidList: [], // userId列表
).then((list) {
// List<UserInfo>
});
OpenIM.iMManager.friendshipManager.addFriend(
uid: "", // id
reason: '', //
);
OpenIM.iMManager.friendshipManager
.getRecvFriendApplicationList()
.then((value) {
// List<FriendApplicationInfo>
});
OpenIM.iMManager.friendshipManager
.getSendFriendApplicationList()
.then((list) {
// List<FriendApplicationInfo>
});
OpenIM.iMManager.friendshipManager.getFriendList().then((list) {
// List<UserInfo>
});
OpenIM.iMManager.friendshipManager.setFriendRemark(
uid: '', // userID
remark: '', //
);
OpenIM.iMManager.friendshipManager.addBlacklist(
uid: "", // userID
);
OpenIM.iMManager.friendshipManager.getBlacklist().then((list) {
// List<UserInfo>
});
OpenIM.iMManager.friendshipManager.removeBlacklist(
uid: "", // userID
);
OpenIM.iMManager.friendshipManager.checkFriend(
uidList: [], // userID
).then((value) {
// List<FriendshipInfo>
});
OpenIM.iMManager.friendshipManager.deleteFriend(
uid: '', // userID
);
OpenIM.iMManager.friendshipManager.acceptFriendApplication(
uid: "", // userID
handleMsg: '', //
);
OpenIM.iMManager.friendshipManager.refuseFriendApplication(
uid: "", // userID
handleMsg: '', //
);
}
void groupManager() {
OpenIM.iMManager.groupManager
.inviteUserToGroup(
groupId: '', // ID
uidList: [], // userID
reason: '', //
)
.then((list) {
// List<GroupInviteResult>
});
OpenIM.iMManager.groupManager.kickGroupMember(
groupId: '', // ID
uidList: [], // userID
reason: '', //
);
OpenIM.iMManager.groupManager.getGroupMembersInfo(
groupId: '', // ID
uidList: [], // userID
).then((list) {
// List<GroupMembersInfo>
});
OpenIM.iMManager.groupManager
.getGroupMemberList(
groupId: '', // ID
filter: 0, // 1, 23
offset: 0, // index值
count: 0, //
)
.then((list) {
// List<GroupMembersInfo>
});
OpenIM.iMManager.groupManager.getJoinedGroupList().then((list) {
// List<GroupInfo>
});
OpenIM.iMManager.groupManager
.isJoinedGroup(
gid: '', // ID
)
.then((joned) {
// true已加入false未加入
});
OpenIM.iMManager.groupManager.createGroup(
groupName: '',
//
faceUrl: '',
//
notification: '',
//
introduction: '',
//
groupType: 0,
//
ex: '',
//
list: [], // List<GroupMemberRole>
).then((groupInfo) {
// GroupInfo
});
OpenIM.iMManager.groupManager.setGroupInfo(
groupID: '',
groupName: '',
//
faceUrl: '',
//
notification: '',
//
introduction: '',
//
ex: '', //
);
OpenIM.iMManager.groupManager.getGroupsInfo(
gidList: [], // id集合
).then((list) {
// List<GroupInfo>
});
OpenIM.iMManager.groupManager.joinGroup(
gid: '', // id
reason: '', //
);
OpenIM.iMManager.groupManager.quitGroup(
gid: '', // id
);
OpenIM.iMManager.groupManager.transferGroupOwner(
gid: '', // ID
uid: '', // owner userID
);
OpenIM.iMManager.groupManager.getRecvGroupApplicationList().then((list) {
// List<GroupApplicationInfo>
});
OpenIM.iMManager.groupManager.getSendGroupApplicationList().then((list) {
// List<GroupApplicationInfo>
});
OpenIM.iMManager.groupManager.acceptGroupApplication(
gid: '', // ID
uid: '', // userID
handleMsg: '', //
);
OpenIM.iMManager.groupManager.refuseGroupApplication(
gid: '', // ID
uid: '', // userID
handleMsg: '', //
);
}
void messageManager() {
OpenIM.iMManager.messageManager.sendMessage(
message: Message(), //
userID: '', // userID
groupID: '', // ID
offlinePushInfo: OfflinePushInfo(), // 线
);
OpenIM.iMManager.messageManager
.getHistoryMessageList(
userID: '', // userID
groupID: '', // id
startMsg: null, //
count: 0, //
)
.then((list) {
// List<Message>
});
OpenIM.iMManager.messageManager.revokeMessage(
message: Message(), //
);
OpenIM.iMManager.messageManager.deleteMessageFromLocalStorage(
message: Message(), //
);
OpenIM.iMManager.messageManager.insertSingleMessageToLocalStorage(
receiverID: '', // userID
senderID: '', // userID
message: Message(), //
);
OpenIM.iMManager.messageManager.markC2CMessageAsRead(
userID: '', // userID
messageIDList: [], // id列表
);
OpenIM.iMManager.messageManager.typingStatusUpdate(
userID: '', // userID
msgTip: '', //
);
OpenIM.iMManager.messageManager.createTextMessage(
text: '',
);
OpenIM.iMManager.messageManager.createTextAtMessage(
text: '', //
atUidList: [], // @userID集合
);
OpenIM.iMManager.messageManager.createImageMessage(
imagePath: '', //
);
OpenIM.iMManager.messageManager.createImageMessageFromFullPath(
imagePath: '', //
);
OpenIM.iMManager.messageManager.createSoundMessage(
soundPath: '', //
duration: 0, //
);
OpenIM.iMManager.messageManager.createSoundMessageFromFullPath(
soundPath: '', //
duration: 0, //
);
OpenIM.iMManager.messageManager.createVideoMessage(
videoPath: '', //
videoType: '', // minetype
duration: 0, // s
snapshotPath: '', //
);
OpenIM.iMManager.messageManager.createVideoMessageFromFullPath(
videoPath: '', //
videoType: '', // minetype
duration: 0, // s
snapshotPath: '', //
);
OpenIM.iMManager.messageManager.createFileMessage(
filePath: '', //
fileName: '', //
);
OpenIM.iMManager.messageManager.createFileMessageFromFullPath(
filePath: '', //
fileName: '', //
);
OpenIM.iMManager.messageManager.createForwardMessage(
message: Message(), //
);
OpenIM.iMManager.messageManager.createMergerMessage(
messageList: [], //
title: '', //
summaryList: [], //
);
OpenIM.iMManager.messageManager.createLocationMessage(
latitude: 0, //
longitude: 0, //
description: '', //
);
OpenIM.iMManager.messageManager.createCustomMessage(
data: '', //
extension: '', //
description: '', //
);
OpenIM.iMManager.messageManager.createQuoteMessage(
text: '', //
quoteMsg: Message(), //
);
OpenIM.iMManager.messageManager.createCardMessage(
data: {}, //
);
OpenIM.iMManager.messageManager.clearC2CHistoryMessage(
uid: "", //
);
OpenIM.iMManager.messageManager.clearGroupHistoryMessage(
gid: '', // ID
);
}
}

@ -1,10 +1,3 @@
//
// BaseCallback.swift
// flutter_openim_sdk
//
// Created by willem on 2021/10/9.
//
import Foundation
import OpenIMCore
@ -16,7 +9,7 @@ public class BaseCallback: NSObject, Open_im_sdk_callbackBaseProtocol {
self.result = result
}
public func onError(_ errCode: Int, errMsg: String?) {
public func onError(_ errCode: Int32, errMsg: String?) {
print("BaseResult: " + errMsg!)
safeMainAsync { self.result(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
}

@ -1,10 +1,9 @@
import Foundation
public class CommonUtil {
public static func emitEvent(channel: FlutterMethodChannel, method: String, type: String, errCode: Int?, errMsg: String?, data: Any?){
public static func emitEvent(channel: FlutterMethodChannel, method: String, type: String, errCode: Int32?, errMsg: String?, data: Any?){
safeMainAsync {
var res: [String: Any] = [:]
res["type"] = type

@ -1,10 +1,3 @@
//
// JsonUtil.swift
// Runner
//
// Created by z1u24 on 2021/6/28.
//
import Foundation
public class JsonUtil {

@ -1,10 +1,3 @@
//
// BaseServiceManager.swift
// flutter_openim_sdk
//
// Created by willem on 2021/10/9.
//
import Flutter
import OpenIMCore
import UIKit

@ -1,10 +1,3 @@
//
// ConversationManager.swift
// Runner
//
// Created by z1u24 on 2021/6/29.
//
import Foundation
import OpenIMCore
@ -12,7 +5,6 @@ public class ConversationManager: BaseServiceManager {
public override func registerHandlers() {
super.registerHandlers()
self["setConversationListener"] = setConversationListener
self["getAllConversationList"] = getAllConversationList
self["getConversationListSplit"] = getConversationListSplit

@ -1,10 +1,3 @@
//
// FriendshipManager.swift
// Runner
//
// Created by z1u24 on 2021/6/29.
//
import Foundation
import OpenIMCore
@ -81,11 +74,11 @@ public class FriendshipManager: BaseServiceManager {
}
func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
Open_im_sdkAcceptFriendApplication(BaseCallback(result: result), methodCall[string: "operationID", methodCall.toJsonString())
Open_im_sdkAcceptFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
}
func refuseFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[string: "operationID", methodCall.toJsonString())
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
}
// func forceSyncFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
@ -104,35 +97,35 @@ public class FriendshipManager: BaseServiceManager {
// }
}
public class FriendshipListener: NSObject, Open_im_sdk_callbackFriendshipListenerProtocol {
public class FriendshipListener: NSObject, Open_im_sdk_callbackOnFriendshipListenerProtocol {
private let channel:FlutterMethodChannel
init(channel:FlutterMethodChannel) {
self.channel = channel
}
public func onBlackAdded(_ userInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlacklistAdded", errCode: nil, errMsg: nil, data: userInfo)
public func onBlackAdded(_ blackInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlacklistAdded", errCode: nil, errMsg: nil, data: blackInfo)
}
public func onBlackDeleted(_ userInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlacklistDeleted", errCode: nil, errMsg: nil, data: userInfo)
public func onBlackDeleted(_ blackInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onBlacklistDeleted", errCode: nil, errMsg: nil, data: blackInfo)
}
public func onFriendApplicationAccepted(_ applyUserInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationAccepted", errCode: nil, errMsg: nil, data: applyUserInfo)
public func onFriendApplicationAccepted(_ friendApplication: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationAccepted", errCode: nil, errMsg: nil, data: friendApplication)
}
public func onFriendApplicationAdded(_ applyUserInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationAdded", errCode: nil, errMsg: nil, data: applyUserInfo)
public func onFriendApplicationAdded(_ friendApplication: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationAdded", errCode: nil, errMsg: nil, data: friendApplication)
}
public func onFriendApplicationDeleted(_ applyUserInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationDeleted", errCode: nil, errMsg: nil, data: applyUserInfo)
public func onFriendApplicationDeleted(_ friendApplication: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationDeleted", errCode: nil, errMsg: nil, data: friendApplication)
}
public func onFriendApplicationRejected(_ applyUserInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationRejected", errCode: nil, errMsg: nil, data: applyUserInfo)
public func onFriendApplicationRejected(_ friendApplication: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendApplicationRejected", errCode: nil, errMsg: nil, data: friendApplication)
}
public func onFriendInfoChanged(_ friendInfo: String?) {
@ -146,6 +139,5 @@ public class FriendshipListener: NSObject, Open_im_sdk_callbackFriendshipListene
public func onFriendDeleted(_ friendInfo: String?) {
CommonUtil.emitEvent(channel: channel, method: "friendListener", type: "onFriendDeleted", errCode: nil, errMsg: nil, data: friendInfo)
}
}

@ -1,10 +1,3 @@
//
// GroupManager.swift
// flutter_openim_sdk
//
// Created by z1u24 on 2021/7/5.
//
import Foundation
import OpenIMCore
@ -155,7 +148,7 @@ public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtoco
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupMemberAdded", errCode: nil, errMsg: nil, data: s)
}
public func onGroupMemberDeleted(_ s: String?,member s1: String?) {
public func onGroupMemberDeleted(_ s: String?) {
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onGroupMemberDeleted", errCode: nil, errMsg: nil, data: s)
}
@ -170,12 +163,4 @@ public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtoco
public func onJoinedGroupDeleted(_ s: String?) {
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onJoinedGroupDeleted", errCode: nil, errMsg: nil, data: s)
}
public func onReceiveJoinGroupApplicationAdded(_ s: String?) {
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onReceiveJoinGroupApplicationAdded", errCode: nil, errMsg: nil, data: s)
}
public func onReceiveJoinGroupApplicationDeleted(_ s: String?) {
CommonUtil.emitEvent(channel: channel, method: "groupListener", type: "onReceiveJoinGroupApplicationDeleted", errCode: nil, errMsg: nil, data: s)
}
}

@ -1,10 +1,3 @@
//
// IMManager.swift
// Runner
//
// Created by z1u24 on 2021/6/28.
//
import Foundation
import OpenIMCore
@ -12,7 +5,6 @@ public class IMMananger: BaseServiceManager {
public override func registerHandlers() {
super.registerHandlers()
self["initSDK"] = initSDK
self["login"] = login
self["logout"] = logout
@ -75,10 +67,10 @@ public class ConnListener: NSObject, Open_im_sdk_callbackOnConnListenerProtocol
self.channel = channel
}
public func onConnectFailed(_ errCode: Int, errMsg: String?) {
public func onConnectFailed(_ errCode: Int32, errMsg: String?) {
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onConnectFailed", errCode: errCode, errMsg: errMsg, data: nil)
}
public func onConnectSuccess() {
CommonUtil.emitEvent(channel: self.channel, method: "connectListener", type: "onConnectSuccess", errCode: nil, errMsg: nil, data: nil)
}

@ -1,10 +1,3 @@
//
// MessageManager.swift
// Runner
//
// Created by z1u24 on 2021/6/29.
//
import Foundation
import OpenIMCore
@ -14,7 +7,6 @@ public class MessageManager: BaseServiceManager {
public override func registerHandlers() {
super.registerHandlers()
self["setAdvancedMsgListener"] = setAdvancedMsgListener
self["sendMessage"] = sendMessage
self["getHistoryMessageList"] = getHistoryMessageList
@ -49,7 +41,7 @@ public class MessageManager: BaseServiceManager {
func setAdvancedMsgListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
let key = methodCall[string: KEY_ID]
let lis = AdvancedMsgListener(channel: channel, id: key)
open_im_sdkSetAdvancedMsgListener(lis)
Open_im_sdkSetAdvancedMsgListener(lis)
callBack(result)
}
@ -191,22 +183,11 @@ public class MessageManager: BaseServiceManager {
self.call = methodCall
}
// func setResult(result: @escaping FlutterResult){
// self.result = result
// }
//
// func setCall(methodCall: FlutterMethodCall){
// self.call = methodCall
// }
public func onError(_ errCode: Int, errMsg: String?) {
public func onError(_ errCode: Int32, errMsg: String?) {
DispatchQueue.main.async { self.result(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
}
public func onProgress(_ progress: Int) {
// guard let call = call else {
// return
// }
var values: [String: Any] = [:]
let message = call[dict: "message"]
values["clientMsgID"] = message["clientMsgID"]
@ -224,12 +205,9 @@ public class MessageManager: BaseServiceManager {
private let channel: FlutterMethodChannel
private let id: String
// private var values: [String: Any] = [:]
init(channel: FlutterMethodChannel, id: String) {
self.channel = channel
self.id = id
// values["id"] = id
}
public func onRecvC2CReadReceipt(_ msgReceiptList: String?) {

@ -1,4 +1,3 @@
import Foundation
import OpenIMCore
@ -6,6 +5,7 @@ public class UserManager: BaseServiceManager {
public override func registerHandlers() {
super.registerHandlers()
self["setUserListener"] = setUserListener
self["getUsersInfo"] = getUsersInfo
self["setSelfInfo"] = setSelfInfo
self["getSelfUserInfo"] = getSelfUserInfo
@ -32,7 +32,7 @@ public class UserManager: BaseServiceManager {
public class UserListener: NSObject, Open_im_sdk_callbackOnUserListenerProtocol {
private let channel:FlutterMethodChannel
init(channel:FlutterMethodChannel) {
self.channel = channel
}

@ -2,7 +2,6 @@ import Flutter
import UIKit
public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
let imManager: IMMananger
let conversationManager: ConversationManager
let friendshipManager: FriendshipManager

@ -1,15 +0,0 @@
// Objective-C API for talking to the following Go packages
//
// open_im_sdk/open_im_sdk
// open_im_sdk/open_im_sdk_callback
//
// File is generated by gomobile bind. Do not edit.
#ifndef __OpenIMCore_FRAMEWORK_H__
#define __OpenIMCore_FRAMEWORK_H__
#include "Open_im_sdk.objc.h"
#include "Open_im_sdk_callback.objc.h"
#include "Universe.objc.h"
#endif

@ -1,206 +0,0 @@
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
// gobind -lang=objc open_im_sdk/open_im_sdk
//
// File is generated by gobind. Do not edit.
#ifndef __Open_im_sdk_H__
#define __Open_im_sdk_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
#include "Open_im_sdk_callback.objc.h"
@interface Open_im_sdk : NSObject
// skipped variable UserRouterMap with unsupported type: map[string]*open_im_sdk/internal/login.LoginMgr
// skipped variable UserSDKRwLock with unsupported type: sync.RWMutex
@end
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkAddBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable blackUserID);
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDReqMsg);
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT BOOL Open_im_sdkCheckToken(NSString* _Nullable userID, NSString* _Nullable token, NSError* _Nullable* _Nullable error);
FOUNDATION_EXPORT void Open_im_sdkClearC2CHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID);
FOUNDATION_EXPORT void Open_im_sdkClearGroupHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCardMessage(NSString* _Nullable operationID, NSString* _Nullable cardInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCustomMessage(NSString* _Nullable operationID, NSString* _Nullable data, NSString* _Nullable extension, NSString* _Nullable description);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageByURL(NSString* _Nullable operationID, NSString* _Nullable fileBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable fileFullPath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable operationID, NSString* _Nullable m);
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupBaseInfo, NSString* _Nullable memberList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable operationID, NSString* _Nullable imagePath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageByURL(NSString* _Nullable operationID, NSString* _Nullable sourcePicture, NSString* _Nullable bigPicture, NSString* _Nullable snapshotPicture);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable imageFullPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateLocationMessage(NSString* _Nullable operationID, NSString* _Nullable description, double longitude, double latitude);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable operationID, NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateQuoteMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageByURL(NSString* _Nullable operationID, NSString* _Nullable soundBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable atUserList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable operationID, NSString* _Nullable text);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable operationID, NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageByURL(NSString* _Nullable operationID, NSString* _Nullable videoBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID);
FOUNDATION_EXPORT void Open_im_sdkDeleteFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable friendUserID);
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
FOUNDATION_EXPORT void Open_im_sdkGetConversationListSplit(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long offset, long count);
FOUNDATION_EXPORT void Open_im_sdkGetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetDesignatedFriendsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, int32_t filter, int32_t offset, int32_t count);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupIDList);
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable getMessageOptions);
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT int32_t Open_im_sdkGetLoginStatus(void);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long sessionType, NSString* _Nullable sourceID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSelfUserInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
// skipped function GetUserWorker with unsupported parameter or return types
/**
* /////////////////////user/////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
// skipped function InitOnce with unsupported parameter or return types
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(id<Open_im_sdk_callbackOnConnListener> _Nullable listener, NSString* _Nullable operationID, NSString* _Nullable config);
FOUNDATION_EXPORT void Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reqMsg);
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkLogin(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable token);
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable msgIDList);
FOUNDATION_EXPORT void Open_im_sdkMarkGroupMessageHasRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkPinConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, BOOL isPinned);
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkRemoveBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable removeUserID);
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSdkVersion(void);
FOUNDATION_EXPORT void Open_im_sdkSendMessage(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSendMessageNotOss(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSetAdvancedMsgListener(id<Open_im_sdk_callbackOnAdvancedMsgListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, NSString* _Nullable draftText);
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdk_callbackOnConversationListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList, long opt);
FOUNDATION_EXPORT void Open_im_sdkSetFriendListener(id<Open_im_sdk_callbackOnFriendshipListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetFriendRemark(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDRemark);
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable groupInfo);
/**
* ////////////////////////group//////////////////////////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdk_callbackOnGroupListener> _Nullable callback);
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userInfo);
FOUNDATION_EXPORT void Open_im_sdkSetUserListener(id<Open_im_sdk_callbackOnUserListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable newOwnerUserID);
FOUNDATION_EXPORT void Open_im_sdkTypingStatusUpdate(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable recvID, NSString* _Nullable msgTip);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkUploadImage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable token, NSString* _Nullable obj);
#endif

@ -1,29 +0,0 @@
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
#include "ref.h"
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString* _Nonnull)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (NSString* _Nonnull)error;
@end
#endif

@ -1,35 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef __GO_REF_HDR__
#define __GO_REF_HDR__
#include <Foundation/Foundation.h>
// GoSeqRef is an object tagged with an integer for passing back and
// forth across the language boundary. A GoSeqRef may represent either
// an instance of a Go object, or an Objective-C object passed to Go.
// The explicit allocation of a GoSeqRef is used to pin a Go object
// when it is passed to Objective-C. The Go seq package maintains a
// reference to the Go object in a map keyed by the refnum along with
// a reference count. When the reference count reaches zero, the Go
// seq package will clear the corresponding entry in the map.
@interface GoSeqRef : NSObject {
}
@property(readonly) int32_t refnum;
@property(strong) id obj; // NULL when representing a Go object.
// new GoSeqRef object to proxy a Go object. The refnum must be
// provided from Go side.
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
- (int32_t)incNum;
@end
@protocol goSeqRefInterface
-(GoSeqRef*) _ref;
@end
#endif

@ -1,9 +0,0 @@
framework module "OpenIMCore" {
header "ref.h"
header "Open_im_sdk.objc.h"
header "Open_im_sdk_callback.objc.h"
header "Universe.objc.h"
header "OpenIMCore.h"
export *
}

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

@ -6,30 +6,30 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>OpenIMCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>OpenIMCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>

@ -1,15 +0,0 @@
// Objective-C API for talking to the following Go packages
//
// open_im_sdk/open_im_sdk
// open_im_sdk/open_im_sdk_callback
//
// File is generated by gomobile bind. Do not edit.
#ifndef __OpenIMCore_FRAMEWORK_H__
#define __OpenIMCore_FRAMEWORK_H__
#include "Open_im_sdk.objc.h"
#include "Open_im_sdk_callback.objc.h"
#include "Universe.objc.h"
#endif

@ -1,206 +0,0 @@
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
// gobind -lang=objc open_im_sdk/open_im_sdk
//
// File is generated by gobind. Do not edit.
#ifndef __Open_im_sdk_H__
#define __Open_im_sdk_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
#include "Open_im_sdk_callback.objc.h"
@interface Open_im_sdk : NSObject
// skipped variable UserRouterMap with unsupported type: map[string]*open_im_sdk/internal/login.LoginMgr
// skipped variable UserSDKRwLock with unsupported type: sync.RWMutex
@end
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkAddBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable blackUserID);
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDReqMsg);
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT BOOL Open_im_sdkCheckToken(NSString* _Nullable userID, NSString* _Nullable token, NSError* _Nullable* _Nullable error);
FOUNDATION_EXPORT void Open_im_sdkClearC2CHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID);
FOUNDATION_EXPORT void Open_im_sdkClearGroupHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCardMessage(NSString* _Nullable operationID, NSString* _Nullable cardInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCustomMessage(NSString* _Nullable operationID, NSString* _Nullable data, NSString* _Nullable extension, NSString* _Nullable description);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageByURL(NSString* _Nullable operationID, NSString* _Nullable fileBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable fileFullPath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable operationID, NSString* _Nullable m);
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupBaseInfo, NSString* _Nullable memberList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable operationID, NSString* _Nullable imagePath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageByURL(NSString* _Nullable operationID, NSString* _Nullable sourcePicture, NSString* _Nullable bigPicture, NSString* _Nullable snapshotPicture);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable imageFullPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateLocationMessage(NSString* _Nullable operationID, NSString* _Nullable description, double longitude, double latitude);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable operationID, NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateQuoteMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageByURL(NSString* _Nullable operationID, NSString* _Nullable soundBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable atUserList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable operationID, NSString* _Nullable text);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable operationID, NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageByURL(NSString* _Nullable operationID, NSString* _Nullable videoBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID);
FOUNDATION_EXPORT void Open_im_sdkDeleteFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable friendUserID);
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
FOUNDATION_EXPORT void Open_im_sdkGetConversationListSplit(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long offset, long count);
FOUNDATION_EXPORT void Open_im_sdkGetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetDesignatedFriendsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, int32_t filter, int32_t offset, int32_t count);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupIDList);
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable getMessageOptions);
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT int32_t Open_im_sdkGetLoginStatus(void);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long sessionType, NSString* _Nullable sourceID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSelfUserInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
// skipped function GetUserWorker with unsupported parameter or return types
/**
* /////////////////////user/////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
// skipped function InitOnce with unsupported parameter or return types
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(id<Open_im_sdk_callbackOnConnListener> _Nullable listener, NSString* _Nullable operationID, NSString* _Nullable config);
FOUNDATION_EXPORT void Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reqMsg);
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkLogin(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable token);
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable msgIDList);
FOUNDATION_EXPORT void Open_im_sdkMarkGroupMessageHasRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkPinConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, BOOL isPinned);
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkRemoveBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable removeUserID);
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSdkVersion(void);
FOUNDATION_EXPORT void Open_im_sdkSendMessage(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSendMessageNotOss(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSetAdvancedMsgListener(id<Open_im_sdk_callbackOnAdvancedMsgListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, NSString* _Nullable draftText);
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdk_callbackOnConversationListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList, long opt);
FOUNDATION_EXPORT void Open_im_sdkSetFriendListener(id<Open_im_sdk_callbackOnFriendshipListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetFriendRemark(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDRemark);
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable groupInfo);
/**
* ////////////////////////group//////////////////////////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdk_callbackOnGroupListener> _Nullable callback);
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userInfo);
FOUNDATION_EXPORT void Open_im_sdkSetUserListener(id<Open_im_sdk_callbackOnUserListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable newOwnerUserID);
FOUNDATION_EXPORT void Open_im_sdkTypingStatusUpdate(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable recvID, NSString* _Nullable msgTip);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkUploadImage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable token, NSString* _Nullable obj);
#endif

@ -1,29 +0,0 @@
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
#include "ref.h"
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString* _Nonnull)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (NSString* _Nonnull)error;
@end
#endif

@ -1,35 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef __GO_REF_HDR__
#define __GO_REF_HDR__
#include <Foundation/Foundation.h>
// GoSeqRef is an object tagged with an integer for passing back and
// forth across the language boundary. A GoSeqRef may represent either
// an instance of a Go object, or an Objective-C object passed to Go.
// The explicit allocation of a GoSeqRef is used to pin a Go object
// when it is passed to Objective-C. The Go seq package maintains a
// reference to the Go object in a map keyed by the refnum along with
// a reference count. When the reference count reaches zero, the Go
// seq package will clear the corresponding entry in the map.
@interface GoSeqRef : NSObject {
}
@property(readonly) int32_t refnum;
@property(strong) id obj; // NULL when representing a Go object.
// new GoSeqRef object to proxy a Go object. The refnum must be
// provided from Go side.
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
- (int32_t)incNum;
@end
@protocol goSeqRefInterface
-(GoSeqRef*) _ref;
@end
#endif

@ -1,9 +0,0 @@
framework module "OpenIMCore" {
header "ref.h"
header "Open_im_sdk.objc.h"
header "Open_im_sdk_callback.objc.h"
header "Universe.objc.h"
header "OpenIMCore.h"
export *
}

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

@ -140,6 +140,8 @@ FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(id<Open_im_sdk_callbackBase> _Nul
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(id<Open_im_sdk_callbackOnConnListener> _Nullable listener, NSString* _Nullable operationID, NSString* _Nullable config);
FOUNDATION_EXPORT void Open_im_sdkInsertGroupMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable groupID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
@ -170,6 +172,8 @@ FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdk_callbackBase> _Nu
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSdkVersion(void);
FOUNDATION_EXPORT void Open_im_sdkSearchLocalMessages(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable searchParam);
FOUNDATION_EXPORT void Open_im_sdkSendMessage(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSendMessageNotOss(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);

@ -0,0 +1,205 @@
// Objective-C API for talking to open_im_sdk/open_im_sdk_callback Go package.
// gobind -lang=objc open_im_sdk/open_im_sdk_callback
//
// File is generated by gobind. Do not edit.
#ifndef __Open_im_sdk_callback_H__
#define __Open_im_sdk_callback_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
@protocol Open_im_sdk_callbackBase;
@class Open_im_sdk_callbackBase;
@protocol Open_im_sdk_callbackOnAdvancedMsgListener;
@class Open_im_sdk_callbackOnAdvancedMsgListener;
@protocol Open_im_sdk_callbackOnConnListener;
@class Open_im_sdk_callbackOnConnListener;
@protocol Open_im_sdk_callbackOnConversationListener;
@class Open_im_sdk_callbackOnConversationListener;
@protocol Open_im_sdk_callbackOnFriendshipListener;
@class Open_im_sdk_callbackOnFriendshipListener;
@protocol Open_im_sdk_callbackOnGroupListener;
@class Open_im_sdk_callbackOnGroupListener;
@protocol Open_im_sdk_callbackOnUserListener;
@class Open_im_sdk_callbackOnUserListener;
@protocol Open_im_sdk_callbackSendMsgCallBack;
@class Open_im_sdk_callbackSendMsgCallBack;
@protocol Open_im_sdk_callbackBase <NSObject>
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onSuccess:(NSString* _Nullable)data;
@end
@protocol Open_im_sdk_callbackOnAdvancedMsgListener <NSObject>
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
- (void)onRecvNewMessage:(NSString* _Nullable)message;
@end
@protocol Open_im_sdk_callbackOnConnListener <NSObject>
- (void)onConnectFailed:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onConnectSuccess;
- (void)onConnecting;
- (void)onKickedOffline;
- (void)onUserTokenExpired;
@end
@protocol Open_im_sdk_callbackOnConversationListener <NSObject>
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
- (void)onNewConversation:(NSString* _Nullable)conversationList;
- (void)onSyncServerFailed;
- (void)onSyncServerFinish;
- (void)onSyncServerStart;
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
@end
@protocol Open_im_sdk_callbackOnFriendshipListener <NSObject>
- (void)onBlackAdded:(NSString* _Nullable)blackInfo;
- (void)onBlackDeleted:(NSString* _Nullable)blackInfo;
- (void)onFriendAdded:(NSString* _Nullable)friendInfo;
- (void)onFriendApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onFriendApplicationAdded:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationDeleted:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationRejected:(NSString* _Nullable)friendApplication;
- (void)onFriendDeleted:(NSString* _Nullable)friendInfo;
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
@end
@protocol Open_im_sdk_callbackOnGroupListener <NSObject>
- (void)onGroupApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationAdded:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationDeleted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationRejected:(NSString* _Nullable)groupApplication;
- (void)onGroupInfoChanged:(NSString* _Nullable)groupInfo;
- (void)onGroupMemberAdded:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberDeleted:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberInfoChanged:(NSString* _Nullable)groupMemberInfo;
- (void)onJoinedGroupAdded:(NSString* _Nullable)groupInfo;
- (void)onJoinedGroupDeleted:(NSString* _Nullable)groupInfo;
@end
@protocol Open_im_sdk_callbackOnUserListener <NSObject>
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
@end
@protocol Open_im_sdk_callbackSendMsgCallBack <NSObject>
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onProgress:(long)progress;
- (void)onSuccess:(NSString* _Nullable)data;
@end
@class Open_im_sdk_callbackBase;
@class Open_im_sdk_callbackOnAdvancedMsgListener;
@class Open_im_sdk_callbackOnConnListener;
@class Open_im_sdk_callbackOnConversationListener;
@class Open_im_sdk_callbackOnFriendshipListener;
@class Open_im_sdk_callbackOnGroupListener;
@class Open_im_sdk_callbackOnUserListener;
@class Open_im_sdk_callbackSendMsgCallBack;
@interface Open_im_sdk_callbackBase : NSObject <goSeqRefInterface, Open_im_sdk_callbackBase> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onSuccess:(NSString* _Nullable)data;
@end
@interface Open_im_sdk_callbackOnAdvancedMsgListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnAdvancedMsgListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
- (void)onRecvNewMessage:(NSString* _Nullable)message;
@end
@interface Open_im_sdk_callbackOnConnListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnConnListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onConnectFailed:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onConnectSuccess;
- (void)onConnecting;
- (void)onKickedOffline;
- (void)onUserTokenExpired;
@end
@interface Open_im_sdk_callbackOnConversationListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnConversationListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
- (void)onNewConversation:(NSString* _Nullable)conversationList;
- (void)onSyncServerFailed;
- (void)onSyncServerFinish;
- (void)onSyncServerStart;
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
@end
@interface Open_im_sdk_callbackOnFriendshipListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnFriendshipListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onBlackAdded:(NSString* _Nullable)blackInfo;
- (void)onBlackDeleted:(NSString* _Nullable)blackInfo;
- (void)onFriendAdded:(NSString* _Nullable)friendInfo;
- (void)onFriendApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onFriendApplicationAdded:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationDeleted:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationRejected:(NSString* _Nullable)friendApplication;
- (void)onFriendDeleted:(NSString* _Nullable)friendInfo;
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
@end
@interface Open_im_sdk_callbackOnGroupListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnGroupListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onGroupApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationAdded:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationDeleted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationRejected:(NSString* _Nullable)groupApplication;
- (void)onGroupInfoChanged:(NSString* _Nullable)groupInfo;
- (void)onGroupMemberAdded:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberDeleted:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberInfoChanged:(NSString* _Nullable)groupMemberInfo;
- (void)onJoinedGroupAdded:(NSString* _Nullable)groupInfo;
- (void)onJoinedGroupDeleted:(NSString* _Nullable)groupInfo;
@end
@interface Open_im_sdk_callbackOnUserListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnUserListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
@end
@interface Open_im_sdk_callbackSendMsgCallBack : NSObject <goSeqRefInterface, Open_im_sdk_callbackSendMsgCallBack> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onProgress:(long)progress;
- (void)onSuccess:(NSString* _Nullable)data;
@end
#endif

@ -1,15 +0,0 @@
// Objective-C API for talking to the following Go packages
//
// open_im_sdk/open_im_sdk
// open_im_sdk/open_im_sdk_callback
//
// File is generated by gomobile bind. Do not edit.
#ifndef __OpenIMCore_FRAMEWORK_H__
#define __OpenIMCore_FRAMEWORK_H__
#include "Open_im_sdk.objc.h"
#include "Open_im_sdk_callback.objc.h"
#include "Universe.objc.h"
#endif

@ -1,206 +0,0 @@
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
// gobind -lang=objc open_im_sdk/open_im_sdk
//
// File is generated by gobind. Do not edit.
#ifndef __Open_im_sdk_H__
#define __Open_im_sdk_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
#include "Open_im_sdk_callback.objc.h"
@interface Open_im_sdk : NSObject
// skipped variable UserRouterMap with unsupported type: map[string]*open_im_sdk/internal/login.LoginMgr
// skipped variable UserSDKRwLock with unsupported type: sync.RWMutex
@end
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkAddBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable blackUserID);
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDReqMsg);
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT BOOL Open_im_sdkCheckToken(NSString* _Nullable userID, NSString* _Nullable token, NSError* _Nullable* _Nullable error);
FOUNDATION_EXPORT void Open_im_sdkClearC2CHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID);
FOUNDATION_EXPORT void Open_im_sdkClearGroupHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCardMessage(NSString* _Nullable operationID, NSString* _Nullable cardInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCustomMessage(NSString* _Nullable operationID, NSString* _Nullable data, NSString* _Nullable extension, NSString* _Nullable description);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageByURL(NSString* _Nullable operationID, NSString* _Nullable fileBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable fileFullPath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable operationID, NSString* _Nullable m);
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupBaseInfo, NSString* _Nullable memberList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable operationID, NSString* _Nullable imagePath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageByURL(NSString* _Nullable operationID, NSString* _Nullable sourcePicture, NSString* _Nullable bigPicture, NSString* _Nullable snapshotPicture);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable imageFullPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateLocationMessage(NSString* _Nullable operationID, NSString* _Nullable description, double longitude, double latitude);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable operationID, NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateQuoteMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageByURL(NSString* _Nullable operationID, NSString* _Nullable soundBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable atUserList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable operationID, NSString* _Nullable text);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable operationID, NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageByURL(NSString* _Nullable operationID, NSString* _Nullable videoBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID);
FOUNDATION_EXPORT void Open_im_sdkDeleteFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable friendUserID);
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
FOUNDATION_EXPORT void Open_im_sdkGetConversationListSplit(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long offset, long count);
FOUNDATION_EXPORT void Open_im_sdkGetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetDesignatedFriendsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, int32_t filter, int32_t offset, int32_t count);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupIDList);
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable getMessageOptions);
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT int32_t Open_im_sdkGetLoginStatus(void);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long sessionType, NSString* _Nullable sourceID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSelfUserInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
// skipped function GetUserWorker with unsupported parameter or return types
/**
* /////////////////////user/////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
// skipped function InitOnce with unsupported parameter or return types
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(id<Open_im_sdk_callbackOnConnListener> _Nullable listener, NSString* _Nullable operationID, NSString* _Nullable config);
FOUNDATION_EXPORT void Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reqMsg);
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkLogin(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable token);
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable msgIDList);
FOUNDATION_EXPORT void Open_im_sdkMarkGroupMessageHasRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkPinConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, BOOL isPinned);
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkRemoveBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable removeUserID);
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSdkVersion(void);
FOUNDATION_EXPORT void Open_im_sdkSendMessage(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSendMessageNotOss(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSetAdvancedMsgListener(id<Open_im_sdk_callbackOnAdvancedMsgListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, NSString* _Nullable draftText);
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdk_callbackOnConversationListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList, long opt);
FOUNDATION_EXPORT void Open_im_sdkSetFriendListener(id<Open_im_sdk_callbackOnFriendshipListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetFriendRemark(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDRemark);
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable groupInfo);
/**
* ////////////////////////group//////////////////////////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdk_callbackOnGroupListener> _Nullable callback);
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userInfo);
FOUNDATION_EXPORT void Open_im_sdkSetUserListener(id<Open_im_sdk_callbackOnUserListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable newOwnerUserID);
FOUNDATION_EXPORT void Open_im_sdkTypingStatusUpdate(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable recvID, NSString* _Nullable msgTip);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkUploadImage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable token, NSString* _Nullable obj);
#endif

@ -1,29 +0,0 @@
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
#include "ref.h"
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString* _Nonnull)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (NSString* _Nonnull)error;
@end
#endif

@ -1,35 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef __GO_REF_HDR__
#define __GO_REF_HDR__
#include <Foundation/Foundation.h>
// GoSeqRef is an object tagged with an integer for passing back and
// forth across the language boundary. A GoSeqRef may represent either
// an instance of a Go object, or an Objective-C object passed to Go.
// The explicit allocation of a GoSeqRef is used to pin a Go object
// when it is passed to Objective-C. The Go seq package maintains a
// reference to the Go object in a map keyed by the refnum along with
// a reference count. When the reference count reaches zero, the Go
// seq package will clear the corresponding entry in the map.
@interface GoSeqRef : NSObject {
}
@property(readonly) int32_t refnum;
@property(strong) id obj; // NULL when representing a Go object.
// new GoSeqRef object to proxy a Go object. The refnum must be
// provided from Go side.
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
- (int32_t)incNum;
@end
@protocol goSeqRefInterface
-(GoSeqRef*) _ref;
@end
#endif

@ -1,9 +0,0 @@
framework module "OpenIMCore" {
header "ref.h"
header "Open_im_sdk.objc.h"
header "Open_im_sdk_callback.objc.h"
header "Universe.objc.h"
header "OpenIMCore.h"
export *
}

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

@ -1,15 +0,0 @@
// Objective-C API for talking to the following Go packages
//
// open_im_sdk/open_im_sdk
// open_im_sdk/open_im_sdk_callback
//
// File is generated by gomobile bind. Do not edit.
#ifndef __OpenIMCore_FRAMEWORK_H__
#define __OpenIMCore_FRAMEWORK_H__
#include "Open_im_sdk.objc.h"
#include "Open_im_sdk_callback.objc.h"
#include "Universe.objc.h"
#endif

@ -1,206 +0,0 @@
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
// gobind -lang=objc open_im_sdk/open_im_sdk
//
// File is generated by gobind. Do not edit.
#ifndef __Open_im_sdk_H__
#define __Open_im_sdk_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
#include "Open_im_sdk_callback.objc.h"
@interface Open_im_sdk : NSObject
// skipped variable UserRouterMap with unsupported type: map[string]*open_im_sdk/internal/login.LoginMgr
// skipped variable UserSDKRwLock with unsupported type: sync.RWMutex
@end
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkAddBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable blackUserID);
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDReqMsg);
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT BOOL Open_im_sdkCheckToken(NSString* _Nullable userID, NSString* _Nullable token, NSError* _Nullable* _Nullable error);
FOUNDATION_EXPORT void Open_im_sdkClearC2CHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID);
FOUNDATION_EXPORT void Open_im_sdkClearGroupHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCardMessage(NSString* _Nullable operationID, NSString* _Nullable cardInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCustomMessage(NSString* _Nullable operationID, NSString* _Nullable data, NSString* _Nullable extension, NSString* _Nullable description);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageByURL(NSString* _Nullable operationID, NSString* _Nullable fileBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable fileFullPath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable operationID, NSString* _Nullable m);
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupBaseInfo, NSString* _Nullable memberList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable operationID, NSString* _Nullable imagePath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageByURL(NSString* _Nullable operationID, NSString* _Nullable sourcePicture, NSString* _Nullable bigPicture, NSString* _Nullable snapshotPicture);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable imageFullPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateLocationMessage(NSString* _Nullable operationID, NSString* _Nullable description, double longitude, double latitude);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable operationID, NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateQuoteMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageByURL(NSString* _Nullable operationID, NSString* _Nullable soundBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable atUserList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable operationID, NSString* _Nullable text);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable operationID, NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageByURL(NSString* _Nullable operationID, NSString* _Nullable videoBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID);
FOUNDATION_EXPORT void Open_im_sdkDeleteFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable friendUserID);
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
FOUNDATION_EXPORT void Open_im_sdkGetConversationListSplit(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long offset, long count);
FOUNDATION_EXPORT void Open_im_sdkGetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetDesignatedFriendsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, int32_t filter, int32_t offset, int32_t count);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupIDList);
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable getMessageOptions);
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT int32_t Open_im_sdkGetLoginStatus(void);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long sessionType, NSString* _Nullable sourceID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSelfUserInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
// skipped function GetUserWorker with unsupported parameter or return types
/**
* /////////////////////user/////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
// skipped function InitOnce with unsupported parameter or return types
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(id<Open_im_sdk_callbackOnConnListener> _Nullable listener, NSString* _Nullable operationID, NSString* _Nullable config);
FOUNDATION_EXPORT void Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reqMsg);
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkLogin(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable token);
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable msgIDList);
FOUNDATION_EXPORT void Open_im_sdkMarkGroupMessageHasRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkPinConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, BOOL isPinned);
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkRemoveBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable removeUserID);
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSdkVersion(void);
FOUNDATION_EXPORT void Open_im_sdkSendMessage(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSendMessageNotOss(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSetAdvancedMsgListener(id<Open_im_sdk_callbackOnAdvancedMsgListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, NSString* _Nullable draftText);
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdk_callbackOnConversationListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList, long opt);
FOUNDATION_EXPORT void Open_im_sdkSetFriendListener(id<Open_im_sdk_callbackOnFriendshipListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetFriendRemark(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDRemark);
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable groupInfo);
/**
* ////////////////////////group//////////////////////////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdk_callbackOnGroupListener> _Nullable callback);
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userInfo);
FOUNDATION_EXPORT void Open_im_sdkSetUserListener(id<Open_im_sdk_callbackOnUserListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable newOwnerUserID);
FOUNDATION_EXPORT void Open_im_sdkTypingStatusUpdate(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable recvID, NSString* _Nullable msgTip);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkUploadImage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable token, NSString* _Nullable obj);
#endif

@ -1,29 +0,0 @@
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
#include "ref.h"
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString* _Nonnull)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (NSString* _Nonnull)error;
@end
#endif

@ -1,35 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef __GO_REF_HDR__
#define __GO_REF_HDR__
#include <Foundation/Foundation.h>
// GoSeqRef is an object tagged with an integer for passing back and
// forth across the language boundary. A GoSeqRef may represent either
// an instance of a Go object, or an Objective-C object passed to Go.
// The explicit allocation of a GoSeqRef is used to pin a Go object
// when it is passed to Objective-C. The Go seq package maintains a
// reference to the Go object in a map keyed by the refnum along with
// a reference count. When the reference count reaches zero, the Go
// seq package will clear the corresponding entry in the map.
@interface GoSeqRef : NSObject {
}
@property(readonly) int32_t refnum;
@property(strong) id obj; // NULL when representing a Go object.
// new GoSeqRef object to proxy a Go object. The refnum must be
// provided from Go side.
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
- (int32_t)incNum;
@end
@protocol goSeqRefInterface
-(GoSeqRef*) _ref;
@end
#endif

@ -1,9 +0,0 @@
framework module "OpenIMCore" {
header "ref.h"
header "Open_im_sdk.objc.h"
header "Open_im_sdk_callback.objc.h"
header "Universe.objc.h"
header "OpenIMCore.h"
export *
}

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

@ -140,6 +140,8 @@ FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(id<Open_im_sdk_callbackBase> _Nul
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(id<Open_im_sdk_callbackOnConnListener> _Nullable listener, NSString* _Nullable operationID, NSString* _Nullable config);
FOUNDATION_EXPORT void Open_im_sdkInsertGroupMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable groupID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
@ -170,6 +172,8 @@ FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdk_callbackBase> _Nu
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSdkVersion(void);
FOUNDATION_EXPORT void Open_im_sdkSearchLocalMessages(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable searchParam);
FOUNDATION_EXPORT void Open_im_sdkSendMessage(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSendMessageNotOss(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);

@ -0,0 +1,205 @@
// Objective-C API for talking to open_im_sdk/open_im_sdk_callback Go package.
// gobind -lang=objc open_im_sdk/open_im_sdk_callback
//
// File is generated by gobind. Do not edit.
#ifndef __Open_im_sdk_callback_H__
#define __Open_im_sdk_callback_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
@protocol Open_im_sdk_callbackBase;
@class Open_im_sdk_callbackBase;
@protocol Open_im_sdk_callbackOnAdvancedMsgListener;
@class Open_im_sdk_callbackOnAdvancedMsgListener;
@protocol Open_im_sdk_callbackOnConnListener;
@class Open_im_sdk_callbackOnConnListener;
@protocol Open_im_sdk_callbackOnConversationListener;
@class Open_im_sdk_callbackOnConversationListener;
@protocol Open_im_sdk_callbackOnFriendshipListener;
@class Open_im_sdk_callbackOnFriendshipListener;
@protocol Open_im_sdk_callbackOnGroupListener;
@class Open_im_sdk_callbackOnGroupListener;
@protocol Open_im_sdk_callbackOnUserListener;
@class Open_im_sdk_callbackOnUserListener;
@protocol Open_im_sdk_callbackSendMsgCallBack;
@class Open_im_sdk_callbackSendMsgCallBack;
@protocol Open_im_sdk_callbackBase <NSObject>
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onSuccess:(NSString* _Nullable)data;
@end
@protocol Open_im_sdk_callbackOnAdvancedMsgListener <NSObject>
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
- (void)onRecvNewMessage:(NSString* _Nullable)message;
@end
@protocol Open_im_sdk_callbackOnConnListener <NSObject>
- (void)onConnectFailed:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onConnectSuccess;
- (void)onConnecting;
- (void)onKickedOffline;
- (void)onUserTokenExpired;
@end
@protocol Open_im_sdk_callbackOnConversationListener <NSObject>
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
- (void)onNewConversation:(NSString* _Nullable)conversationList;
- (void)onSyncServerFailed;
- (void)onSyncServerFinish;
- (void)onSyncServerStart;
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
@end
@protocol Open_im_sdk_callbackOnFriendshipListener <NSObject>
- (void)onBlackAdded:(NSString* _Nullable)blackInfo;
- (void)onBlackDeleted:(NSString* _Nullable)blackInfo;
- (void)onFriendAdded:(NSString* _Nullable)friendInfo;
- (void)onFriendApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onFriendApplicationAdded:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationDeleted:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationRejected:(NSString* _Nullable)friendApplication;
- (void)onFriendDeleted:(NSString* _Nullable)friendInfo;
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
@end
@protocol Open_im_sdk_callbackOnGroupListener <NSObject>
- (void)onGroupApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationAdded:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationDeleted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationRejected:(NSString* _Nullable)groupApplication;
- (void)onGroupInfoChanged:(NSString* _Nullable)groupInfo;
- (void)onGroupMemberAdded:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberDeleted:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberInfoChanged:(NSString* _Nullable)groupMemberInfo;
- (void)onJoinedGroupAdded:(NSString* _Nullable)groupInfo;
- (void)onJoinedGroupDeleted:(NSString* _Nullable)groupInfo;
@end
@protocol Open_im_sdk_callbackOnUserListener <NSObject>
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
@end
@protocol Open_im_sdk_callbackSendMsgCallBack <NSObject>
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onProgress:(long)progress;
- (void)onSuccess:(NSString* _Nullable)data;
@end
@class Open_im_sdk_callbackBase;
@class Open_im_sdk_callbackOnAdvancedMsgListener;
@class Open_im_sdk_callbackOnConnListener;
@class Open_im_sdk_callbackOnConversationListener;
@class Open_im_sdk_callbackOnFriendshipListener;
@class Open_im_sdk_callbackOnGroupListener;
@class Open_im_sdk_callbackOnUserListener;
@class Open_im_sdk_callbackSendMsgCallBack;
@interface Open_im_sdk_callbackBase : NSObject <goSeqRefInterface, Open_im_sdk_callbackBase> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onSuccess:(NSString* _Nullable)data;
@end
@interface Open_im_sdk_callbackOnAdvancedMsgListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnAdvancedMsgListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onRecvC2CReadReceipt:(NSString* _Nullable)msgReceiptList;
- (void)onRecvMessageRevoked:(NSString* _Nullable)msgId;
- (void)onRecvNewMessage:(NSString* _Nullable)message;
@end
@interface Open_im_sdk_callbackOnConnListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnConnListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onConnectFailed:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onConnectSuccess;
- (void)onConnecting;
- (void)onKickedOffline;
- (void)onUserTokenExpired;
@end
@interface Open_im_sdk_callbackOnConversationListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnConversationListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onConversationChanged:(NSString* _Nullable)conversationList;
- (void)onNewConversation:(NSString* _Nullable)conversationList;
- (void)onSyncServerFailed;
- (void)onSyncServerFinish;
- (void)onSyncServerStart;
- (void)onTotalUnreadMessageCountChanged:(int32_t)totalUnreadCount;
@end
@interface Open_im_sdk_callbackOnFriendshipListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnFriendshipListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onBlackAdded:(NSString* _Nullable)blackInfo;
- (void)onBlackDeleted:(NSString* _Nullable)blackInfo;
- (void)onFriendAdded:(NSString* _Nullable)friendInfo;
- (void)onFriendApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onFriendApplicationAdded:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationDeleted:(NSString* _Nullable)friendApplication;
- (void)onFriendApplicationRejected:(NSString* _Nullable)friendApplication;
- (void)onFriendDeleted:(NSString* _Nullable)friendInfo;
- (void)onFriendInfoChanged:(NSString* _Nullable)friendInfo;
@end
@interface Open_im_sdk_callbackOnGroupListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnGroupListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onGroupApplicationAccepted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationAdded:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationDeleted:(NSString* _Nullable)groupApplication;
- (void)onGroupApplicationRejected:(NSString* _Nullable)groupApplication;
- (void)onGroupInfoChanged:(NSString* _Nullable)groupInfo;
- (void)onGroupMemberAdded:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberDeleted:(NSString* _Nullable)groupMemberInfo;
- (void)onGroupMemberInfoChanged:(NSString* _Nullable)groupMemberInfo;
- (void)onJoinedGroupAdded:(NSString* _Nullable)groupInfo;
- (void)onJoinedGroupDeleted:(NSString* _Nullable)groupInfo;
@end
@interface Open_im_sdk_callbackOnUserListener : NSObject <goSeqRefInterface, Open_im_sdk_callbackOnUserListener> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onSelfInfoUpdated:(NSString* _Nullable)userInfo;
@end
@interface Open_im_sdk_callbackSendMsgCallBack : NSObject <goSeqRefInterface, Open_im_sdk_callbackSendMsgCallBack> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onError:(int32_t)errCode errMsg:(NSString* _Nullable)errMsg;
- (void)onProgress:(long)progress;
- (void)onSuccess:(NSString* _Nullable)data;
@end
#endif

@ -1,15 +0,0 @@
// Objective-C API for talking to the following Go packages
//
// open_im_sdk/open_im_sdk
// open_im_sdk/open_im_sdk_callback
//
// File is generated by gomobile bind. Do not edit.
#ifndef __OpenIMCore_FRAMEWORK_H__
#define __OpenIMCore_FRAMEWORK_H__
#include "Open_im_sdk.objc.h"
#include "Open_im_sdk_callback.objc.h"
#include "Universe.objc.h"
#endif

@ -1,206 +0,0 @@
// Objective-C API for talking to open_im_sdk/open_im_sdk Go package.
// gobind -lang=objc open_im_sdk/open_im_sdk
//
// File is generated by gobind. Do not edit.
#ifndef __Open_im_sdk_H__
#define __Open_im_sdk_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
#include "Open_im_sdk_callback.objc.h"
@interface Open_im_sdk : NSObject
// skipped variable UserRouterMap with unsupported type: map[string]*open_im_sdk/internal/login.LoginMgr
// skipped variable UserSDKRwLock with unsupported type: sync.RWMutex
@end
FOUNDATION_EXPORT void Open_im_sdkAcceptFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkAcceptGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkAddBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable blackUserID);
FOUNDATION_EXPORT void Open_im_sdkAddFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDReqMsg);
FOUNDATION_EXPORT void Open_im_sdkCheckFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT BOOL Open_im_sdkCheckToken(NSString* _Nullable userID, NSString* _Nullable token, NSError* _Nullable* _Nullable error);
FOUNDATION_EXPORT void Open_im_sdkClearC2CHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID);
FOUNDATION_EXPORT void Open_im_sdkClearGroupHistoryMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCardMessage(NSString* _Nullable operationID, NSString* _Nullable cardInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateCustomMessage(NSString* _Nullable operationID, NSString* _Nullable data, NSString* _Nullable extension, NSString* _Nullable description);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessage(NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageByURL(NSString* _Nullable operationID, NSString* _Nullable fileBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateFileMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable fileFullPath, NSString* _Nullable fileName);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateForwardMessage(NSString* _Nullable operationID, NSString* _Nullable m);
FOUNDATION_EXPORT void Open_im_sdkCreateGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupBaseInfo, NSString* _Nullable memberList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessage(NSString* _Nullable operationID, NSString* _Nullable imagePath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageByURL(NSString* _Nullable operationID, NSString* _Nullable sourcePicture, NSString* _Nullable bigPicture, NSString* _Nullable snapshotPicture);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateImageMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable imageFullPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateLocationMessage(NSString* _Nullable operationID, NSString* _Nullable description, double longitude, double latitude);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateMergerMessage(NSString* _Nullable operationID, NSString* _Nullable messageList, NSString* _Nullable title, NSString* _Nullable summaryList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateQuoteMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessage(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageByURL(NSString* _Nullable operationID, NSString* _Nullable soundBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateSoundMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable soundPath, int64_t duration);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextAtMessage(NSString* _Nullable operationID, NSString* _Nullable text, NSString* _Nullable atUserList);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateTextMessage(NSString* _Nullable operationID, NSString* _Nullable text);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessage(NSString* _Nullable operationID, NSString* _Nullable videoPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotPath);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageByURL(NSString* _Nullable operationID, NSString* _Nullable videoBaseInfo);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkCreateVideoMessageFromFullPath(NSString* _Nullable operationID, NSString* _Nullable videoFullPath, NSString* _Nullable videoType, int64_t duration, NSString* _Nullable snapshotFullPath);
FOUNDATION_EXPORT void Open_im_sdkDeleteConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID);
FOUNDATION_EXPORT void Open_im_sdkDeleteFriend(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable friendUserID);
FOUNDATION_EXPORT void Open_im_sdkDeleteMessageFromLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT void Open_im_sdkGetAllConversationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetBlackList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetConversationIDBySessionType(NSString* _Nullable sourceID, long sessionType);
FOUNDATION_EXPORT void Open_im_sdkGetConversationListSplit(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long offset, long count);
FOUNDATION_EXPORT void Open_im_sdkGetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetDesignatedFriendsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetFriendList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMemberList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, int32_t filter, int32_t offset, int32_t count);
FOUNDATION_EXPORT void Open_im_sdkGetGroupMembersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkGetGroupsInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupIDList);
FOUNDATION_EXPORT void Open_im_sdkGetHistoryMessageList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable getMessageOptions);
FOUNDATION_EXPORT void Open_im_sdkGetJoinedGroupList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT int32_t Open_im_sdkGetLoginStatus(void);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkGetLoginUser(void);
FOUNDATION_EXPORT void Open_im_sdkGetMultipleConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList);
FOUNDATION_EXPORT void Open_im_sdkGetOneConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, long sessionType, NSString* _Nullable sourceID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetRecvGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSelfUserInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendFriendApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetSendGroupApplicationList(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkGetTotalUnreadMsgCount(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
// skipped function GetUserWorker with unsupported parameter or return types
/**
* /////////////////////user/////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkGetUsersInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDList);
// skipped function InitOnce with unsupported parameter or return types
FOUNDATION_EXPORT BOOL Open_im_sdkInitSDK(id<Open_im_sdk_callbackOnConnListener> _Nullable listener, NSString* _Nullable operationID, NSString* _Nullable config);
FOUNDATION_EXPORT void Open_im_sdkInsertSingleMessageToLocalStorage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable sendID);
FOUNDATION_EXPORT void Open_im_sdkInviteUserToGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkJoinGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reqMsg);
FOUNDATION_EXPORT void Open_im_sdkKickGroupMember(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable reason, NSString* _Nullable userIDList);
FOUNDATION_EXPORT void Open_im_sdkLogin(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable token);
FOUNDATION_EXPORT void Open_im_sdkLogout(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID);
FOUNDATION_EXPORT void Open_im_sdkMarkC2CMessageAsRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userID, NSString* _Nullable msgIDList);
FOUNDATION_EXPORT void Open_im_sdkMarkGroupMessageHasRead(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkPinConversation(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, BOOL isPinned);
FOUNDATION_EXPORT void Open_im_sdkQuitGroup(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID);
FOUNDATION_EXPORT void Open_im_sdkRefuseFriendApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDHandleMsg);
FOUNDATION_EXPORT void Open_im_sdkRefuseGroupApplication(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable fromUserID, NSString* _Nullable handleMsg);
FOUNDATION_EXPORT void Open_im_sdkRemoveBlack(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable removeUserID);
FOUNDATION_EXPORT void Open_im_sdkRevokeMessage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkSdkVersion(void);
FOUNDATION_EXPORT void Open_im_sdkSendMessage(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSendMessageNotOss(id<Open_im_sdk_callbackSendMsgCallBack> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable message, NSString* _Nullable recvID, NSString* _Nullable groupID, NSString* _Nullable offlinePushInfo);
FOUNDATION_EXPORT void Open_im_sdkSetAdvancedMsgListener(id<Open_im_sdk_callbackOnAdvancedMsgListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationDraft(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationID, NSString* _Nullable draftText);
FOUNDATION_EXPORT void Open_im_sdkSetConversationListener(id<Open_im_sdk_callbackOnConversationListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetConversationRecvMessageOpt(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable conversationIDList, long opt);
FOUNDATION_EXPORT void Open_im_sdkSetFriendListener(id<Open_im_sdk_callbackOnFriendshipListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkSetFriendRemark(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userIDRemark);
FOUNDATION_EXPORT void Open_im_sdkSetGroupInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable groupInfo);
/**
* ////////////////////////group//////////////////////////////////////////
*/
FOUNDATION_EXPORT void Open_im_sdkSetGroupListener(id<Open_im_sdk_callbackOnGroupListener> _Nullable callback);
FOUNDATION_EXPORT void Open_im_sdkSetSelfInfo(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable userInfo);
FOUNDATION_EXPORT void Open_im_sdkSetUserListener(id<Open_im_sdk_callbackOnUserListener> _Nullable listener);
FOUNDATION_EXPORT void Open_im_sdkTransferGroupOwner(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable groupID, NSString* _Nullable newOwnerUserID);
FOUNDATION_EXPORT void Open_im_sdkTypingStatusUpdate(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable recvID, NSString* _Nullable msgTip);
FOUNDATION_EXPORT NSString* _Nonnull Open_im_sdkUploadImage(id<Open_im_sdk_callbackBase> _Nullable callback, NSString* _Nullable operationID, NSString* _Nullable filePath, NSString* _Nullable token, NSString* _Nullable obj);
#endif

@ -1,29 +0,0 @@
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
#include "ref.h"
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString* _Nonnull)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (NSString* _Nonnull)error;
@end
#endif

@ -1,35 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef __GO_REF_HDR__
#define __GO_REF_HDR__
#include <Foundation/Foundation.h>
// GoSeqRef is an object tagged with an integer for passing back and
// forth across the language boundary. A GoSeqRef may represent either
// an instance of a Go object, or an Objective-C object passed to Go.
// The explicit allocation of a GoSeqRef is used to pin a Go object
// when it is passed to Objective-C. The Go seq package maintains a
// reference to the Go object in a map keyed by the refnum along with
// a reference count. When the reference count reaches zero, the Go
// seq package will clear the corresponding entry in the map.
@interface GoSeqRef : NSObject {
}
@property(readonly) int32_t refnum;
@property(strong) id obj; // NULL when representing a Go object.
// new GoSeqRef object to proxy a Go object. The refnum must be
// provided from Go side.
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
- (int32_t)incNum;
@end
@protocol goSeqRefInterface
-(GoSeqRef*) _ref;
@end
#endif

@ -1,9 +0,0 @@
framework module "OpenIMCore" {
header "ref.h"
header "Open_im_sdk.objc.h"
header "Open_im_sdk_callback.objc.h"
header "Universe.objc.h"
header "OpenIMCore.h"
export *
}

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

@ -17,7 +17,7 @@ A new Flutter project.
s.dependency 'Flutter'
s.platform = :ios, '8.0'
s.vendored_frameworks = 'Framework/*.framework'
s.vendored_frameworks = 'Framework/*.xcframework'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64' }
s.swift_version = '5.0'

@ -1,7 +1,7 @@
library flutter_openim_sdk;
export 'src/enum/conversation_type.dart';
export 'src/enum/group_role.dart';
export 'src/enum/group_role_level.dart';
export 'src/enum/im_platform.dart';
export 'src/enum/listener_type.dart';
export 'src/enum/message_status.dart';
@ -27,8 +27,10 @@ export 'src/manager/im_manager.dart';
export 'src/manager/im_message_manager.dart';
export 'src/manager/im_offline_push_manager.dart';
export 'src/manager/im_signaling_manager.dart';
export 'src/manager/im_user_manager.dart';
export 'src/models/conversation_info.dart';
export 'src/models/group_info.dart';
export 'src/models/message.dart';
export 'src/models/user_info.dart';
export 'src/openim.dart';
export 'src/utils.dart';

@ -1,4 +1,4 @@
class ConversationType {
static const single_chat = 1;
static const group_chat = 2;
static const single = 1;
static const group = 2;
}

@ -1,5 +0,0 @@
class GroupRole {
static const member = 0;
static const owner = 1;
static const admin = 2;
}

@ -0,0 +1,7 @@
/// 1 ordinary member, 2 group owners, 3 administrators
/// 1, 23
class GroupRoleLevel {
static const member = 1;
static const owner = 2;
static const admin = 3;
}

@ -10,7 +10,7 @@ abstract class AdvancedMsgListener {
void recvNewMessage(Message msg);
/// Message read receipt
void recvC2CReadReceipt(List<HaveReadInfo> list);
void recvC2CReadReceipt(List<ReadReceiptInfo> list);
/// A friend withdrew a message
void recvMessageRevoked(String msgId);

@ -9,10 +9,6 @@ abstract class GroupListener {
void groupMemberDeleted(GroupMembersInfo info);
void receiveJoinGroupApplicationAdded(GroupApplicationInfo info);
void receiveJoinGroupApplicationDeleted(GroupApplicationInfo info);
void groupApplicationAdded(GroupApplicationInfo info);
void groupApplicationDeleted(GroupApplicationInfo info);

@ -1,7 +1,7 @@
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class OnAdvancedMsgListener extends AdvancedMsgListener {
Function(List<HaveReadInfo> list)? onRecvC2CReadReceipt;
Function(List<ReadReceiptInfo> list)? onRecvC2CReadReceipt;
Function(String msgId)? onRecvMessageRevoked;
Function(Message msg)? onRecvNewMessage;
@ -12,7 +12,7 @@ class OnAdvancedMsgListener extends AdvancedMsgListener {
});
@override
void recvC2CReadReceipt(List<HaveReadInfo> list) {
void recvC2CReadReceipt(List<ReadReceiptInfo> list) {
if (null != onRecvC2CReadReceipt) onRecvC2CReadReceipt!(list);
}

@ -1,28 +1,5 @@
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
///
/// OnFriendApplicationAdded
/// OnFriendApplicationAdded
///
///
/// OnFriendApplicationAccepted OnFriendAdded
/// OnFriendApplicationAccepted OnFriendAdded
///
///
/// OnFriendApplicationRejected
/// OnFriendApplicationRejected
///
///
/// OnFriendDeleted
///
///
/// OnFriendInfoChanged
///
///
/// OnBlacklistAdded
///
///
/// OnBlacklistDeleted
class OnFriendshipListener extends FriendshipListener {
Function(FriendApplicationInfo i)? onFriendApplicationAdded;
Function(FriendApplicationInfo i)? onFriendApplicationDeleted;

@ -1,35 +1,5 @@
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
///
/// OnJoinedGroupAdded
///
/// 退
/// 退 OnJoinedGroupDeleted
/// OnGroupMemberDeleted
///
///
/// OnJoinedGroupDeleted
/// OnGroupMemberDeleted
///
///
/// OnJoinedGroupAdded
/// OnGroupMemberAdded
///
///
/// OnGroupApplicationAdded
/// + OnReceiveJoinGroupApplicationAdded
///
///
/// OnJoinedGroupAdded OnGroupApplicationAccepted
/// OnGroupMemberAdded
/// OnGroupMemberAdded OnGroupApplicationAccepted
///
///
/// OnGroupApplicationRejected
/// OnGroupApplicationRejected
///
///
/// OnGroupInfoChanged
class OnGroupListener extends GroupListener {
Function(GroupApplicationInfo info)? onGroupApplicationAccepted;
Function(GroupApplicationInfo info)? onGroupApplicationAdded;
@ -41,8 +11,6 @@ class OnGroupListener extends GroupListener {
Function(GroupMembersInfo info)? onGroupMemberInfoChanged;
Function(GroupInfo info)? onJoinedGroupAdded;
Function(GroupInfo info)? onJoinedGroupDeleted;
Function(GroupApplicationInfo info)? onReceiveJoinGroupApplicationAdded;
Function(GroupApplicationInfo info)? onReceiveJoinGroupApplicationDeleted;
OnGroupListener({
this.onGroupApplicationAccepted,
@ -55,8 +23,6 @@ class OnGroupListener extends GroupListener {
this.onGroupMemberInfoChanged,
this.onJoinedGroupAdded,
this.onJoinedGroupDeleted,
this.onReceiveJoinGroupApplicationAdded,
this.onReceiveJoinGroupApplicationDeleted,
});
@override
@ -108,14 +74,4 @@ class OnGroupListener extends GroupListener {
void joinedGroupDeleted(GroupInfo info) {
onJoinedGroupDeleted?.call(info);
}
@override
void receiveJoinGroupApplicationAdded(GroupApplicationInfo info) {
onReceiveJoinGroupApplicationAdded?.call(info);
}
@override
void receiveJoinGroupApplicationDeleted(GroupApplicationInfo info) {
onReceiveJoinGroupApplicationDeleted?.call(info);
}
}

@ -1,10 +1,6 @@
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
///
///
class ConversationManager {
MethodChannel _channel;
late ConversationListener conversationListener;
@ -26,9 +22,10 @@ class ConversationManager {
.invokeMethod(
'getAllConversationList',
_buildParam({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value));
.then((value) =>
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
/// Paging to get conversation
///
@ -43,9 +40,10 @@ class ConversationManager {
_buildParam({
'offset': offset,
'count': count,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value));
.then((value) =>
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
/// Get a conversation, if it doesn't exist it will be created automatically
/// [sourceID] if it is a single chat, Its value is userID. if it is a group chat, Its value is groupID
@ -64,9 +62,10 @@ class ConversationManager {
_buildParam({
"sourceID": sourceID,
"sessionType": sessionType,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) =>
Utils.toObj(value, (map) => ConversationInfo.fromJson(map)));
/// Get conversation list by id list
///
@ -79,9 +78,10 @@ class ConversationManager {
'getMultipleConversation',
_buildParam({
"conversationIDList": conversationIDList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value));
.then((value) =>
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
/// Delete conversation by id
///
@ -89,14 +89,12 @@ class ConversationManager {
required String conversationID,
String? operationID,
}) =>
_channel
.invokeMethod(
'deleteConversation',
_buildParam({
"conversationID": conversationID,
"operationID": _checkOperationID(operationID),
}))
.then((value) => _printValue(value));
_channel.invokeMethod(
'deleteConversation',
_buildParam({
"conversationID": conversationID,
"operationID": Utils.checkOperationID(operationID),
}));
/// Set draft
/// 稿
@ -105,15 +103,13 @@ class ConversationManager {
required String draftText,
String? operationID,
}) =>
_channel
.invokeMethod(
'setConversationDraft',
_buildParam({
"conversationID": conversationID,
"draftText": draftText,
"operationID": _checkOperationID(operationID),
}))
.then((value) => _printValue(value));
_channel.invokeMethod(
'setConversationDraft',
_buildParam({
"conversationID": conversationID,
"draftText": draftText,
"operationID": Utils.checkOperationID(operationID),
}));
/// Pinned conversation
///
@ -122,18 +118,14 @@ class ConversationManager {
required bool isPinned,
String? operationID,
}) =>
_channel
.invokeMethod(
'pinConversation',
_buildParam({
"conversationID": conversationID,
"isPinned": isPinned,
"operationID": _checkOperationID(operationID),
}))
.then((value) => _printValue(value));
_channel.invokeMethod(
'pinConversation',
_buildParam({
"conversationID": conversationID,
"isPinned": isPinned,
"operationID": Utils.checkOperationID(operationID),
}));
/// Mark single chat messages as read
///
// Future<dynamic> markSingleMessageHasRead({required String userID}) =>
// _channel.invokeMethod(
// 'markSingleMessageHasRead', _buildParam({'userID': userID}));
@ -148,7 +140,7 @@ class ConversationManager {
'markGroupMessageHasRead',
_buildParam({
'groupID': groupID,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Get the total number of unread messages
@ -159,7 +151,7 @@ class ConversationManager {
_channel.invokeMethod(
'getTotalUnreadMsgCount',
_buildParam({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Query conversation id
@ -180,9 +172,9 @@ class ConversationManager {
}));
/// Message Do Not Disturb
/// [status] 1: Do not receive messages. 2: Do not notify when messages are received. 0: Normal.
/// [status] 0: Normal. 1: Do not receive messages. 2: Do not notify when messages are received.
///
/// [status] 12线线3
/// [status] 012线线
Future<dynamic> setConversationRecvMessageOpt({
required List<String> conversationIDList,
required int status,
@ -193,7 +185,7 @@ class ConversationManager {
_buildParam({
"conversationIDList": conversationIDList,
"status": status,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Message Do Not Disturb
@ -208,12 +200,12 @@ class ConversationManager {
'getConversationRecvMessageOpt',
_buildParam({
"conversationIDList": conversationIDList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _formatJson(value));
.then((value) => Utils.toListMap(value));
/// Custom sort for conversation list
///
///
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
..sort((a, b) {
if ((a.isPinned == true && b.isPinned == true) ||
@ -242,23 +234,4 @@ class ConversationManager {
param["ManagerName"] = "conversationManager";
return param;
}
static List<ConversationInfo> _toList(String? value) {
var list = _formatJson(value);
if (null == list) return <ConversationInfo>[];
return (list as List).map((e) => ConversationInfo.fromJson(e)).toList();
}
static ConversationInfo _toObj(String value) =>
ConversationInfo.fromJson(_formatJson(value));
static dynamic _formatJson(value) => jsonDecode(_printValue(value));
static String _printValue(value) {
return value;
}
static String _checkOperationID(String? obj) {
return obj ?? DateTime.now().millisecondsSinceEpoch.toString();
}
}

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
@ -27,9 +25,9 @@ class FriendshipManager {
'getFriendsInfo',
_buildParam({
"uidList": uidList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value, (v) => UserInfo.fromJson(v.cast())));
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
/// Send an friend application
///
@ -43,7 +41,7 @@ class FriendshipManager {
_buildParam({
"toUserID": uid,
"reqMsg": reason,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Get someone's request to add me as a friend
@ -54,10 +52,10 @@ class FriendshipManager {
.invokeMethod(
'getRecvFriendApplicationList',
_buildParam({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) =>
_toList(value, (v) => FriendApplicationInfo.fromJson(v.cast())));
Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
/// Get friend requests from me
///
@ -67,10 +65,10 @@ class FriendshipManager {
.invokeMethod(
'getSendFriendApplicationList',
_buildParam({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) =>
_toList(value, (v) => FriendApplicationInfo.fromJson(v.cast())));
Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
/// Find all friends including those who have been added to the blacklist
///
@ -78,9 +76,9 @@ class FriendshipManager {
.invokeMethod(
'getFriendList',
_buildParam({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value, (v) => UserInfo.fromJson(v.cast())));
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
/// Find all friends including those who have been added to the blacklist
///
@ -88,11 +86,11 @@ class FriendshipManager {
.invokeMethod(
'getFriendList',
_buildParam({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toListMap(value));
.then((value) => Utils.toListMap(value));
/// Modify friend information, only [comment] can be modified
/// Modify friend remark name
///
Future<dynamic> setFriendRemark({
required String uid,
@ -104,7 +102,7 @@ class FriendshipManager {
_buildParam({
'toUserID': uid,
'remark': remark,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Add friends to blacklist
@ -117,7 +115,7 @@ class FriendshipManager {
'addBlacklist',
_buildParam({
"uid": uid,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Find all blacklist
@ -126,9 +124,9 @@ class FriendshipManager {
.invokeMethod(
'getBlacklist',
_buildParam({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value, (v) => UserInfo.fromJson(v.cast())));
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
/// Remove from blacklist
///
@ -140,7 +138,7 @@ class FriendshipManager {
'removeBlacklist',
_buildParam({
"uid": uid,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Determine if there is a friendship by userId
@ -154,10 +152,10 @@ class FriendshipManager {
'checkFriend',
_buildParam({
'uidList': uidList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) =>
_toList(value, (v) => FriendshipInfo.fromJson(v.cast())));
Utils.toList(value, (v) => FriendshipInfo.fromJson(v)));
/// Dissolve friendship from friend list
///
@ -169,7 +167,7 @@ class FriendshipManager {
'deleteFriend',
_buildParam({
"uid": uid,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Accept application of be friend
@ -184,7 +182,7 @@ class FriendshipManager {
_buildParam({
"toUserID": uid,
"handleMsg": handleMsg,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Refuse application of be friend
@ -199,49 +197,11 @@ class FriendshipManager {
_buildParam({
"toUserID": uid,
"handleMsg": handleMsg,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
///
// Future<dynamic> forceSyncFriendApplication() {
// return _channel.invokeMethod('forceSyncFriendApplication', _buildParam({}));
// }
///
// Future<dynamic> forceSyncFriend() {
// return _channel.invokeMethod('forceSyncFriend', _buildParam({}));
// }
///
// Future<dynamic> forceSyncBlackList() {
// return _channel.invokeMethod('forceSyncBlackList', _buildParam({}));
// }
static Map _buildParam(Map param) {
param["ManagerName"] = "friendshipManager";
return param;
}
static List<T> _toList<T>(String? value, T f(Map map)) {
var list = _formatJson(value);
if (null == list) return <T>[];
return (list as List).map((e) => f(e)).toList();
}
static List<dynamic> _toListMap(String? value) {
var list = _formatJson(value);
return list;
}
// static UserInfo _toObj(String value) => UserInfo.fromJson(_formatJson(value));
static dynamic _formatJson(value) => jsonDecode(_printValue(value));
static String _printValue(value) {
return value;
}
static String _checkOperationID(String? obj) {
return obj ?? DateTime.now().millisecondsSinceEpoch.toString();
}
}

@ -1,8 +1,5 @@
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/src/listener/group_listener.dart';
import 'package:flutter_openim_sdk/src/models/group_info.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class GroupManager {
MethodChannel _channel;
@ -32,11 +29,10 @@ class GroupManager {
'gid': groupId,
'reason': reason,
'uidList': uidList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => (_formatJson(value) as List)
.map((e) => GroupInviteResult.fromJson(e))
.toList());
.then((value) =>
Utils.toList(value, (map) => GroupInviteResult.fromJson(map)));
/// Remove member from group
///
@ -53,11 +49,10 @@ class GroupManager {
'gid': groupId,
'reason': reason,
'uidList': uidList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => (_formatJson(value) as List)
.map((e) => GroupInviteResult.fromJson(e))
.toList());
.then((value) =>
Utils.toList(value, (map) => GroupInviteResult.fromJson(map)));
/// Get group member's info
///
@ -72,11 +67,10 @@ class GroupManager {
_buildParam({
'gid': groupId,
'uidList': uidList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => (_formatJson(value) as List)
.map((e) => GroupMembersInfo.fromJson(e))
.toList());
.then((value) =>
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
/// Get the list of group members
///
@ -95,15 +89,14 @@ class GroupManager {
'filter': filter,
'offset': offset,
'count': count,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => (_formatJson(value) as List)
.map((e) => GroupMembersInfo.fromJson(e))
.toList());
.then((value) =>
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
/// Get the list of group members
///
Future<dynamic> getGroupMemberListMap({
Future<List<dynamic>> getGroupMemberListMap({
required String groupId,
int filter = 0,
int offset = 0,
@ -118,9 +111,9 @@ class GroupManager {
'filter': filter,
'offset': offset,
'count': count,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => _formatJson(value));
.then((value) => Utils.toListMap(value));
/// Find all groups you have joined
///
@ -128,11 +121,9 @@ class GroupManager {
.invokeMethod(
'getJoinedGroupList',
_buildParam({
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => (_formatJson(value) as List)
.map((e) => GroupInfo.fromJson(e))
.toList());
.then((value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
/// Find all groups you have joined
///
@ -140,9 +131,9 @@ class GroupManager {
.invokeMethod(
'getJoinedGroupList',
_buildParam({
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => _formatJson(value));
.then((value) => Utils.toListMap(value));
/// Check if you are a member of the group
///
@ -151,7 +142,7 @@ class GroupManager {
String? operationID,
}) =>
getJoinedGroupList(
operationID: _checkOperationID(operationID),
operationID: Utils.checkOperationID(operationID),
).then((list) => list.where((e) => e.groupID == gid).length > 0);
/// Create a group
@ -179,9 +170,10 @@ class GroupManager {
"ex": ex,
},
'memberList': list.map((e) => e.toJson()).toList(),
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => GroupInfo.fromJson(_formatJson(value)));
.then(
(value) => Utils.toObj(value, (map) => GroupInfo.fromJson(map)));
/// Edit group information
///
@ -206,7 +198,7 @@ class GroupManager {
"faceURL": faceUrl,
"ex": ex,
},
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
/// Find group information by group id
@ -220,12 +212,10 @@ class GroupManager {
'getGroupsInfo',
_buildParam({
'gidList': gidList,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) {
List list = _formatJson(value);
return list.map((e) => GroupInfo.fromJson(e)).toList();
});
.then(
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
/// Apply to join the group
///
@ -239,7 +229,7 @@ class GroupManager {
_buildParam({
'gid': gid,
'reason': reason,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
/// Leave group
@ -252,7 +242,7 @@ class GroupManager {
'quitGroup',
_buildParam({
'gid': gid,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
/// Give group permissions to others
@ -267,7 +257,7 @@ class GroupManager {
_buildParam({
'gid': gid,
'uid': uid,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
/// As the group owner or administrator, get the list of received group members' applications to join the group.
@ -278,11 +268,10 @@ class GroupManager {
.invokeMethod(
'getRecvGroupApplicationList',
_buildParam({
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => (_formatJson(value) as List)
.map((e) => GroupApplicationInfo.fromJson(e))
.toList());
.then((value) =>
Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
/// Get the record of the group membership application issued by yourself
///
@ -292,11 +281,10 @@ class GroupManager {
.invokeMethod(
'getSendGroupApplicationList',
_buildParam({
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => (_formatJson(value) as List)
.map((e) => GroupApplicationInfo.fromJson(e))
.toList());
.then((value) =>
Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
/// Accept group application
///
@ -312,7 +300,7 @@ class GroupManager {
'gid': gid,
'uid': uid,
'handleMsg': handleMsg,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
/// Refuse group application
@ -329,41 +317,11 @@ class GroupManager {
'gid': gid,
'uid': uid,
'handleMsg': handleMsg,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
///
// Future forceSyncApplyGroupRequest() {
// return _channel.invokeMethod('forceSyncApplyGroupRequest', _buildParam({}));
// }
///
// Future forceSyncGroupRequest() {
// return _channel.invokeMethod('forceSyncGroupRequest', _buildParam({}));
// }
///
// Future forceSyncJoinedGroup() {
// return _channel.invokeMethod('forceSyncJoinedGroup', _buildParam({}));
// }
///
// Future forceSyncJoinedGroupMember() {
// return _channel.invokeMethod('forceSyncJoinedGroupMember', _buildParam({}));
// }
static Map _buildParam(Map param) {
param["ManagerName"] = "groupManager";
return param;
}
static dynamic _formatJson(value) => jsonDecode(_printValue(value));
static String _printValue(value) {
return value;
}
static String _checkOperationID(String? obj) {
return obj ?? DateTime.now().millisecondsSinceEpoch.toString();
}
}

@ -1,9 +1,7 @@
import 'dart:convert';
import 'dart:developer';
import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
import 'package:flutter_openim_sdk/src/manager/im_user_manager.dart';
class IMManager {
MethodChannel _channel;
@ -61,7 +59,7 @@ class IMManager {
dynamic data = call.arguments['data'];
switch (type) {
case 'onSelfInfoUpdated':
uInfo = UserInfo.fromJson(_formatJson(data));
uInfo = Utils.toObj(data, (map) => UserInfo.fromJson(map));
userManager.userListener.selfInfoUpdated(uInfo);
break;
}
@ -70,53 +68,52 @@ class IMManager {
dynamic data = call.arguments['data'];
switch (type) {
case 'onGroupApplicationAccepted':
final i = GroupApplicationInfo.fromJson(_formatJson(data));
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.groupListener.groupApplicationAccepted(i);
break;
case 'onGroupApplicationAdded':
final i = GroupApplicationInfo.fromJson(_formatJson(data));
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.groupListener.groupApplicationAdded(i);
break;
case 'onGroupApplicationDeleted':
final i = GroupApplicationInfo.fromJson(_formatJson(data));
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.groupListener.groupApplicationDeleted(i);
break;
case 'onGroupApplicationRejected':
final i = GroupApplicationInfo.fromJson(_formatJson(data));
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.groupListener.groupApplicationRejected(i);
break;
case 'onGroupInfoChanged':
final i = GroupInfo.fromJson(_formatJson(data));
final i = Utils.toObj(data, (map) => GroupInfo.fromJson(map));
groupManager.groupListener.groupInfoChanged(i);
break;
case 'onGroupMemberAdded':
final i = GroupMembersInfo.fromJson(_formatJson(data));
final i =
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
groupManager.groupListener.groupMemberAdded(i);
break;
case 'onGroupMemberDeleted':
final i = GroupMembersInfo.fromJson(_formatJson(data));
final i =
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
groupManager.groupListener.groupMemberDeleted(i);
break;
case 'onGroupMemberInfoChanged':
final i = GroupMembersInfo.fromJson(_formatJson(data));
final i =
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
groupManager.groupListener.groupMemberInfoChanged(i);
break;
case 'onJoinedGroupAdded':
final i = GroupInfo.fromJson(_formatJson(data));
final i = Utils.toObj(data, (map) => GroupInfo.fromJson(map));
groupManager.groupListener.joinedGroupAdded(i);
break;
case 'onJoinedGroupDeleted':
final i = GroupInfo.fromJson(_formatJson(data));
final i = Utils.toObj(data, (map) => GroupInfo.fromJson(map));
groupManager.groupListener.joinedGroupDeleted(i);
break;
case 'onReceiveJoinGroupApplicationAdded':
final i = GroupApplicationInfo.fromJson(_formatJson(data));
groupManager.groupListener.receiveJoinGroupApplicationAdded(i);
break;
case 'onReceiveJoinGroupApplicationDeleted':
final i = GroupApplicationInfo.fromJson(_formatJson(data));
groupManager.groupListener.receiveJoinGroupApplicationDeleted(i);
break;
}
} else if (call.method == ListenerType.advancedMsgListener) {
var type = call.arguments['type'];
@ -124,7 +121,7 @@ class IMManager {
switch (type) {
case 'onRecvNewMessage':
var value = call.arguments['data']['newMessage'];
var msg = Message.fromJson(_formatJson(value));
final msg = Utils.toObj(value, (map) => Message.fromJson(map));
messageManager.advancedMsgListener.recvNewMessage(msg);
break;
case 'onRecvMessageRevoked':
@ -133,8 +130,8 @@ class IMManager {
break;
case 'onRecvC2CReadReceipt':
var value = call.arguments['data']['haveReadMessage'];
var l = _formatJson(value) as List;
var list = l.map((e) => HaveReadInfo.fromJson(e)).toList();
var list =
Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
messageManager.advancedMsgListener.recvC2CReadReceipt(list);
break;
}
@ -166,21 +163,13 @@ class IMManager {
conversationManager.conversationListener.syncServerFailed();
break;
case 'onNewConversation':
List<ConversationInfo> list = List.empty(growable: true);
if (null != data) {
list = (_formatJson(data) as List)
.map((e) => ConversationInfo.fromJson(e))
.toList();
}
var list =
Utils.toList(data, (map) => ConversationInfo.fromJson(map));
conversationManager.conversationListener.newConversation(list);
break;
case 'onConversationChanged':
List<ConversationInfo> list = List.empty(growable: true);
if (null != data) {
list = (_formatJson(data) as List)
.map((e) => ConversationInfo.fromJson(e))
.toList();
}
var list =
Utils.toList(data, (map) => ConversationInfo.fromJson(map));
conversationManager.conversationListener
.conversationChanged(list);
break;
@ -195,46 +184,50 @@ class IMManager {
switch (type) {
case 'onBlacklistAdded':
final u = BlacklistInfo.fromJson(_formatJson(data));
final u = Utils.toObj(data, (map) => BlacklistInfo.fromJson(map));
friendshipManager.friendshipListener.blacklistAdded(u);
break;
case 'onBlacklistDeleted':
final u = BlacklistInfo.fromJson(_formatJson(data));
final u = Utils.toObj(data, (map) => BlacklistInfo.fromJson(map));
friendshipManager.friendshipListener.blacklistDeleted(u);
break;
case 'onFriendApplicationAccepted':
final u = FriendApplicationInfo.fromJson(_formatJson(data));
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.friendshipListener.friendApplicationAccepted(u);
break;
case 'onFriendApplicationAdded':
final u = FriendApplicationInfo.fromJson(_formatJson(data));
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.friendshipListener.friendApplicationAdded(u);
break;
case 'onFriendApplicationDeleted':
final u = FriendApplicationInfo.fromJson(_formatJson(data));
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.friendshipListener.friendApplicationDeleted(u);
break;
case 'onFriendApplicationListRejected':
final u = FriendApplicationInfo.fromJson(_formatJson(data));
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.friendshipListener.friendApplicationRejected(u);
break;
case 'onFriendInfoChanged':
final u = FriendInfo.fromJson(_formatJson(data));
final u = Utils.toObj(data, (map) => FriendInfo.fromJson(map));
friendshipManager.friendshipListener.friendInfoChanged(u);
break;
case 'onFriendAdded':
final u = FriendInfo.fromJson(_formatJson(data));
final u = Utils.toObj(data, (map) => FriendInfo.fromJson(map));
friendshipManager.friendshipListener.friendAdded(u);
break;
case 'onFriendDeleted':
final u = FriendInfo.fromJson(_formatJson(data));
final u = Utils.toObj(data, (map) => FriendInfo.fromJson(map));
friendshipManager.friendshipListener.friendDeleted(u);
break;
}
}
} catch (err) {
print(
"回调失败了,数据类型异常$err ${call.method} ${call.arguments['type']} ${call.arguments['data']}");
"回调失败了。$err ${call.method} ${call.arguments['type']} ${call.arguments['data']}");
}
return Future.value(null);
});
@ -242,14 +235,16 @@ class IMManager {
/// Initialize SDK
///
/// [platform] Refer to [IMPlatform]
/// [apiAddr] Api server ip address
/// [wsAddr] WebSocket ip address
/// [dataDir] Data storage directory
/// [platform] platform number [IMPlatform]
/// [apiAddr] api server ip address
/// [wsAddr] webSocket ip address
/// [dataDir] data storage directory
///
/// SDK
/// [platform] [IMPlatform]
/// [apiAddr] SDK api地址
/// [wsAddr] SDK websocket地址
///
/// [platform] [IMPlatform]
/// [apiAddr] SDK api地址
/// [wsAddr] SDK websocket地址
/// [dataDir] SDK数据库存储目录
Future<dynamic> initSDK({
required int platform,
@ -272,7 +267,7 @@ class IMManager {
"data_dir": dataDir,
"log_level": logLevel,
"object_storage": objectStorage,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
},
));
}
@ -294,7 +289,7 @@ class IMManager {
_buildParam({
'uid': uid,
'token': token,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}),
);
this.isLogined = true;
@ -309,7 +304,7 @@ class IMManager {
var value = await _channel.invokeMethod(
'logout',
_buildParam({
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
this.isLogined = false;
return value;
@ -331,14 +326,4 @@ class IMManager {
param["ManagerName"] = "imManager";
return param;
}
static dynamic _formatJson(value) => jsonDecode(_printValue(value));
static String _printValue(value) {
return value;
}
static String _checkOperationID(String? obj) {
return obj ?? DateTime.now().millisecondsSinceEpoch.toString();
}
}

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
@ -35,22 +33,24 @@ class MessageManager {
///
/// [userID]id
/// [groupID]id
Future<dynamic> sendMessage({
Future<Message> sendMessage({
required Message message,
String? userID,
String? groupID,
OfflinePushInfo? offlinePushInfo,
String? operationID,
}) =>
_channel.invokeMethod(
'sendMessage',
_buildParam({
'message': message.toJson(),
'userID': userID ?? '',
'groupID': groupID ?? '',
'offlinePushInfo': offlinePushInfo?.toJson(),
'operationID': _checkOperationID(operationID),
})) /*.then((value) => _toObj(value))*/;
_channel
.invokeMethod(
'sendMessage',
_buildParam({
'message': message.toJson(),
'userID': userID ?? '',
'groupID': groupID ?? '',
'offlinePushInfo': offlinePushInfo?.toJson() ?? {},
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Find all history message
///
@ -71,9 +71,9 @@ class MessageManager {
'groupID': groupID ?? '',
'startClientMsgID': startMsg?.clientMsgID ?? '',
'count': count ?? 10,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value));
.then((value) => Utils.toList(value, (map) => Message.fromJson(map)));
/// Revoke the sent information
///
@ -85,7 +85,7 @@ class MessageManager {
'revokeMessage',
_buildParam(message.toJson()
..addAll({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
})));
/// Delete message
@ -98,7 +98,7 @@ class MessageManager {
'deleteMessageFromLocalStorage',
_buildParam(message.toJson()
..addAll({
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
})));
///
@ -119,7 +119,7 @@ class MessageManager {
"message": message?.toJson(),
"receiverID": receiverID,
"senderID": senderID,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Query the message according to the message id
@ -142,7 +142,7 @@ class MessageManager {
_buildParam({
"messageIDList": messageIDList,
"userID": userID,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Typing
@ -157,7 +157,7 @@ class MessageManager {
_buildParam({
"msgTip": msgTip,
"userID": userID,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Create text message
@ -171,9 +171,9 @@ class MessageManager {
'createTextMessage',
_buildParam({
'text': text,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create @ message
/// @
@ -188,10 +188,10 @@ class MessageManager {
_buildParam({
'text': text,
'atUserList': atUidList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}),
)
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create picture message
///
@ -204,10 +204,10 @@ class MessageManager {
'createImageMessage',
_buildParam({
'imagePath': imagePath,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}),
)
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create picture message
///
@ -220,10 +220,10 @@ class MessageManager {
'createImageMessageFromFullPath',
_buildParam({
'imagePath': imagePath,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}),
)
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create sound message
///
@ -238,10 +238,10 @@ class MessageManager {
_buildParam({
'soundPath': soundPath,
"duration": duration,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}),
)
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create sound message
///
@ -256,10 +256,10 @@ class MessageManager {
_buildParam({
'soundPath': soundPath,
"duration": duration,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}),
)
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create video message
///
@ -278,9 +278,9 @@ class MessageManager {
'videoType': videoType,
'duration': duration,
'snapshotPath': snapshotPath,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create video message
///
@ -299,9 +299,9 @@ class MessageManager {
'videoType': videoType,
'duration': duration,
'snapshotPath': snapshotPath,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create file message
///
@ -316,9 +316,9 @@ class MessageManager {
_buildParam({
'filePath': filePath,
'fileName': fileName,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
}
/// Create file message
@ -334,9 +334,9 @@ class MessageManager {
_buildParam({
'filePath': filePath,
'fileName': fileName,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create merger message
///
@ -353,9 +353,9 @@ class MessageManager {
'messageList': messageList.map((e) => e.toJson()).toList(),
'title': title,
'summaryList': summaryList,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create forward message
///
@ -368,9 +368,9 @@ class MessageManager {
'createForwardMessage',
_buildParam({
'message': message.toJson(),
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
}
/// Create location message
@ -388,9 +388,9 @@ class MessageManager {
'latitude': latitude,
'longitude': longitude,
'description': description,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create custom message
///
@ -407,9 +407,9 @@ class MessageManager {
'data': data,
'extension': extension,
'description': description,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create quote message
///
@ -424,9 +424,9 @@ class MessageManager {
_buildParam({
'quoteText': text,
'quoteMessage': quoteMsg.toJson(),
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Create card message
///
@ -439,9 +439,9 @@ class MessageManager {
'createCardMessage',
_buildParam({
'cardMessage': data,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => _toObj(value));
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
/// Clear all c2c history message
///
@ -453,7 +453,7 @@ class MessageManager {
'clearC2CHistoryMessage',
_buildParam({
"userID": uid,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
/// Clear all group history
@ -466,31 +466,11 @@ class MessageManager {
'clearGroupHistoryMessage',
_buildParam({
"groupID": gid,
"operationID": _checkOperationID(operationID),
"operationID": Utils.checkOperationID(operationID),
}));
///
// void forceSyncMsg() {
// _channel.invokeMethod('forceSyncMsg', _buildParam({}));
// }
static Map _buildParam(Map param) {
param["ManagerName"] = "messageManager";
return param;
}
static List<Message> _toList(String value) =>
(_formatJson(value) as List).map((e) => Message.fromJson(e)).toList();
static Message _toObj(String value) => Message.fromJson(_formatJson(value));
static dynamic _formatJson(value) => jsonDecode(_printValue(value));
static String _printValue(value) {
return value;
}
static String _checkOperationID(String? obj) {
return obj ?? DateTime.now().millisecondsSinceEpoch.toString();
}
}

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
@ -27,9 +25,9 @@ class UserManager {
'getUsersInfo',
_buildParam({
'uidList': uidList,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => _toList(value, (v) => UserInfo.fromJson(v.cast())));
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
/// Get the information of the currently logged in user
///
@ -40,9 +38,9 @@ class UserManager {
.invokeMethod(
'getSelfUserInfo',
_buildParam({
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => UserInfo.fromJson(_formatJson(value)));
.then((value) => Utils.toObj(value, (map) => UserInfo.fromJson(map)));
/// Modify current user info
///
@ -52,7 +50,7 @@ class UserManager {
int? gender,
int? appMangerLevel,
String? phoneNumber,
String? birth,
int? birth,
String? email,
String? ex,
String? operationID,
@ -69,27 +67,11 @@ class UserManager {
'birth': birth,
'email': email,
'ex': ex,
'operationID': _checkOperationID(operationID),
'operationID': Utils.checkOperationID(operationID),
}));
static Map _buildParam(Map param) {
param["ManagerName"] = "userManager";
return param;
}
static List<T> _toList<T>(String? value, T f(Map map)) {
var list = _formatJson(value);
if (null == list) return <T>[];
return (list as List).map((e) => f(e)).toList();
}
static dynamic _formatJson(value) => jsonDecode(_printValue(value));
static String _printValue(value) {
return value;
}
static String _checkOperationID(String? obj) {
return obj ?? DateTime.now().millisecondsSinceEpoch.toString();
}
}

@ -38,7 +38,6 @@ class ConversationInfo {
ConversationInfo.fromJson(Map<String, dynamic> json)
: conversationID = json['conversationID'] {
// conversationID = json['conversationID'];
conversationType = json['conversationType'];
userID = json['userID'];
groupID = json['groupID'];
@ -46,8 +45,6 @@ class ConversationInfo {
faceURL = json['faceURL'];
recvMsgOpt = json['recvMsgOpt'];
unreadCount = json['unreadCount'];
// latestMsg = json['latestMsg'];
// if (null != json['latestMsg']) {
try {
if (json['latestMsg'] is String) {
latestMsg = Message.fromJson(jsonDecode(json['latestMsg']));
@ -55,9 +52,6 @@ class ConversationInfo {
latestMsg = Message.fromJson(json['latestMsg']);
}
} catch (e) {}
// }
latestMsgSendTime = json['latestMsgSendTime'];
draftText = json['draftText'];
draftTextTime = json['draftTextTime'];
@ -65,7 +59,7 @@ class ConversationInfo {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['conversationID'] = this.conversationID;
data['conversationType'] = this.conversationType;
data['userID'] = this.userID;
@ -82,10 +76,9 @@ class ConversationInfo {
return data;
}
bool get isSingleChat => conversationType == ConversationType.single_chat;
bool get isGroupChat => conversationType == ConversationType.group_chat;
bool get isSingleChat => conversationType == ConversationType.single;
bool get isGroupChat => conversationType == ConversationType.group;
@override
bool operator ==(Object other) =>

@ -43,7 +43,7 @@ class GroupInfo {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['groupID'] = this.groupID;
data['groupName'] = this.groupName;
data['notification'] = this.notification;
@ -96,7 +96,7 @@ class GroupMembersInfo {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['groupID'] = this.groupID;
data['userID'] = this.userID;
data['roleLevel'] = this.roleLevel;
@ -125,7 +125,7 @@ class GroupMemberRole {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['userID'] = this.userID;
data['roleLevel'] = this.roleLevel;
return data;
@ -148,7 +148,10 @@ class GroupApplicationInfo {
String? nickname;
String? userFaceURL;
int? gender;
int? handleResult; //REFUSE = -1, AGREE = 1
/// REFUSE = -1, AGREE = 1
/// -11
int? handleResult;
String? reqMsg;
String? handledMsg;
int? reqTime;
@ -246,59 +249,9 @@ class GroupInviteResult {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['userID'] = this.userID;
data['result'] = this.result;
return data;
}
}
// class GroupMembersList {
// int? nextSeq;
// List<GroupMembersInfo>? data;
//
// GroupMembersList({this.nextSeq, this.data});
//
// GroupMembersList.fromJson(Map<String, dynamic> json) {
// nextSeq = json['nextSeq'];
// if (json['data'] is List) {
// data = (json['data'] as List)
// .map((e) => GroupMembersInfo.fromJson(e))
// .toList();
// }
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = new Map<String, dynamic>();
// data['nextSeq'] = this.nextSeq;
// if (this.data != null) {
// data['data'] = this.data!.map((v) => v.toJson()).toList();
// }
// return data;
// }
// }
//
// class GroupApplicationList {
// int? count;
// List<GroupApplicationInfo>? user;
//
// GroupApplicationList({this.count, this.user});
//
// GroupApplicationList.fromJson(Map<String, dynamic> json) {
// count = json['count'];
// if (json['user'] is List) {
// user = (json['user'] as List)
// .map((e) => GroupApplicationInfo.fromJson(e))
// .toList();
// }
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = new Map<String, dynamic>();
// data['count'] = this.count;
// if (this.user != null) {
// data['user'] = this.user!.map((v) => v.toJson()).toList();
// }
// return data;
// }
// }

@ -71,8 +71,7 @@ class Message {
this.notificationElem,
});
Message.fromJson(
Map<String, dynamic> json) /* : clientMsgID = json['clientMsgID']*/ {
Message.fromJson(Map<String, dynamic> json) {
clientMsgID = json['clientMsgID'];
serverMsgID = json['serverMsgID'];
createTime = json['createTime'];
@ -127,7 +126,7 @@ class Message {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['clientMsgID'] = this.clientMsgID;
data['serverMsgID'] = this.serverMsgID;
data['createTime'] = this.createTime;
@ -171,6 +170,41 @@ class Message {
@override
int get hashCode => clientMsgID.hashCode;
void update(Message message) {
if (clientMsgID != message.clientMsgID) return;
// clientMsgID = message.clientMsgID;
serverMsgID = message.serverMsgID;
createTime = message.createTime;
sendTime = message.sendTime;
sendID = message.sendID;
recvID = message.recvID;
msgFrom = message.msgFrom;
contentType = message.contentType;
platformID = message.platformID;
senderNickname = message.senderNickname;
senderFaceUrl = message.senderFaceUrl;
groupID = message.groupID;
content = message.content;
seq = message.seq;
isRead = message.isRead;
status = message.status;
offlinePush = message.offlinePush;
attachedInfo = message.attachedInfo;
ex = message.ex;
ext = message.ext;
sessionType = message.sessionType;
pictureElem = message.pictureElem;
soundElem = message.soundElem;
videoElem = message.videoElem;
fileElem = message.fileElem;
atElem = message.atElem;
locationElem = message.locationElem;
customElem = message.customElem;
quoteElem = message.quoteElem;
mergeElem = message.mergeElem;
notificationElem = message.notificationElem;
}
}
class PictureElem {
@ -199,7 +233,7 @@ class PictureElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['sourcePath'] = this.sourcePath;
if (this.sourcePicture != null) {
data['sourcePicture'] = this.sourcePicture?.toJson();
@ -235,7 +269,7 @@ class PictureInfo {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['uuid'] = this.uuid;
data['type'] = this.type;
data['size'] = this.size;
@ -269,7 +303,7 @@ class SoundElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['uuid'] = this.uuid;
data['soundPath'] = this.soundPath;
data['sourceUrl'] = this.sourceUrl;
@ -323,7 +357,7 @@ class VideoElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['videoPath'] = this.videoPath;
data['videoUUID'] = this.videoUUID;
data['videoUrl'] = this.videoUrl;
@ -359,7 +393,7 @@ class FileElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['filePath'] = this.filePath;
data['uuid'] = this.uuid;
data['sourceUrl'] = this.sourceUrl;
@ -385,7 +419,7 @@ class AtElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['text'] = this.text;
data['atUserList'] = this.atUserList;
data['isAtSelf'] = this.isAtSelf;
@ -416,7 +450,7 @@ class LocationElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['description'] = this.description;
data['longitude'] = this.longitude;
data['latitude'] = this.latitude;
@ -438,7 +472,7 @@ class CustomElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['data'] = this.data;
data['extension'] = this.extension;
data['description'] = this.description;
@ -460,7 +494,7 @@ class QuoteElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['text'] = this.text;
data['quoteMessage'] = this.quoteMessage?.toJson();
return data;
@ -487,7 +521,7 @@ class MergeElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['title'] = this.title;
data['abstractList'] = this.abstractList;
data['multiMessage'] = this.multiMessage?.map((e) => e.toJson()).toList();
@ -507,14 +541,14 @@ class NotificationElem {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['detail'] = this.detail;
data['defaultTips'] = this.defaultTips;
return data;
}
}
class HaveReadInfo {
class ReadReceiptInfo {
String? uid;
List<String>? msgIDList;
int? readTime;
@ -522,7 +556,7 @@ class HaveReadInfo {
int? contentType;
int? sessionType;
HaveReadInfo(
ReadReceiptInfo(
{this.uid,
this.msgIDList,
this.readTime,
@ -530,7 +564,7 @@ class HaveReadInfo {
this.contentType,
this.sessionType});
HaveReadInfo.fromJson(Map<String, dynamic> json) {
ReadReceiptInfo.fromJson(Map<String, dynamic> json) {
uid = json['uid'];
if (json['msgIDList'] is List) {
msgIDList = (json['msgIDList'] as List).map((e) => '$e').toList();
@ -542,7 +576,7 @@ class HaveReadInfo {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['uid'] = this.uid;
data['msgIDList'] = this.msgIDList;
data['readTime'] = this.readTime;
@ -572,7 +606,7 @@ class OfflinePushInfo {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final data = Map<String, dynamic>();
data['title'] = this.title;
data['desc'] = this.desc;
data['ex'] = this.ex;

@ -0,0 +1,27 @@
import 'dart:convert';
class Utils {
static List<T> toList<T>(String? value, T f(Map<String, dynamic> map)) {
var list = _formatJson(value);
if (null == list) return <T>[];
return (list as List).map((e) => f(e)).toList();
}
static T toObj<T>(String value, T f(Map<String, dynamic> map)) =>
f(_formatJson(value));
static List<dynamic> toListMap(String? value) => _formatJson(value) ?? [];
static dynamic _formatJson(String? value) {
if (null == value) return null;
return jsonDecode(_printValue(value));
}
static String _printValue(value) {
return value;
}
static String checkOperationID(String? obj) {
return obj ?? DateTime.now().millisecondsSinceEpoch.toString();
}
}

@ -1,41 +1,5 @@
import 'package:flutter_test/flutter_test.dart';
void main() {
/* const MethodChannel channel = MethodChannel('flutter_openim_sdk');
TestWidgetsFlutterBinding.ensureInitialized();
setUp(() {
channel.setMockMethodCallHandler((MethodCall methodCall) async {
return '42';
});
});
tearDown(() {
channel.setMockMethodCallHandler(null);
});
test('getPlatformVersion', () async {});*/
// Message m1 = new Message(clientMsgID: '1', content: 'c1');
// Message m2 = new Message(clientMsgID: '2', content: 'c2');
// Message m3 = new Message(clientMsgID: '3', content: 'c3');
// Message m4 = new Message(clientMsgID: '3', content: 'c4');
// List list = List.of([m1, m2, m3]);
//
// print(list.contains(m4));
// print(m1 == m4);
// print(m2 == m4);
// print(m3 == m4);
// var input = "1234 @abc @bbc @hha 开什么玩笑";
// RegExp exp = new RegExp(r"(@\w+) ");
// final ms = exp.allMatches(input);
// for (Match m in ms) {
// String match = m.group(0)??'';
// print('====$match ${m.start} ${m.end}');
// }
// DateTime now = DateTime.now();
// print('${now.millisecond}');
// print('${now.microsecondsSinceEpoch}');
// print('${now.millisecondsSinceEpoch}');
}

Loading…
Cancel
Save