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

# add(_:toContainerWithIdentifier:)

Adds the specified contact to the contact store.

## Declaration

```swift
func add(_ contact: CNMutableContact, toContainerWithIdentifier identifier: String?)
```

## Parameters

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

## Discussion

Discussion This method overrides any previously made deletion requests for the contact. The new contact may be modified by executing the save request.

## See Also

### Saving contact changes

- [update(_:)](contacts/cnsaverequest/update(_:)-3gaig.md)
- [delete(_:)](contacts/cnsaverequest/delete(_:)-8m1tc.md)
