Function

ABGroupAddMember

Adds a person to a group.

Declaration

iOS
bool ABGroupAddMember(ABRecordRef group, ABRecordRef person, CFErrorRef *error);
macOS
bool ABGroupAddMember(ABGroupRef group, ABPersonRef personToAdd);

Parameters

group

The group you wish to add person to.

person

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

Groups

ABCopyArrayOfAllGroups

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

ABGroupAddGroup

Adds a subgroup to another group.

ABGroupCopyArrayOfAllMembers

Returns an array of persons in a group.

ABGroupCopyArrayOfAllSubgroups

Returns an array containing a group’s subgroups.

ABGroupCopyDistributionIdentifier

Returns the distribution identifier for the given property and person.

ABGroupCopyParentGroups

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

ABGroupCreate

Returns a new ABGroup object.

ABGroupCreateSearchElement

Creates an ABSearchElement object that specifies a query for ABGroup records.

ABGroupRemoveGroup

Removes a subgroup from a group.

ABGroupRemoveMember

Removes a person from a group.

ABGroupSetDistributionIdentifier

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).