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

# addSubgroup(_:)

Adds a subgroup to another group.

```
func addSubgroup(_ group: ABGroup!) -> Bool
```

## Parameters

`group`

The group to add as a subgroup.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if successful; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

If the `group` argument is already part of the receiver, this method does nothing and returns <doc://com.apple.documentation/documentation/Swift/false>. If adding the group would create a recursion, this method also does nothing and returns <doc://com.apple.documentation/documentation/Swift/false>. (For example, if the group Animal Lovers is in Dog Lovers, and you add Dog Lovers to Animal Lovers, that would create a recursion, which this method won’t allow.) If the `group` argument is `nil`, this method raises an exception.

---

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)