<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Contacts",
  "identifier" : "/documentation/Contacts/CNSaveRequest/addSubgroup(_:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Contacts"
    ],
    "preciseIdentifier" : "c:objc(cs)CNSaveRequest(im)addSubgroup:toGroup:"
  },
  "title" : "addSubgroup(_:to:)"
}
-->

# addSubgroup(_:to:)

Add the specified group to a parent group.

```
func addSubgroup(_ subgroup: CNGroup, to group: CNGroup)
```

## Parameters

`subgroup`

The subgroup to add.

`group`

The parent group in which to add `subgroup`.

## Discussion

If you previously tried to remove `subgroup` from `group` in the same save request, calling this method undoes that removal. The last change you make is the one that takes effect.

---

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)