The ABGroup class supports the concept of a “group” containing one or more persons. People may belong to multiple groups, and groups may also belong to other groups unless the relationship causes a circular reference. The only predefined property of a group is its name. However, similar to person records, you can add your own properties to group records. Groups not only help to organize person records, but also allow you to create email distribution lists.


The ABGroup class is “toll-free bridged” with its procedural C opaque-type counterpart. This means that the ABGroupRef type is interchangeable in function or method calls with instances of the ABGroup class.


Managing properties

class func addPropertiesAndTypes([AnyHashable : Any]!)

Adds the given properties to all records of this type in the Address Book database.

class func removeProperties([Any]!)

Removes the given properties from all the records of this type in the Address Book database.

class func properties()

Returns an array of the names of all the properties for this record type in the Address Book database.

class func type(ofProperty: String!)

Returns the type for a given property.

Managing persons

func addMember(ABPerson!)

Adds a person to a group.

func removeMember(ABPerson!)

Removes a person from a group.

func members()

Returns an array of persons in a group.

Managing subgroups

func addSubgroup(ABGroup!)

Adds a subgroup to another group.

func removeSubgroup(ABGroup!)

Removes a subgroup from a group.

func parentGroups()

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

func subgroups()

Returns an array containing a group’s subgroups.

Managing Distribution Lists

func distributionIdentifier(forProperty: String!, person: ABPerson!)

Returns the distribution identifier for the given property and person.

func setDistributionIdentifier(String!, forProperty: String!, person: ABPerson!)

Assigns a specific distribution identifier for a person’s multivalue list property so that the group can be used as a distribution list.


Inherits From

Conforms To