Browse SDKs · iOS
Platform
SDKsiOS

Dismiss a group

Dismiss a specified OpenIM group as its owner on iOS.

Copy

Invoke dismissGroup:onSuccess:onFailure: to permanently dissolve a specified group (only the group owner has permission to perform this action):

Parameters

ParameterTypeRequiredDescription
groupIDNSString *YesTarget group ID to dismiss. Only the group owner has permission.

Code example

[[OIMManager manager] dismissGroup:groupID
    onSuccess:^(NSString * _Nullable data) {
        NSLog(@"dismissGroup success");
    }
    onFailure:^(NSInteger code, NSString *message) {
        NSLog(@"dismissGroup failed: %ld %@", (long)code, message);
    }];

Return value

The onSuccess callback returns confirmation when the server completes group dissolution.

State changes after the call

  1. Entity dissolution: Dissolving a group permanently destroys the group entity on the server, which is fundamentally distinct from locally hiding or deleting a conversation entry.
  2. Event notification: All members of the group across devices receive the onGroupDismissed: listener callback, removing the group row and disabling message composition.
  3. Re-query calibration: For group listener lifecycle details, refer to Groups overview.