< Previous PageNext Page > Hide TOC

Adding Properties to Address Book Records

You can add your own properties to the people and groups in the Address Book. For example, if you’re creating a small application to manage a dog club, you could add properties to each person that specify the name and breed of that person’s dog. Or if you’re creating an application to manage business contacts, you could add a property that lists all the meetings and phone calls a user has had with that person. These properties are stored in the Address Book database. Applications that don’t know about the new properties aren’t affected by them and don’t modify them.

When deciding whether to add a property to the Address Book, keep these issues in mind:

To add properties to every person or group, use the ABPerson or ABGroup class method addPropertiesAndTypes:. These procedures take a NSDictionary or CFDictionary, in which the keys are the names of the new properties and the values are their types. Note that the property names must be unique. You may want to use Java-style package names for your properties, to make sure no one else uses the same name; for example, "org.dogclub.dogname" or "com.mycompany.meetinglist". The type can be one of five types or a multivalue list of one of those types. Here are the types:



< Previous PageNext Page > Hide TOC


© 2002, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-04-04)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.