Adds a person to a group.


func ABGroupAddMember(_ group: ABRecord!, _ person: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool
macOS, Mac Catalyst
func ABGroupAddMember(_ group: ABGroupRef!, _ personToAdd: ABPersonRef!) -> Bool



The group you wish to add person to.


The person to add to group. If person is NULL, this function raises an exception.

Return Value

true if successful, false otherwise. For example, if person is already in group, this function does nothing but returns false.

See Also


func ABCopyArrayOfAllGroups(ABAddressBookRef!) -> Unmanaged<CFArray>!

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

func ABGroupCopyArrayOfAllSubgroups(ABGroupRef!) -> Unmanaged<CFArray>!

Returns an array containing a group’s subgroups.

func ABGroupCopyDistributionIdentifier(ABGroupRef!, ABPersonRef!, CFString!) -> Unmanaged<CFString>!

Returns the distribution identifier for the given property and person.

func ABGroupCopyParentGroups(ABGroupRef!) -> Unmanaged<CFArray>!

Returns an array containing a group’s parents—the groups that a group belongs to.

func ABGroupSetDistributionIdentifier(ABGroupRef!, ABPersonRef!, CFString!, CFString!) -> Bool

Assigning a specific distribution identifier for a person’s multi-value list property so that the group can be used as a distribution list (mailing list, in the case of an email property).