SDKsiOSEnterprise
Delete a conversation group
Delete a conversation group with Open_im_sdkDeleteConversationGroup.
Invoke Open_im_sdkDeleteConversationGroup to delete a specified conversation group and its member associations. This operation only removes the group categorization; it does not delete any underlying conversations or chat messages:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationGroupID | NSString * | Yes | Target conversation group ID to delete. |
Code example
#import <OpenIMSDK/CallbackProxy.h>
@import OpenIMCore;
CallbackProxy *callback = [[CallbackProxy alloc]
initWithOnSuccess:^(NSString * _Nullable data) {
[self removeConversationGroupByID:@"group_work_101"];
}
onFailure:^(NSInteger code, NSString * _Nullable message) {
NSLog(@"DeleteConversationGroup failed: %ld %@", (long)code, message);
}];
Open_im_sdkDeleteConversationGroup(callback, @"group_work_101");Return value
The onSuccess callback returns confirmation when the conversation group is successfully deleted.
State changes after the call
- Local state removal: The client removes the group record keyed by
conversationGroupIDfrom local storage and group navigation interfaces. - Event notification: Other connected client sessions receive notification through the
onConversationGroupDeleted:listener callback. - Data preservation: Deleting a group does not affect conversations or historical chat history. For listener lifecycle details, refer to Conversation groups overview.
Was this page helpful?