---
title: "add(_:toContainerWithIdentifier:)"
framework: contacts
role: symbol
role_heading: Instance Method
path: "contacts/cnsaverequest/add(_:tocontainerwithidentifier:)-4ikaa"
---

# add(_:toContainerWithIdentifier:)

Adds a group to the contact store.

## Declaration

```swift
func add(_ group: CNMutableGroup, toContainerWithIdentifier identifier: String?)
```

## Parameters

- `group`: The group to add.
- `identifier`: The identifier of the container to add the new group. To add the new group to the default container, set identifier to nil.

## Discussion

Discussion This method overrides any previously made delete request for the group.

## See Also

### Saving group changes

- [update(_:)](contacts/cnsaverequest/update(_:)-8h6f6.md)
- [delete(_:)](contacts/cnsaverequest/delete(_:)-29lsm.md)
- [addMember(_:to:)](contacts/cnsaverequest/addmember(_:to:).md)
- [removeMember(_:from:)](contacts/cnsaverequest/removemember(_:from:).md)
