AddressBook Functions

Find the C functions and function-like macros you use to manipulate Address Book data.

Topics

Address Book

ABGetSharedAddressBook

Returns the unique shared ABAddressBook object.

ABCopyDefaultCountryCode

Returns the default country code for records with unspecified country codes.

ABHasUnsavedChanges

Returns whether if there are unsaved changes in the address book.

ABSave

Saves all the changes made since the last save.

People

ABCopyArrayOfAllPeople

Returns an array of all the people in the Address Book database.

ABGetMe

Returns the ABPerson object for the logged-in user.

ABPersonCopyImageData

Returns data that contains a picture of a person.

ABPersonCopyParentGroups

Returns an array of groups that a person belongs to.

ABPersonCopyVCardRepresentation

Returns the vCard representation of the person as a data object in vCard format.

ABPersonCreate

Returns a newly created person object.

ABPersonCreateSearchElement

Returns a search element object that specifies a query for records of this type.

ABPersonCreateWithVCardRepresentation

Returns a new ABPerson object initialized with the given data in vCard format.

ABPersonSetImageData

Sets the image for this person to the given data.

ABSetMe

Sets the record that represents the logged-in user.

Groups

ABCopyArrayOfAllGroups

Returns an array of all the groups in the Address Book database.

ABGroupAddGroup

Adds a subgroup to another group.

ABGroupAddMember

Adds a person to a group.

ABGroupCopyArrayOfAllMembers

Returns an array of persons in a group.

ABGroupCopyArrayOfAllSubgroups

Returns an array containing a group’s subgroups.

ABGroupCopyDistributionIdentifier

Returns the distribution identifier for the given property and person.

ABGroupCopyParentGroups

Returns an array containing a group’s parents—the groups that a group belongs to.

ABGroupCreate

Returns a new ABGroup object.

ABGroupCreateSearchElement

Creates an ABSearchElement object that specifies a query for ABGroup records.

ABGroupRemoveGroup

Removes a subgroup from a group.

ABGroupRemoveMember

Removes a person from a group.

ABGroupSetDistributionIdentifier

Assigning a specific distribution identifier for a person’s multi-value list property so that the group can be used as a distribution list (mailing list, in the case of an email property).

Multi Values

ABMultiValueAdd

Adds a value and its label to a multi-value list.

ABMultiValueCopyIdentifierAtIndex

Returns the identifier at the given index.

ABMultiValueCopyLabelAtIndex

Returns the label for the given index.

ABMultiValueCopyPrimaryIdentifier

Returns the identifier for the primary value.

ABMultiValueCopyValueAtIndex

Returns the value for the given index.

ABMultiValueCount

Returns the number of entries in a multi-value list.

ABMultiValueCreate

Returns a new ABMultiValue object.

ABMultiValueCreateCopy

Returns a copy of a multi-value object.

ABMultiValueCreateMutable

Returns a newly created mutable multi-value list object.

ABMultiValueCreateMutableCopy

Returns a mutable copy of a multi-value object.

ABMultiValueIndexForIdentifier

Returns the index for the given identifier.

ABMultiValueInsert

Inserts a value and its label at the given index in a multi-value list.

ABMultiValuePropertyType

Returns the type for the values in a multi-value list.

ABMultiValueRemove

Removes the value and label at the given index.

ABMultiValueReplaceLabel

Replaces the label at the given index.

ABMultiValueReplaceValue

Replaces the value at the given index.

ABMultiValueSetPrimaryIdentifier

Sets the primary value to be the value for the given identifier.

Images

ABBeginLoadingImageDataForClient

Starts an asynchronous fetch for image data in all locations, and returns a non-zero tag for tracking.

ABCancelLoadingImageDataForTag

Cancels an asynchronous fetch of an image for the given tag.

Search Elements

ABCopyArrayOfMatchingRecords

Returns an array of records that match the given search element, or an empty array if no records match the search element.

ABSearchElementCreateWithConjunction

Returns a compound search element created by combining the search elements in an array with the given conjunction.

ABSearchElementMatchesRecord

Tests whether or not a record matches a search element.

Properties

ABAddPropertiesAndTypes

Adds the given properties to all the records of the specified type in the Address Book database, and returns the number of properties successfully added.

ABCopyArrayOfPropertiesForRecordType

Returns an array containing the names of all the properties for the specified record type.

ABCopyLocalizedPropertyOrLabel

Returns the localized version of a built in property, label, or key.

ABLocalizedPropertyOrLabel

Returns the localized version of a built in property, label, or key.

ABRemoveProperties

Removes the given properties from all the records of this type in the Address Book database, and returns the number of properties successfully removed.

ABTypeOfProperty

Returns the type of a given property for a given record.

Records

ABAddRecord

Adds a record of the specified type to the Address Book database.

ABCopyRecordForUniqueId

Returns the record that matches the given unique ID.

ABCopyRecordTypeFromUniqueId

Returns the type name of the record that matches a given unique ID.

ABCreateFormattedAddressFromDictionary

Returns a string containing the formatted address.

ABRecordCopyRecordType

Returns the type of the given record.

ABRecordCopyUniqueId

Returns the unique ID of the receiver.

ABRecordCopyValue

Returns the value of the given property.

ABRecordCreateCopy

Returns a copy of the given record.

ABRecordIsReadOnly

Returns whether or not the record is read-only.

ABRecordRemoveValue

Removes the value of the given property.

ABRecordSetValue

Sets the value of a given property for a record.

ABRemoveRecord

Removes the specified record from the Address Book database.

Deprecated

ABAddressBookAddRecord

Adds a record to an address book.

Deprecated
ABAddressBookCopyArrayOfAllGroups

Returns an array with all the groups in an address book.

Deprecated
ABAddressBookCopyArrayOfAllGroupsInSource

Returns an array of all groups from a particular source.

Deprecated
ABAddressBookCopyArrayOfAllPeople

Returns all the person records in an address book.

Deprecated
ABAddressBookCopyArrayOfAllPeopleInSource

Returns an array of all person records from a particular source.

Deprecated
ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering

Returns an array of all person records in the address book, sorted with the specified order.

Deprecated
ABAddressBookCopyArrayOfAllSources

Returns an array of all sources in the address book.

Deprecated
ABAddressBookCopyDefaultSource

Returns the default source.

Deprecated
ABAddressBookCopyLocalizedLabel

Returns a localized version of a record-property label.

Deprecated
ABAddressBookCopyPeopleWithName

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.

Deprecated
ABAddressBookCreate

Creates a new address book object with data from the Address Book database.

Deprecated
ABAddressBookCreateWithOptions

Creates a new address book object with data from the Address Book database.

Deprecated
ABAddressBookGetAuthorizationStatus

Returns the authorization status of your app for accessing address book data.

Deprecated
ABAddressBookGetGroupCount

Returns the number of groups in an address book.

Deprecated
ABAddressBookGetGroupWithRecordID

Returns the group with a given record ID.

Deprecated
ABAddressBookGetPersonCount

Returns the number of person records in an address book.

Deprecated
ABAddressBookGetPersonWithRecordID

Returns the person record with a given record ID.

Deprecated
ABAddressBookGetSourceWithRecordID

Returns the source record with the given record ID.

Deprecated
ABAddressBookHasUnsavedChanges

Indicates whether an address book has changes that have not been saved to the Address Book database.

Deprecated
ABAddressBookRegisterExternalChangeCallback

Registers a callback to receive notifications when the Address Book database is modified.

Deprecated
ABAddressBookRemoveRecord

Removes a record from an address book.

Deprecated
ABAddressBookRequestAccessWithCompletion

Requests access to address book data from the user.

Deprecated
ABAddressBookRevert

Discards unsaved changes in an address book.

Deprecated
ABAddressBookSave

Saves any unsaved changes to the Address Book database.

Deprecated
ABAddressBookUnregisterExternalChangeCallback

Unregisters a callback.

Deprecated
ABGroupCopyArrayOfAllMembersWithSortOrdering

Returns the records in a group, using a sort ordering.

Deprecated
ABGroupCopySource

Returns the source that the group is from.

Deprecated
ABGroupCreateInSource

Creates a group in a particular source.

Deprecated
ABMultiValueAddValueAndLabel

Adds a value and its corresponding label to a multivalue property.

Deprecated
ABMultiValueCopyArrayOfAllValues

Returns an array with the values in a multivalue property.

Deprecated
ABMultiValueGetCount

Returns the number of values in a multivalue property.

Deprecated
ABMultiValueGetFirstIndexOfValue

Returns the first location of a value in a multivalue property.

Deprecated
ABMultiValueGetIdentifierAtIndex

Returns the identifier of a value in a multivalue property.

Deprecated
ABMultiValueGetIndexForIdentifier

Returns the location (within a multivalue property) of a value with a given identifier.

Deprecated
ABMultiValueGetPropertyType

Returns the type of the values contained in a multivalue property.

Deprecated
ABMultiValueInsertValueAndLabelAtIndex

Inserts a value and a label into a multivalue property.

Deprecated
ABMultiValueRemoveValueAndLabelAtIndex

Removes a value from a multivalue property.

Deprecated
ABMultiValueReplaceLabelAtIndex

Replaces a label in a multivalue property with another label.

Deprecated
ABMultiValueReplaceValueAtIndex

Replaces a value in a multivalue property with another value.

Deprecated
ABPersonComparePeopleByName

Indicates how two person records get sorted.

Deprecated
ABPersonCopyArrayOfAllLinkedPeople

Returns an array of all person records in the address book database that are linked to the given person record.

Deprecated
ABPersonCopyCompositeNameDelimiterForRecord

Returns the delimiter to use between name components.

Deprecated
ABPersonCopyImageDataWithFormat

Returns the picture for a person record in the given format.

Deprecated
ABPersonCopyLocalizedPropertyName

Returns the localized name of a person property

Deprecated
ABPersonCopySource

Returns the source that the person record is from.

Deprecated
ABPersonCreateInSource

Creates a new person record in a particular source.

Deprecated
ABPersonCreatePeopleInSourceWithVCardRepresentation

Creates person records from the given vCard representation.

Deprecated
ABPersonCreateVCardRepresentationWithPeople

Returns the vCard representation of the given person records.

Deprecated
ABPersonGetCompositeNameFormat

Returns the person-name display format.

Deprecated
ABPersonGetCompositeNameFormatForRecord

Returns the person-name display format to use for the given record.

Deprecated
ABPersonGetSortOrdering

Returns the user’s sort-ordering preference for lists of persons.

Deprecated
ABPersonGetTypeOfProperty

Returns the type of a person property.

Deprecated
ABPersonHasImageData

Indicates whether a person has a picture.

Deprecated
ABPersonRemoveImageData

Removes a person’s picture.

Deprecated
ABRecordCopyCompositeName

Returns an appropriate, human-friendly name for the record.

Deprecated
ABRecordGetRecordID

Returns the unique ID of a record.

Deprecated
ABRecordGetRecordType

Returns the type of a record.

Deprecated

Functions

ABPickerAddProperty

Adds a property to the group of properties available in the record list. Use ABPickerRemoveProperty to remove a property from the list and ABPickerCopyProperties to obtain the list of properties available in the list.

ABPickerChangeAttributes

Specifies the selection behaviors for a people-picker window. Use ABPickerGetAttributes to obtain the selection behaviors specified for the window.

ABPickerClearSearchField

Clears the search field and resets the list of displayed records.

ABPickerCopyColumnTitle

Obtains the title of a custom property.

ABPickerCopyDisplayedProperty

Returns the name of the property currently displayed in the record list.

ABPickerCopyProperties

Obtains the list of properties available in the record list. Use ABPickerAddProperty to add a property to the record list and ABPickerRemoveProperty to remove a property from the list.

ABPickerCopySelectedGroups

Returns the groups selected in the group list as an array of ABRecord C objects.

ABPickerCopySelectedIdentifiers

Returns the identifiers of the selected values in a multi-value property or an empty array if the property displayed is a single-value property.

ABPickerCopySelectedRecords

Returns the selection in the record list as an array of ABGroup or ABPerson C objects.

ABPickerCopySelectedValues

Returns the selected values in a multi-value property or an empty array if no values are selected or the property displayed is a single-value property.

ABPickerCreate

Creates an ABPickerRef. The corresponding window is hidden. Invoke ABPickerSetVisibility to show it. Release with CFRelease.

ABPickerDeselectAll

Deselects all selected groups, records, and values in multi-value properties.

ABPickerDeselectGroup

Deselects a group in the group list.

ABPickerDeselectIdentifier

Deselects a value in multi-value property currently displayed in the record list.

ABPickerDeselectRecord

Deselects a group in the record list.

ABPickerEditInAddressBook

Launches Address Book to edit the item selected in the people-picker window.

ABPickerGetAttributes

Indicates the selection behaviors selected a people-picker window. Use ABPickerChangeAttributes to specify selection behaviors for the window.

ABPickerGetDelegate

Obtains the delegate for a people-picker window.

ABPickerGetFrame

Returns the position and size of the people-picker window.

ABPickerIsVisible

Indicates whether the people-picker window is visible.

ABPickerRemoveProperty

Removes a property from the group of properties whose values are shown in the record list. Use ABPickerAddProperty to add a property to the record list and ABPickerCopyProperties to obtain the list of properties shown in the record list.

ABPickerSelectGroup

Selects a group or a set of groups in the group list.

ABPickerSelectIdentifier

Selects a value or a set of values in a multi-value property.

ABPickerSelectInAddressBook

Launches Address Book and selects the item selected in the people-picker window.

ABPickerSelectRecord

Selects a record or a set of records in the record list.

ABPickerSetColumnTitle

Sets the title for a custom property.

ABPickerSetDelegate

Sets the event handler for people-picker events.

ABPickerSetDisplayedProperty

Displays one of the properties whose values are shown in the record list.

ABPickerSetFrame

Specifies the position and size of the people-picker window.

ABPickerSetVisibility

Shows or hides a people-picker window.

See Also

C Interfaces

C Types

Identify the C types that correspond to Address Book objects.

Address Book Constants

Get the constants you use to specify Address Book information.

AddressBook Enumerations

Get the enumerations you use to specify Address Book information.

AddressBook Data Types

Get the data types you use to specify Address Book information.