Browse SDKs · iOS
SDKsiOS

Remove group members

Remove members from an iOS group.

Copy

Provide groupID, a removal reason, and an array of user IDs. This selector cannot remove the group owner. A successful callback means that the request has completed. Reconcile the member list through onGroupMemberDeleted: or a new query.

[[OIMManager manager] kickGroupMember:groupID
  reason:@"Removed from the project discussion"
  usersID:@[targetUserID]
  onSuccess:^(NSArray<OIMGroupInviteResult *> *results) {
    [self handleKickResults:results];
  }
  onFailure:^(NSInteger code, NSString *message) {
    [self showErrorCode:code message:message];
  }];