Delete a Group

Learn how to delete a group.

Delete a Group

To delete a group you need to use the deleteGroup() method. The user must be an Admin of the group they are trying to delete.

let GUID = "GUID";

CometChat.deleteGroup(GUID: GUID, onSuccess: { (response) in

  print("Group deleted successfully.")

}) { (error) in

  print("Group delete failed with error: " + error!.errorDescription);
NSString *guid = @"SUPERGROUP01";

[CometChat deleteGroupWithGUID:guid onSuccess:^(NSString * response) {
    NSLog(@"Group deleted successfully.");
} onError:^(CometChatException * error) {
    NSLog(@"Group deletion failed with error: %@",[error errorDescription]);

The deleteGroup() method takes the following parameters:




The GUID of the group you would like to delete

Did this page help you?