Mac OS X Reference Library Apple Developer
Search

Address Book Contacts

Schema Name

com.apple.Contacts

Declared in

/System/Library/SyncServices/Schemas/Contacts.syncschema

Data Classes

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

The Contacts schema is used to represent a database of contact information—information about people and companies—where contacts can be grouped hierarchically. These entities are used by many Apple Applications including Address Book, Mail, and iChat. Address Book is the primary end-user application used to author contacts, so caution should be taken when modifying contact records from other applications.

Figure 1 illustrates the entities, attributes, and relationships contained in the Contacts schema.

Figure 1  Contacts schema

Contacts schema

Calendar URI

Entity name

com.apple.contacts.CalendarURI

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.5 and later.

A protocol-independent location for a user's calendar.

Attribute

Type

Description

type

enum

The type of URI. Possible values are home, work, and other. If other, then label is used.

Available in Mac OS X v10.5 and later.

label

string

The label used to display this attribute.

Available in Mac OS X v10.5 and later.

value

string

The protocol-independent location for this calendar—for example, http://cal.host1.com/user/cal.ics.

Available in Mac OS X v10.5 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.5 and later.

Contact

Entity name

com.apple.contacts.Contact

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

A Contact contains information about a person or company including its name, phone numbers, email addresses, street address, instant message accounts, important dates, and an image used for display. Below are the attributes and relationships of a Contact record.

Attribute

Type

Description

birthday

date

This contact’s birthday.

Available in Mac OS X v10.4 and later.

company name

string

This contact’s company or organization name, if applicable.

Available in Mac OS X v10.4 and later.

company name yomi

string

A phonetic representation of this contact’s company or organization name.

Available in Mac OS X v10.4 and later.

department

string

This contact’s department name within a company, if applicable.

Available in Mac OS X v10.4 and later.

display as company

enum

Specifies how to display this contact. Possible values are person and company.

Available in Mac OS X v10.4 and later.

display order

enum

Specifies the order of the first and last names. Possible values are firstNameFirst and lastNameFirst.

Available in Mac OS X v10.4 and later.

first name

string

This contact’s first name.

Available in Mac OS X v10.4 and later.

first name yomi

string

A phonetic representation of this contact’s first name.

Available in Mac OS X v10.4 and later.

hobby

string

This contact’s hobby.

Available in Mac OS X v10.4 and later.

image

data

An image representing this contact.

Available in Mac OS X v10.4 and later.

job title

string

This contact’s job title, if applicable.

Available in Mac OS X v10.4 and later.

last name

string

This contact’s last name.

Available in Mac OS X v10.4 and later.

last name yomi

string

A phonetic representation of this contact’s last name.

Available in Mac OS X v10.4 and later.

maiden name

string

This contact’s maiden name, if applicable.

Available in Mac OS X v10.4 and later.

middle name

string

This contact’s middle name.

Available in Mac OS X v10.4 and later.

middle name yomi

string

A phonetic representation of this contact’s middle name.

Available in Mac OS X v10.4 and later.

nickname

string

This contact’s nickname if applicable.

Available in Mac OS X v10.4 and later.

notes

string

Miscellaneous notes about this contact.

Available in Mac OS X v10.4 and later.

short name

string

This contact’s short name. Can be any string—for example, a login name.

Available in Mac OS X v10.4 and later.

suffix

string

Suffix appended to this contact’s name, such as “Sr.,” “Jr.,” “III,” or “Esq.”

Available in Mac OS X v10.4 and later.

ticker symbol

string

A company’s ticker symbol—for example, AAPL for Apple Computer.

Available in Mac OS X v10.4 and later.

title

string

Title in front of this contact’s name, such as “Mr.,” “Mrs.,” “General,” “Cardinal,” or “Lord.”

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

calendar URIs

Calendar URI

One or more calendars belonging to this contact.

Available in Mac OS X v10.5 and later.

custom fields

Custom Field

Custom fields associated with this contact.

Available in Mac OS X v10.4 and later.

dates

Date

Miscellaneous dates associated with this contact, such as a spouse’s birthday or a wedding anniversary.

Available in Mac OS X v10.4 and later.

email addresses

Email Address

Email addresses for this contact.

Available in Mac OS X v10.4 and later.

IMs

IM

This contact’s instant message accounts.

Available in Mac OS X v10.4 and later.

parent groups

Group

Groups that contain this contact.

Available in Mac OS X v10.4 and later.

phone numbers

Phone Number

Phone numbers for this contact.

Available in Mac OS X v10.4 and later.

Primary Calendar URI

CalendarURI

The primary calendar belonging to this contact.

Available in Mac OS X v10.5 and later.

primary custom field

Custom Field

The primary custom field associated with this contact.

Available in Mac OS X v10.4 and later.

primary date

Date

The primary date associated with this contact—for example, a birthday.

Available in Mac OS X v10.4 and later.

primary email address

Email Address

This contact’s primary email address.

Available in Mac OS X v10.4 and later.

primary IM

IM

This contact’s primary instant message account.

Available in Mac OS X v10.4 and later.

primary phone number

Phone Number

This contact’s primary phone number.

Available in Mac OS X v10.4 and later.

primary related name

Related Name

The primary person this contact is related to—for example, a spouse.

Available in Mac OS X v10.4 and later.

primary street address

Street Address

The primary mailing address for this contact.

Available in Mac OS X v10.4 and later.

primary URL

Primary URL

The primary URL associated with this contact.

Available in Mac OS X v10.4 and later.

related names

Related Name

Names of people related to this contact.

Available in Mac OS X v10.4 and later.

street addresses

Street Address

Mailing addresses for this contact.

Available in Mac OS X v10.4 and later.

URLs

URL

URLs associated with this contact.

Available in Mac OS X v10.4 and later.

Custom Field

Entity name

com.apple.contacts.Custom Field

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

A custom field about a contact. Simply a key-value pair where both the key and the value are strings. Below are the attributes and relationships of a Custom Field record.

Attribute

Type

Description

label

string

The label used to display this attribute.

Available in Mac OS X v10.4 and later.

value

string

The value of this attribute.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.

Date

Entity name

com.apple.contacts.Date

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

Represents an important date, other than a birthday, associated with a contact. Below are the attributes and relationships of a Date record.

Attribute

Type

Description

label

string

A label used to display this attribute when the type is other. For example, “First Date.”

Available in Mac OS X v10.4 and later.

type

enum

The type of date. Possible values are anniversary, and other. If other ,then label is used.

Available in Mac OS X v10.4 and later.

value

date

The date of the event.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.

Email Address

Entity name

com.apple.contacts.Email Address

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

Represents a contact’s email address. Below are the attributes and relationships of a Email Address record.

Attribute

Type

Description

label

string

A label used to display this attribute when the type is other. For example, “.Mac email.” If this attribute is not set, then Address Book will use “other” as the label.

Available in Mac OS X v10.4 and later.

type

enum

The type of email address. Possible values are home, work, and other. If other, then label is used.

Available in Mac OS X v10.4 and later.

value

string

The email address.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.

Group

Entity name

com.apple.contacts.Group

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

A collection of contacts and/or groups. Allows nonstrict hierarchical organization of contacts—contacts and groups can belong to multiple groups. Also supports phone, email, and street address distribution lists. Below are the attributes and relationships of a Group record.

Attribute

Type

Description

name

string

The name of this group.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

distribution email addresses

Email Address

Email addresses for this group used as a distribution list.

Available in Mac OS X v10.4 and later.

distribution phone numbers

Phone Number

Phone numbers for this group used as a distribution list.

Available in Mac OS X v10.4 and later.

distribution street addresses

Street Address

Street addresses for this group used as a distribution list.

Available in Mac OS X v10.4 and later.

members

Contact, Group

Contacts and subgroups belonging to this group.

Available in Mac OS X v10.4 and later.

parent groups

Group

Groups that contain this group.

Available in Mac OS X v10.4 and later.

IM

Entity name

com.apple.contacts.IM

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

A contact’s instant message account. Below are the attributes and relationships of an IM record.

Attribute

Type

Description

label

string

A label used to display this attribute when the type is other.

Available in Mac OS X v10.4 and later.

service

enum

The type of instant message services. Possible values are aim, jabber, msn, yahoo, and icq.

Available in Mac OS X v10.4 and later.

type

enum

The type of account. Possible values are home, work, and other. If other then label is used.

Available in Mac OS X v10.4 and later.

user

string

The instant message account name.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.

Phone Number

Entity name

com.apple.contacts.Phone Number

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

Represents a contact’s phone number. Below are the attributes and relationships of a Phone Number record.

Attribute

Type

Description

label

string

A label used to display this attribute when type is other. For example, “home business.”

Available in Mac OS X v10.4 and later.

type

enum

Specifies the type of phone number. Possible values are home, work, mobile, home fax, work fax, pager, main and other. If other then the label attribute is used.

Available in Mac OS X v10.4 and later.

value

string

The phone number.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.

Related Name

Entity name

com.apple.contacts.Related Name

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

A name of a person that is related to a contact such as the name of a spouse or children. Below are the attributes and relationships of a Related Name record.

Attribute

Type

Description

label

string

A label used to display this attribute when the type is other. For example, “Uncle” or “Aunt.”

Available in Mac OS X v10.4 and later.

type

enum

The type of this related name. Possible values are mother, father, parent, sister, brother, child, friend, spouse, partner, assistant,manager, and other. If other, then label is used.

Available in Mac OS X v10.4 and later.

value

string

The name of the related person.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.

Street Address

Entity name

com.apple.contacts.Street Address

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

Represents a contact’s mailing address. Below are the attributes and relationships of a Street Address record.

Attribute

Type

Description

city

string

The city part of this address.

Available in Mac OS X v10.4 and later.

country

string

The country part of this address

Available in Mac OS X v10.4 and later.

country code

string

The code for the country.

Available in Mac OS X v10.4 and later.

label

string

A label used to display this attribute when the type is other. For example, “Vacation home address.”

Available in Mac OS X v10.4 and later.

postal code

string

The zip code part of this address.

Available in Mac OS X v10.4 and later.

state

string

The state part of this address.

Available in Mac OS X v10.4 and later.

street

string

The street part of this address.

Available in Mac OS X v10.4 and later.

type

enum

The type of address. Possible values are home, work, and other. If other then label is used.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.

URL

Entity name

com.apple.contacts.URL

Data class

com.apple.Contacts

Availability

Available in Mac OS X v10.4 and later.

Link to a website about or associated with a contact. Below are the attributes and relationships of a URL record.

Attribute

Type

Description

label

string

A label used to display this attribute when the type is other. For example, “Home business.”

Available in Mac OS X v10.4 and later.

type

enum

The type of URL. Possible values are home page, home, work, and other. If other then label is used.

Available in Mac OS X v10.4 and later.

value

URL

The URL for this attribute.

Available in Mac OS X v10.4 and later.

Relationship

Targets

Description

contact

Contact

The contact that this record belongs to.

Available in Mac OS X v10.4 and later.




Last updated: 2009-07-07

Did this document help you? Yes It's good, but... Not helpful...