---
title: "ABCopyArrayOfAllGroups(_:)"
framework: addressbook
role: symbol
role_heading: Function
path: "addressbook/abcopyarrayofallgroups(_:)"
---

# ABCopyArrayOfAllGroups(_:)

Returns an array of all the groups in the Address Book database.

## Declaration

```swift
func ABCopyArrayOfAllGroups(_ addressBook: ABAddressBookRef!) -> Unmanaged<CFArray>!
```

## Parameters

- `addressBook`: The address book for the logged-in user.

## Return Value

Return Value An array of ABGroup objects representing all the groups in the Address Book database. If the database doesn’t contain any groups, the function returns an empty array. You are responsible for releasing this object.

## See Also

### Groups

- [ABGroupAddGroup(_:_:)](addressbook/abgroupaddgroup(_:_:).md)
- [ABGroupAddMember(_:_:_:)](addressbook/abgroupaddmember(_:_:).md)
- [ABGroupCopyArrayOfAllMembers(_:)](addressbook/abgroupcopyarrayofallmembers(_:).md)
- [ABGroupCopyArrayOfAllSubgroups(_:)](addressbook/abgroupcopyarrayofallsubgroups(_:).md)
- [ABGroupCopyDistributionIdentifier(_:_:_:)](addressbook/abgroupcopydistributionidentifier(_:_:_:).md)
- [ABGroupCopyParentGroups(_:)](addressbook/abgroupcopyparentgroups(_:).md)
- [ABGroupCreate()](addressbook/abgroupcreate().md)
- [ABGroupCreateSearchElement(_:_:_:_:_:)](addressbook/abgroupcreatesearchelement(_:_:_:_:_:).md)
- [ABGroupRemoveGroup(_:_:)](addressbook/abgroupremovegroup(_:_:).md)
- [ABGroupRemoveMember(_:_:_:)](addressbook/abgroupremovemember(_:_:).md)
- [ABGroupSetDistributionIdentifier(_:_:_:_:)](addressbook/abgroupsetdistributionidentifier(_:_:_:_:).md)
