On an iOS device, the Contacts application allows users to add contacts to, remove contacts from, and manipulate their address books. An address book can be a collection of people and groups. Each person can have properties such as first name, last name, phone number, and email address. Some properties can have a single value, and some can have multiple values. For instance, the first name of a person is one value, but the phone number can be multiple values (e.g., if the user has two home phone numbers).
The AddressBook.framework framework in the iOS SDK allows you to interact with the address book database on the device. You can get the array of all entities in the user’s address book, insert and change values, and much more.
To use the address book-related functions in your application, using the latest LLVM compiler features, all you have to do is import the following header file into your source code:
You can use the Address Book framework on iOS Simulator, and you will be happy to know that Apple has already prepopulated the Contacts database on the simulator so that you don’t have to do that by yourself (see Figure 13-1).
Figure 13-1. The Contacts app on the simulator already contains prepopulated information
The examples in this chapter ...