| Framework | AddressBook/AddressBook.h |
| Declared in | ABPerson.h |
The ABPerson opaque type (whose objects are known as person records) represents a person record. Person records store information about a person, such as first name, last name, address, email, phone number, and so on.
Person records don’t necessarily have to be stored on the Address Book database or an address book. You can use person records as a way to group contact information in memory and present it to the user through, for example, a person view controller (ABPersonViewController).
Performs a prefix search on the composite names of people in an address book and returns an array of persons that match the search criteria.
CFArrayRef ABAddressBookCopyPeopleWithName ( ABAddressBookRef addressBook, CFStringRef name );
The address book in which to search.
The search terms. Examples: "Mary", "Smi*", "Hu Yan".
Array containing person records (ABRecordRef objects) that match prefixQuery.
ABPerson.hReturns the person record with a given record ID.
ABRecordRef ABAddressBookGetPersonWithRecordID ( ABAddressBookRef addressBook, ABRecordID recordID );
The address book in which to search for recordID.
The record identifier to seek in addressBook.
If found, the person record with recordID as its identifier, otherwise NULL.
ABPerson.hIndicates how two person records get sorted.
CFComparisonResult ABPersonComparePeopleByName ( ABRecordRef person1, ABRecordRef person2, ABPersonSortOrdering ordering );
The first person.
The second person.
Indicates whether to sort by first name or by last name. See “Sort Order”.
kCFCompareLessThan when person1 goes before person2.
kCFCompareEqualTo when person1 and person2 have the same name.
kCFCompareGreaterThan when person1 goes after person2.
ABPerson.hReturns the picture for a person.
CFDataRef ABPersonCopyImageData ( ABRecordRef person );
The person record whose picture to return.
The picture for person. NULL when the person has no picture.
ABPerson.hReturns the localized name of a person property
CFStringRef ABPersonCopyLocalizedPropertyName ( ABPropertyID property );
The person property whose localized name to return.
The localized name of property.
ABPerson.hCreates a person.
ABRecordRef ABPersonCreate ( void );
New person.
To be added to the Address Book database, you must add the newly created person to an address book using ABAddressBookAddRecord.
ABPerson.hReturns the person-name display format.
ABPersonCompositeNameFormat ABPersonGetCompositeNameFormat ( void );
A constant indicating person-name display order; see “Composite Name Format”.
ABPerson.hReturns the user’s sort ordering preference for lists of persons.
ABPersonSortOrdering ABPersonGetSortOrdering ( void );
The user’s sort ordering preference:
Sort by first name
Sort by last name
See “Sort Order”.
ABPerson.hReturns the type of a person property.
ABPropertyType ABPersonGetTypeOfProperty ( ABPropertyID property );
The person property whose type to return.
The type of property.
ABPerson.hIndicates whether a person has a picture.
bool ABPersonHasImageData ( ABRecordRef person );
The person record in question.
true when person has a picture, false otherwise.
ABPerson.hRemoves a person’s picture.
bool ABPersonRemoveImageData ( ABRecordRef person, CFErrorRef *error );
The person record whose picture to remove.
On error, information about the cause.
true when successful, false otherwise.
ABPerson.hSets a person’s picture.
bool ABPersonSetImageData ( ABRecordRef person, CFDataRef imageData, CFErrorRef *error );
The person record whose picture to set.
The picture to assign to person.
On error, information about the cause.
true when successful, false otherwise.
ABPerson.hIndicates a person sort ordering.
typedef uint32_t ABPersonSortOrdering;
See “Sort Order”.
ABPerson.hIndicates a person-name display format.
typedef uint32_t ABPersonCompositeNameFormat;
ABPerson.hThe value of these constants is undefined until one of the following has been called: ABAddressBookCreate, ABPersonCreate, ABGroupCreate.
These constants identify sort order for person lists.
enum {
kABPersonSortByFirstName = 0,
kABPersonSortByLastName = 1
};
kABPersonSortByFirstNameOrder by first name.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonSortByLastNameOrder by last name.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
See ABPersonSortOrdering and ABPersonGetSortOrdering.
These constants identify the format to use for a person’s composite name order for persons.
enum {
kABPersonCompositeNameFormatFirstNameFirst = 0,
kABPersonCompositeNameFormatLastNameFirst = 1
};
kABPersonCompositeNameFormatFirstNameFirstFirst name first.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonCompositeNameFormatLastNameFirstLast name first.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
See ABPersonCompositeNameFormat and ABRecordCopyCompositeName.
These constants identify person properties used to store personal information.
const ABPropertyID kABPersonFirstNameProperty; const ABPropertyID kABPersonLastNameProperty; const ABPropertyID kABPersonMiddleNameProperty; const ABPropertyID kABPersonPrefixProperty; const ABPropertyID kABPersonSuffixProperty; const ABPropertyID kABPersonNicknameProperty; const ABPropertyID kABPersonFirstNamePhoneticProperty; const ABPropertyID kABPersonLastNamePhoneticProperty; const ABPropertyID kABPersonMiddleNamePhoneticProperty; const ABPropertyID kABPersonOrganizationProperty; const ABPropertyID kABPersonJobTitleProperty; const ABPropertyID kABPersonDepartmentProperty; const ABPropertyID kABPersonEmailProperty; const ABPropertyID kABPersonBirthdayProperty; const ABPropertyID kABPersonNoteProperty; const ABPropertyID kABPersonCreationDateProperty; const ABPropertyID kABPersonModificationDateProperty;
kABPersonFirstNamePropertyFirst name. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonLastNamePropertyLast name. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonMiddleNamePropertyMiddle name. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonPrefixPropertyPrefix (“Sir,” “Duke,” “General”). Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonSuffixPropertySuffix (“Jr.,” “Sr.,” “III”). Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonNicknamePropertyNickname. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonFirstNamePhoneticPropertyFirst name phonetic. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonLastNamePhoneticPropertyLast name phonetic. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonMiddleNamePhoneticPropertyMiddle name phonetic. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonOrganizationPropertyOrganization name. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonJobTitlePropertyJob title. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonDepartmentPropertyDepartment. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonEmailPropertyEmail address. Type: kABMultiStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonBirthdayPropertyBirthday. Type: kABDateTimePropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonNotePropertyNote. Type: kABStringPropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonCreationDatePropertyCreation date. Type: kABDateTimePropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonModificationDatePropertyModification date. Type: kABDateTimePropertyType.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
These constants implement the person address property (a multivalue property of type kABMultiDictionaryPropertyType) and the labels used to identify each of the property’s values.
const ABPropertyID kABPersonAddressProperty; const CFStringRef kABPersonAddressStreetKey; const CFStringRef kABPersonAddressCityKey; const CFStringRef kABPersonAddressStateKey; const CFStringRef kABPersonAddressZIPKey; const CFStringRef kABPersonAddressCountryKey; const CFStringRef kABPersonAddressCountryCodeKey;
kABPersonAddressPropertyIdentifier for the address multivalue property.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAddressStreetKeyStreet.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAddressCityKeyCity.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAddressStateKeyState.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAddressZIPKeyZip code.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAddressCountryKeyCountry.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAddressCountryCodeKeyCountry code.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
These are the country codes ABPerson supports:
ar: Argentina
at: Austria
au: Australia
ba: Bosnia, Herzegovina
bg: Bulgaria
bh: Bahrain
br: Brazil
ca: Canada
ch: Switzerland
cn: China
cz: Czech
de: Germany
dk: Denmark
eg: Egypt
es: Spain
fi: Finland
fr: France
gr: Greece
gl: Greenland
hk: Hong Kong
hr: Croatia
hu: Hungary
ie: Ireland
il: Israel
id: Indonesia
in: India
is: Iceland
it: Italy
jp: Japan
kr: South Korea
kw: Kuwait
lb: Lebanon
lu: Luxembourg
mk: Macedonia
mx: Mexico
nl: Netherlands
no: Norway
nz: New Zealand
om: Oman
pl: Poland
pt: Portugal
qa: Qatar
ro: Romania
ru: Russian Federation
sa: Saudi Arabia
se: Sweden
sg: Singapore
si: Slovenia
sk: Slovakia
sy: Syrian Arab Republic
tw: Taiwan
tr: Turkey
ua: Ukraine
uk: United Kingdom
us: United States
ye: Yemen
za: South Africa
These constants implement the person dates property (a multivalue property of type kABMultiDateTimePropertyType) and the labels used to identify each of the property’s values.
const ABPropertyID kABPersonDateProperty; const CFStringRef kABPersonAnniversaryLabel;
kABPersonDatePropertyIdentifier for the dates multivalue property.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAnniversaryLabelBirthdate.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
These constants implement the person type property (a property of type kABIntegerPropertyType), which indicates whether a person record represents a human being or an organization.
const ABPropertyID kABPersonKindProperty; const CFNumberRef kABPersonKindPerson; const CFNumberRef kABPersonKindOrganization;
kABPersonKindPropertyIdentifier for the type property.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonKindPersonIdentifies a person.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonKindOrganizationIdentifies an organization.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
These constants implement the person phone number property (a multivalue property of type kABMultiStringPropertyType) and the labels used to identify each of the property’s values.
const ABPropertyID kABPersonPhoneProperty; const CFStringRef kABPersonPhoneMobileLabel; const CFStringRef kABPersonPhoneIPhoneLabel; const CFStringRef kABPersonPhoneMainLabel; const CFStringRef kABPersonPhoneHomeFAXLabel; const CFStringRef kABPersonPhoneWorkFAXLabel; const CFStringRef kABPersonPhonePagerLabel;
kABPersonPhonePropertyIdentifier for the phone number multivalue property.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonPhoneMobileLabelMobile phone number.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonPhoneIPhoneLabeliPhone number.
Available in iPhone OS 3.0 and later.
Declared in ABPerson.h.
kABPersonPhoneMainLabelMain phone number.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonPhoneHomeFAXLabelFax phone number.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonPhoneWorkFAXLabelWork phone number.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonPhonePagerLabelPager phone number.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
These constants implement the person instant message property (a multivalue property of type kABMultiDictionaryPropertyType) and the labels used to identify each of the property’s values.
const ABPropertyID kABPersonInstantMessageProperty; const CFStringRef kABPersonInstantMessageServiceKey; const CFStringRef kABPersonInstantMessageServiceYahoo; const CFStringRef kABPersonInstantMessageServiceJabber; const CFStringRef kABPersonInstantMessageServiceMSN; const CFStringRef kABPersonInstantMessageServiceICQ; const CFStringRef kABPersonInstantMessageServiceAIM; const CFStringRef kABPersonInstantMessageUsernameKey;
kABPersonInstantMessagePropertyIdentifier for the instant message multivalue property.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonInstantMessageServiceKeyInstant message service.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonInstantMessageServiceYahooYahoo instance message service.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonInstantMessageServiceJabberJabber instant message service.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonInstantMessageServiceMSNMSN instant message service.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonInstantMessageServiceICQICQ instant message service.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonInstantMessageServiceAIMAIM instant message service
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonInstantMessageUsernameKeyInstant message service username.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
An instant message multivalue property may have the following structure.
kABPersonInstantMessageServiceKey
Yahoo
<username>@yahoo.com
kABPersonInstantMessageServiceKey
AIM
<username>@mac.com
This constant implements the person URL property (a multivalue property of type kABMultiStringPropertyType) and the label used to identify the property’s sole value.
const ABPropertyID kABPersonURLProperty; const CFStringRef kABPersonHomePageLabel;
kABPersonURLPropertyIdentifier for the URL multivalue property.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonHomePageLabelHome page.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
These constants implement the person related name property (a multivalue property of type kABMultiStringPropertyType) and the labels used to identify each of the property’s values.
const ABPropertyID kABPersonRelatedNamesProperty; const CFStringRef kABPersonMotherLabel; const CFStringRef kABPersonFatherLabel; const CFStringRef kABPersonParentLabel; const CFStringRef kABPersonSisterLabel; const CFStringRef kABPersonBrotherLabel; const CFStringRef kABPersonChildLabel; const CFStringRef kABPersonFriendLabel; const CFStringRef kABPersonSpouseLabel; const CFStringRef kABPersonPartnerLabel; const CFStringRef kABPersonManagerLabel; const CFStringRef kABPersonAssistantLabel;
kABPersonRelatedNamesPropertyIdentifier for the related name multivalue property.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonMotherLabelMother.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonFatherLabelFather.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonParentLabelParent.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonSisterLabelSister.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonBrotherLabelBrother.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonChildLabelChild.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonFriendLabelFriend.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonSpouseLabelSpouse.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonPartnerLabelPartner.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonManagerLabelManager.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABPersonAssistantLabelAssistant.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
These constants contain generic property labels.
const CFStringRef kABWorkLabel; const CFStringRef kABHomeLabel; const CFStringRef kABOtherLabel;
kABWorkLabel“Work” label.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABHomeLabel“Home” label.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
kABOtherLabel“Other” label.
Available in iPhone OS 2.0 and later.
Declared in ABPerson.h.
Last updated: 2009-05-26