Browse SDKs · iOS
SDKsiOS

Leave a group

Leave a specified OpenIM group on iOS.

Copy
[[OIMManager manager] quitGroup:groupID
    onSuccess:^(NSString * _Nullable data) { [self closeGroupPage]; }
    onFailure:^(NSInteger code, NSString *message) {
        [self showErrorCode:code message:message];
    }];

Regular members and administrators can leave a group. The owner must transfer ownership first.

A successful callback means that the leave request has completed. onJoinedGroupDeleted: may subsequently remove the group by groupID. For the complete delegate, see Groups overview.