About the Address Book

The Address Book framework uses a centralized database for contact and other personal information for people. Users only need to enter this information once, instead of entering it repeatedly whenever it is used. Applications that support the Address Book framework share this contact information with other applications, including Mail and Messages. Every user on the computer has one and only one address book. Every application shares the address book for the currently logged-in user.

How Address Book Handles Individuals and Groups

The Address Book framework supports two fundamental kinds of records: ABPerson, for individuals, and ABGroup, for groups. Both are subclasses of the same root class, ABRecord, and they can be used interchangeably in some places.

An ABPerson record contains properties such as the person’s name, company, addresses, email addresses, phone numbers, instant messaging IDs, and a comments field.

An ABGroup object can contain any number of people and other groups; a person can be in any number of groups. For example, suppose you are a consultant who works with two companies, Acme Co. and Ajax Inc. You could set up an Acme employees group and an Ajax employees group, and make each company’s employees members of their respective group. You could then set up a Professionals group that includes the Acme group, the Ajax group, all well as some additional people who aren’t in either group.

In addition, group and person records have these characteristics:

How Address Book Manages Individual Search Queries

The Address Book framework manages individual search queries using ABSearchElement objects, which can be created using class methods of ABGroup and ABPerson. This has an important implication—because the search objects are created using the these particular classes, a custom subclass of ABRecord will not contain the required methods to create such an object. For this reason, you are advised not to subclass ABRecord.

For more information about searching Address Book records, see “Searching an Address Book.”

Other Features

The Address Book framework: