> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-angular-v5-docs-update.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update A Group

> Update A Group — CometChat documentation.

## Update Group

*In other words, as a group owner, how can I update the group details?*

You can update the existing details of the group using the `updateGroup()` method.

<Tabs>
  <Tab title="Swift">
    ```swift theme={null}
    let GUID = "GUID";
    let groupName = "Hello Group!";
    let groupType: CometChat.groupType = .public;

    let groupTobeUpdated = Group(guid: GUID, name: groupName, groupType: groupType, password: nil)

    CometChat.updateGroup(group: groupTobeUpdated, onSuccess: { (group) in

      print("Groups details updated successfully. " + group.stringValue())

    }) { (error) in

       print("Group details update failed with error: " + error!.errorDescription);
    }
    ```
  </Tab>

  <Tab title="Objective C">
    ```objc theme={null}
    NSString *guid = @"cometchat-guid-101";
    NSString *name = @"TestGroup1";
    NSString *password = nil ; // mandatory in case of password protected group type
    NSInteger limit = 30;

    Group *groupToBeUpdated = [[Group alloc]initWithGuid:guid name:name groupType:groupTypePublic password:password];

    [CometChat updateGroupWithGroup:groupToBeUpdated onSuccess:^(Group * group) {
        
        NSLog(@"Groups details updated successfully. %@",[group stringValue]);
        
    } onError:^(CometChatException * error) {
        
        NSLog(@"Group details update failed with error: %@",[error errorDescription]);
    }];
    ```
  </Tab>
</Tabs>

This method takes an instance of the `Group` class as a parameter that should contain the data that you wish to update.

| Parameter | Description                  |
| --------- | ---------------------------- |
| group     | an instance of class `Group` |

After a successful update of the group, you will receive an instance of the `Group` class containing update information of the group.

<Note>
  There is no real-time event listener available to receive updated group details when the `updateGroup()` method is called. To get the latest group information, you need to fetch the group details again using the appropriate method.
</Note>
