<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Contacts",
  "identifier" : "/documentation/Contacts/CNSaveRequest/add(_:toContainerWithIdentifier:)-4ikaa",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Contacts"
    ],
    "preciseIdentifier" : "c:objc(cs)CNSaveRequest(im)addGroup:toContainerWithIdentifier:"
  },
  "title" : "add(_:toContainerWithIdentifier:)"
}
-->

# add(_:toContainerWithIdentifier:)

Adds a group to the contact store.

```
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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)