SDKsiOSEnterprise
Remove conversations from groups
Remove conversation-group relationships with Open_im_sdkRemoveConversationsFromGroups.
Use Open_im_sdkRemoveConversationsFromGroups to remove conversations from one or more conversation groups. This operation only removes relationships; it does not delete conversations or clear messages.
NSData *conversationData =
[NSJSONSerialization dataWithJSONObject:@[conversationID] options:0 error:nil];
NSString *conversationIDsJSON =
[[NSString alloc] initWithData:conversationData encoding:NSUTF8StringEncoding];
NSData *groupData =
[NSJSONSerialization dataWithJSONObject:@[conversationGroupID] options:0 error:nil];
NSString *groupIDsJSON =
[[NSString alloc] initWithData:groupData encoding:NSUTF8StringEncoding];Pass your callback, conversationIDsJSON, and groupIDsJSON to Open_im_sdkRemoveConversationsFromGroups. Both arrays are required.
Result
A successful callback means that the relationship-removal request has completed. It does not return updated group objects. The related incremental update is onConversationGroupMemberDeleted:. For the complete handler, see Conversation groups overview.
Was this page helpful?