Mac Developer Library

Developer

AddressBook Framework Reference ABPerson C Reference

Options
Deployment Target:

On This Page
Language:

ABPerson C Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import AddressBook

Objective-C

@import AddressBook;

The ABPerson opaque type encapsulates all information about a person in the Address Book database—an instance of ABPerson corresponds to a single person record in the database. The ABPerson opaque type defines properties such as the person’s name, company, address, email addresses, and phone numbers.

You get a person’s property value using the ABRecordCopyValue function. See ABRecord C Reference for more functions that get and set properties. See the “Constants” section for a list of all the properties, labels, and keys used to access fields in a person record.

Some of these properties have multiple values that are accessed via standard and user-defined labels. For example, a person may have a home, work, mobile, and fax phone numbers. Therefore, the phone attribute is defined as an ABMultiValue object containing NSString objects for each number. See ABMultiValue C Reference for more details on multi-value lists and how primary values work.

You can add your own properties to person records too using the ABAddPropertiesAndTypes function—that is, attach additional program-defined data to each person record. Because the Address Book database is stored as a property list, these program-defined properties can be ignored by other applications. Note that the AddressBook database is accessed by multiple application and is not encrypted so your application should not store any sensitive information in the database like credit card numbers.

A person may also have an associated picture or image. The image in not actually stored in the Address Book database (a property list)—it’s stored in a separate image file. You can set a person’s image using the ABPersonSetImageData function, or get an image using the ABPersonCopyImageDatafunction.

Image files may be local or remote. Local images are any images in .../Library/Images/People or images the user has set using the Address Book application. Remote images are images stored on the network. Theses images take time to download, so ABPerson provides an asynchronous API for fetching remote images.

Use the ABBeginLoadingImageDataForClient function if an image file is not local and you want to perform an asynchronous fetch. The ABBeginLoadingImageDataForClient function will return an image tracking number. The tracking number and the fetched image will be passed to your callback function. Implement your callback function to handle the fetched image. Use the ABCancelLoadingImageDataForTag function if for some reason you want to cancel an asynchronous fetch.

Person records may belong to multiple groups. Use the ABPersonCopyParentGroups function to get the groups a person belongs to. See ABGroup C Reference for more information about groups.

You can also search for records matching a particular “query” you specify by creating an ABSearchElement object. Use the ABPersonCreateSearchElement function to create an ABSearchElement object containing your query. Then use the ABAddressBook ABCopyArrayOfMatchingRecords function, passing the ABSearchElement as the argument, to query the database. See ABSearchElement C Reference for more functions that create compound queries.

Your application can also import and export persons in the vCard file format using the ABPersonCreateWithVCardRepresentation and ABPersonCopyVCardRepresentation functions.

The ABPerson opaque type is “toll-free bridged” with its Objective-C counterpart. This means that the ABPersonRef type is interchangeable in function or method calls with instances of the ABPerson class.

Functions

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

    Declaration

    Swift

    func ABBeginLoadingImageDataForClient(_ person: ABPerson!, _ callback: ABImageClientCallback, _ refcon: UnsafeMutablePointer<Void>) -> CFIndex

    Objective-C

    CFIndex ABBeginLoadingImageDataForClient ( ABPersonRef person, ABImageClientCallback callback, void *refcon );

    Parameters

    person

    The person whose image data you wish to fetch.

    callback

    The function to call when the fetch is completed.

    refcon

    An untyped pointer to program-defined data that will be passed to the callback.

    Return Value

    A non-zero tag for tracking

    Discussion

    Use this function to begin an asynchronous fetch. Implement your callback function to receive the fetched image. Use the ABCancelLoadingImageDataForTag function to cancel an asynchronous fetch.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

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

    Declaration

    Swift

    func ABCancelLoadingImageDataForTag(_ tag: CFIndex)

    Objective-C

    void ABCancelLoadingImageDataForTag ( CFIndex tag );

    Parameters

    tag

    Used to track an asynchronous fetch. This parameter should have been returned from a previous call to the ABBeginLoadingImageDataForClient function.

    Discussion

    Use the ABBeginLoadingImageDataForClient function to begin an asynchronous fetch. Implement your callback function to receive the fetched image. Use this function to cancel an asynchronous fetch.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

  • Returns data that contains a picture of a person.

    Declaration

    Swift

    func ABPersonCopyImageData(_ person: ABPerson!) -> Unmanaged<CFData>!

    Objective-C

    CFDataRef ABPersonCopyImageData ( ABPersonRef person );

    Parameters

    person

    The person whose image you wish to obtain.

    Return Value

    The data representing an image of person. You are responsible for releasing this object.

    The returned data is in a QuickTime-compatible format. To create an image from it, use the NSImage method initWithData:.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

  • Returns an array of groups that a person belongs to.

    Declaration

    Swift

    func ABPersonCopyParentGroups(_ person: ABPerson!) -> Unmanaged<CFArray>!

    Objective-C

    CFArrayRef ABPersonCopyParentGroups ( ABPersonRef person );

    Parameters

    person

    The person whose parent groups you wish to obtain.

    Return Value

    An array of ABGroup objects which person belongs to. You are responsible for releasing this object.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

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

    Declaration

    Swift

    func ABPersonCopyVCardRepresentation(_ person: ABPerson!) -> Unmanaged<CFData>!

    Objective-C

    CFDataRef ABPersonCopyVCardRepresentation ( ABPersonRef person );

    Parameters

    person

    The person whose vCard representation you wish to obtain.

    Return Value

    The vCard representation of person as a data object in vCard format. You are responsible for releasing this object.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

  • Returns a newly created person object.

    Declaration

    Swift

    func ABPersonCreate() -> Unmanaged<ABPerson>!

    Objective-C

    ABPersonRef ABPersonCreate ( void );

    Return Value

    A newly created person object. You are responsible for releasing this object.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

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

    Declaration

    Swift

    func ABPersonCreateSearchElement(_ property: CFString!, _ label: CFString!, _ key: CFString!, _ value: AnyObject!, _ comparison: ABSearchComparison) -> Unmanaged<ABSearchElement>!

    Objective-C

    ABSearchElementRef ABPersonCreateSearchElement ( CFStringRef property, CFStringRef label, CFStringRef key, CFTypeRef value, ABSearchComparison comparison );

    Parameters

    property

    The name of the property to search on. It cannot be NULL. For a full list of the properties, see “Person Properties” and Common Properties in ABRecord.

    label

    The label name for a multi-value list. If property does not have multiple values, pass NULL. If property does have multiple values, pass NULL to search all the values.

    key

    The key name for a dictionary. If property is not a dictionary, pass NULL. If property is a dictionary, pass NULL to search all keys.

    value

    The value you are searching for. It cannot be NULL

    comparison

    Specifies the type of comparison to perform, such as kABEqual or kABPrefixMatchCaseInsensitive. For a full list, see Search Comparisons.

    Return Value

    A search element object that specifies a query according to the above parameters. You are responsible for releasing this object.

    Discussion

    Use the ABAddressBook ABCopyArrayOfMatchingRecords function to actually perform the query. Also, see ABSearchElement C Reference for more functions that create compound queries.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

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

    Declaration

    Swift

    func ABPersonCreateWithVCardRepresentation(_ vCard: CFData!) -> Unmanaged<ABPerson>!

    Objective-C

    ABPersonRef ABPersonCreateWithVCardRepresentation ( CFDataRef vCard );

    Parameters

    vCard

    The data in vCard format to initialize the new ABPerson object with.

    Return Value

    A new ABPerson object initialized with the given data in vCard format. You are responsible for releasing this object.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

  • Sets the image for this person to the given data.

    Declaration

    Swift

    func ABPersonSetImageData(_ person: ABPerson!, _ imageData: CFData!) -> Bool

    Objective-C

    bool ABPersonSetImageData ( ABPersonRef person, CFDataRef imageData );

    Parameters

    person

    The person whose image data you wish to set.

    imageData

    The image data to use as the image for person.

    Return Value

    true if successful, false otherwise.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

Callbacks

  • Prototype of a callback function used to notify an application when an asynchronous image fetch is complete.

    Declaration

    Swift

    typealias ABImageClientCallback = CFunctionPointer<((CFData!, CFIndex, UnsafeMutablePointer<Void>) -> Void)>

    Objective-C

    typedef void (*ABImageClientCallback) ( CFDataRef imageData, int tag, void *info );

    Parameters

    imageData

    The image data in Quicktime compatible format that was loaded from an asynchronous fetch. NULL if the fetch failed.

    tag

    The tracking number for this fetch that should have been obtained from a previous call to the ABBeginLoadingImageDataForClient function.

    info

    An untyped pointer to program-defined data that was passed to the ABBeginLoadingImageDataForClient function.

    Discussion

    Use the ABBeginLoadingImageDataForClient function to begin an asynchronous fetch, and the ABCancelLoadingImageDataForTag function to cancel an asynchronous fetch.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

Data Types

  • A reference to an ABPerson object.

    Declaration

    Swift

    typealias ABPersonRef = ABPerson

    Objective-C

    typedef struct __ABPerson *ABPersonRef;

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

Constants

  • CFPlugIn defines the following domain qualifier constants.

    Declaration

    Swift

    let kABFirstNameProperty: String let kABLastNameProperty: String let kABFirstNamePhoneticProperty: String let kABLastNamePhoneticProperty: String let kABBirthdayProperty: String let kABOrganizationProperty: String let kABJobTitleProperty: String let kABHomePageProperty: String let kABURLsProperty: String let kABCalendarURIsProperty: String let kABEmailProperty: String let kABAddressProperty: String let kABPhoneProperty: String let kABInstantMessageProperty: String let kABNoteProperty: String let kABMiddleNameProperty: String let kABMiddleNamePhoneticProperty: String let kABTitleProperty: String let kABSuffixProperty: String let kABNicknameProperty: String let kABMaidenNameProperty: String let kABOtherDatesProperty: String let kABRelatedNamesProperty: String let kABDepartmentProperty: String let kABPersonFlags: String

    Objective-C

    CFStringRef kABFirstNameProperty; CFStringRef kABLastNameProperty; CFStringRef kABFirstNamePhoneticProperty; CFStringRef kABLastNamePhoneticProperty; CFStringRef kABBirthdayProperty; CFStringRef kABOrganizationProperty; CFStringRef kABJobTitleProperty; CFStringRef kABHomePageProperty; CFStringRef kABURLsProperty; CFStringRef kABCalendarURIsProperty; CFStringRef kABEmailProperty; CFStringRef kABAddressProperty; CFStringRef kABPhoneProperty; CRStringRef kABInstantMessageProperty; CFStringRef kABAIMInstantProperty; CFStringRef kABJabberInstantProperty; CFStringRef kABMSNInstantProperty; CFStringRef kABYahooInstantProperty; CFStringRef kABICQInstantProperty; CFStringRef kABNoteProperty; CFStringRef kABMiddleNameProperty; CFStringRef kABMiddleNamePhoneticProperty; CFStringRef kABTitleProperty; CFStringRef kABSuffixProperty; CFStringRef kABNicknameProperty; CFStringRef kABMaidenNameProperty; CFStringRef kABOtherDatesProperty; CFStringRef kABRelatedNamesProperty; CFStringRef kABDepartmentProperty; CFStringRef kABPersonFlags;

    Constants

    • kABFirstNameProperty

      kABFirstNameProperty

      First name (string).

      Available in OS X v10.2 and later.

    • kABLastNameProperty

      kABLastNameProperty

      Last name (string).

      Available in OS X v10.2 and later.

    • kABFirstNamePhoneticProperty

      kABFirstNamePhoneticProperty

      First name phonetic (string).

      Available in OS X v10.2 and later.

    • kABLastNamePhoneticProperty

      kABLastNamePhoneticProperty

      Last name phonetic (string).

      Available in OS X v10.2 and later.

    • kABBirthdayProperty

      kABBirthdayProperty

      Birth date (date).

      Available in OS X v10.2 and later.

    • kABOrganizationProperty

      kABOrganizationProperty

      Company name (string)

      Available in OS X v10.2 and later.

    • kABJobTitleProperty

      kABJobTitleProperty

      Job Title (string).

      Available in OS X v10.2 and later.

    • kABHomePageProperty

      kABHomePageProperty

      Home Web page (string). Deprecated in OS X version 10.4.

      Available in OS X v10.2 and later.

    • kABURLsProperty

      kABURLsProperty

      Web pages (multi-string).

      Available in OS X v10.4 and later.

    • kABCalendarURIsProperty

      kABCalendarURIsProperty

      Calendar URIs(multi-string).

      Available in OS X v10.5 and later.

    • kABEmailProperty

      kABEmailProperty

      email(s) (multi-string).

      Available in OS X v10.2 and later.

    • kABAddressProperty

      kABAddressProperty

      Street Addresses (multi-dictionary).

      Available in OS X v10.2 and later.

    • kABPhoneProperty

      kABPhoneProperty

      Generic phone number (multi-string).

      Available in OS X v10.2 and later.

    • kABInstantMessageProperty

      kABInstantMessageProperty

      Instant messaging ID.

      Available in OS X v10.7 and later.

    • kABAIMInstantProperty

      kABAIMInstantProperty

      AIM Instant Messaging (multi-string).

      Use the multivalue property kABInstantMessageProperty with an instant message service of kABInstantMessageServiceAIM instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.7.

    • kABJabberInstantProperty

      kABJabberInstantProperty

      Jabber Instant Messaging (multi-string).

      Use the multivalue property kABInstantMessageProperty with an instant message service of kABInstantMessageServiceJabber instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.7.

    • kABMSNInstantProperty

      kABMSNInstantProperty

      MSN Instant Messaging (multi-string).

      Use the multivalue property kABInstantMessageProperty with an instant message service of kABInstantMessageServiceMSN instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.7.

    • kABYahooInstantProperty

      kABYahooInstantProperty

      Yahoo Instant Messaging (multi-string).

      Use the multivalue property kABInstantMessageProperty with an instant message service of kABInstantMessageServiceYahoo instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.7.

    • kABICQInstantProperty

      kABICQInstantProperty

      ICQ Instant Messaging (multi-string).

      Use the multivalue property kABInstantMessageProperty with an instant message service of kABInstantMessageServiceICQ instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.7.

    • kABNoteProperty

      kABNoteProperty

      Note (string).

      Available in OS X v10.2 and later.

    • kABMiddleNameProperty

      kABMiddleNameProperty

      Middle name (string).

      Available in OS X v10.2 and later.

    • kABMiddleNamePhoneticProperty

      kABMiddleNamePhoneticProperty

      Middle name phonetic (string). Not supported in the AddressBook UI.

      Available in OS X v10.2 and later.

    • kABTitleProperty

      kABTitleProperty

      Title as in “Sir”, “Duke”, “General”, “Cardinal”, or “Lord” (string). Not supported in the AddressBook UI.

      Available in OS X v10.2 and later.

    • kABSuffixProperty

      kABSuffixProperty

      Suffix as in “Sr.”, “Jr.”, “III”, or “Esq.” (string). Not supported in the AddressBook UI.

      Available in OS X v10.2 and later.

    • kABNicknameProperty

      kABNicknameProperty

      Nickname (string).

      Available in OS X v10.2 and later.

    • kABMaidenNameProperty

      kABMaidenNameProperty

      Maiden name (string).

      Available in OS X v10.2 and later.

    • kABOtherDatesProperty

      kABOtherDatesProperty

      Dates associated with a person (ABMultiDateProperty containing dates).

      Available in OS X v10.3 and later.

    • kABRelatedNamesProperty

      kABRelatedNamesProperty

      Names of people related to a person (ABMultiStringProperty containing names).

      Available in OS X v10.3 and later.

    • kABDepartmentProperty

      kABDepartmentProperty

      Department name (string).

      Available in OS X v10.3 and later.

    • kABPersonFlags

      kABPersonFlags

      Property that specifies the name ordering and user configuration of a record in the Address Book application.

      Available in OS X v10.3 and later.

  • The ABPersonFlags property is used to access the following settings:

    Declaration

    Swift

    var kABShowAsPerson: Int32 { get } var kABShowAsCompany: Int32 { get } var kABShowAsMask: Int32 { get } var kABDefaultNameOrdering: Int32 { get } var kABFirstNameFirst: Int32 { get } var kABLastNameFirst: Int32 { get } var kABNameOrderingMask: Int32 { get }

    Objective-C

    #define kABShowAsPerson 000000 #define kABShowAsCompany 000001 #define kABShowAsMask 000007 #define kABDefaultNameOrdering 000000 #define kABFirstNameFirst 000040 #define kABLastNameFirst 000020 #define kABNameOrderingMask 000070

    Constants

    • kABShowAsPerson

      kABShowAsPerson

      Record is displayed as a person.

      Available in OS X v10.3 and later.

    • kABShowAsCompany

      kABShowAsCompany

      Record is displayed as a company.

      Available in OS X v10.3 and later.

    • kABShowAsMask

      kABShowAsMask

      Used in conjunction with kABShowAsPerson and kABShowAsCompany to determine record configuration.

      Available in OS X v10.3 and later.

    • kABDefaultNameOrdering

      kABDefaultNameOrdering

      Default name ordering (whether a person’s first name or last name is displayed first) in the Address Book application.

      Available in OS X v10.3 and later.

    • kABFirstNameFirst

      kABFirstNameFirst

      First name is displayed first in Address Book.

      Available in OS X v10.3 and later.

    • kABLastNameFirst

      kABLastNameFirst

      Last name is displayed first in Address Book.

      Available in OS X v10.3 and later.

    • kABNameOrderingMask

      kABNameOrderingMask

      Used in conjunction with kABDefaultNameOrdering, kABFirstNameFirst, and kABLastNameFirst to determine name ordering.

      Available in OS X v10.3 and later.

    Availability

    Available in OS X v10.3 and later.

  • Labels used by the email property.

    Declaration

    Swift

    let kABEmailWorkLabel: String let kABEmailHomeLabel: String

    Objective-C

    CFStringRef kABEmailWorkLabel; CFStringRef kABEmailHomeLabel;

    Constants

    • kABEmailWorkLabel

      kABEmailWorkLabel

      Work email.

      Available in OS X v10.2 and later.

    • kABEmailHomeLabel

      kABEmailHomeLabel

      Home email.

      Available in OS X v10.2 and later.

  • Labels used by the address property.

    Declaration

    Swift

    let kABAddressWorkLabel: String let kABAddressHomeLabel: String

    Objective-C

    CFStringRef kABAddressWorkLabel; CFStringRef kABAddressHomeLabel;

    Constants

    • kABAddressWorkLabel

      kABAddressWorkLabel

      Work address.

      Available in OS X v10.2 and later.

    • kABAddressHomeLabel

      kABAddressHomeLabel

      Home address.

      Available in OS X v10.2 and later.

  • Keys used by the address property.

    Declaration

    Swift

    let kABAddressStreetKey: String let kABAddressCityKey: String let kABAddressStateKey: String let kABAddressZIPKey: String let kABAddressCountryKey: String let kABAddressCountryCodeKey: String

    Objective-C

    CFStringRef kABAddressStreetKey; CFStringRef kABAddressCityKey; CFStringRef kABAddressStateKey; CFStringRef kABAddressZIPKey; CFStringRef kABAddressCountryKey; CFStringRef kABAddressCountryCodeKey;

    Constants

    • kABAddressStreetKey

      kABAddressStreetKey

      Street (string).

      Available in OS X v10.2 and later.

    • kABAddressCityKey

      kABAddressCityKey

      City (string).

      Available in OS X v10.2 and later.

    • kABAddressStateKey

      kABAddressStateKey

      State (string).

      Available in OS X v10.2 and later.

    • kABAddressZIPKey

      kABAddressZIPKey

      Zip (string).

      Available in OS X v10.2 and later.

    • kABAddressCountryKey

      kABAddressCountryKey

      Country (string).

      Available in OS X v10.2 and later.

    • kABAddressCountryCodeKey

      kABAddressCountryCodeKey

      Country Code (string).

      Available in OS X v10.2 and later.

  • Labels used by the phone property.

    Declaration

    Swift

    let kABPhoneWorkLabel: String let kABPhoneHomeLabel: String let kABPhoneMobileLabel: String let kABPhoneMainLabel: String let kABPhoneHomeFAXLabel: String let kABPhoneWorkFAXLabel: String let kABPhonePagerLabel: String

    Objective-C

    CFStringRef kABPhoneWorkLabel; CFStringRef kABPhoneHomeLabel; CFStringRef kABPhoneMobileLabel; CFStringRef kABPhoneMainLabel; CFStringRef kABPhoneHomeFAXLabel; CFStringRef kABPhoneWorkFAXLabel; CFStringRef kABPhonePagerLabel;

    Constants

    • kABPhoneWorkLabel

      kABPhoneWorkLabel

      Work phone.

      Available in OS X v10.2 and later.

    • kABPhoneHomeLabel

      kABPhoneHomeLabel

      Home phone.

      Available in OS X v10.2 and later.

    • kABPhoneMobileLabel

      kABPhoneMobileLabel

      Cell phone.

      Available in OS X v10.2 and later.

    • kABPhoneMainLabel

      kABPhoneMainLabel

      Main phone.

      Available in OS X v10.2 and later.

    • kABPhoneHomeFAXLabel

      kABPhoneHomeFAXLabel

      FAX number.

      Available in OS X v10.2 and later.

    • kABPhoneWorkFAXLabel

      kABPhoneWorkFAXLabel

      FAX number.

      Available in OS X v10.2 and later.

    • kABPhonePagerLabel

      kABPhonePagerLabel

      Pager number.

      Available in OS X v10.2 and later.

  • Labels used by the kABURLsProperty property.

    Declaration

    Swift

    let kABHomePageLabel: String

    Objective-C

    CFStringRef kABHomePageLabel;

    Constants

    • kABHomePageLabel

      kABHomePageLabel

      Web page URL.

      Use the kABURLsProperty multivalue property with the label kABHomePageLabel instead.

      Available in OS X v10.4 and later.

  • Labels used by the related-names property.

    Declaration

    Swift

    let kABMotherLabel: String let kABFatherLabel: String let kABParentLabel: String let kABSisterLabel: String let kABBrotherLabel: String let kABChildLabel: String let kABFriendLabel: String let kABSpouseLabel: String let kABPartnerLabel: String let kABAssistantLabel: String let kABManagerLabel: String

    Objective-C

    CFStringRef kABMotherLabel; CFStringRef kABFatherLabel; CFStringRef kABParentLabel; CFStringRef kABSisterLabel; CFStringRef kABBrotherLabel; CFStringRef kABChildLabel; CFStringRef kABFriendLabel; CFStringRef kABSpouseLabel; CFStringRef kABPartnerLabel; CFStringRef kABAssistantLabel; CFStringRef kABManagerLabel;

    Constants

    • kABMotherLabel

      kABMotherLabel

      Mother.

      Available in OS X v10.3 and later.

    • kABFatherLabel

      kABFatherLabel

      Father.

      Available in OS X v10.3 and later.

    • kABParentLabel

      kABParentLabel

      Parent.

      Available in OS X v10.3 and later.

    • kABSisterLabel

      kABSisterLabel

      Sister.

      Available in OS X v10.3 and later.

    • kABBrotherLabel

      kABBrotherLabel

      Brother.

      Available in OS X v10.3 and later.

    • kABChildLabel

      kABChildLabel

      Child.

      Available in OS X v10.3 and later.

    • kABFriendLabel

      kABFriendLabel

      Friend.

      Available in OS X v10.3 and later.

    • kABSpouseLabel

      kABSpouseLabel

      Spouse.

      Available in OS X v10.3 and later.

    • kABPartnerLabel

      kABPartnerLabel

      Partner.

      Available in OS X v10.3 and later.

    • kABAssistantLabel

      kABAssistantLabel

      Assistant

      Available in OS X v10.3 and later.

    • kABManagerLabel

      kABManagerLabel

      Manager.

      Available in OS X v10.3 and later.

    Availability

    Available in OS X v10.3 and later.

  • Labels used by the AIM instance property.

    Declaration

    Objective-C

    CFStringRef kABAIMWorkLabel; CFStringRef kABAIMHomeLabel;

    Constants

  • Labels used by the Jabber instance property.

    Declaration

    Objective-C

    CFStringRef kABJabberWorkLabel; CFStringRef kABJabberHomeLabel;

    Constants

  • Labels used by the MSN instance property.

    Declaration

    Objective-C

    CFStringRef kABMSNWorkLabel; CFStringRef kABMSNHomeLabel;

    Constants

  • Labels used by the Yahoo instance property.

    Declaration

    Objective-C

    CFStringRef kABYahooWorkLabel; CFStringRef kABYahooHomeLabel;

    Constants

  • Labels used by the ICQ instance property.

    Declaration

    Objective-C

    CFStringRef kABICQWorkLabel; CFStringRef kABICQHomeLabel;

    Constants

  • The keys used to specify the different fields in a kABInstantMessageProperty. Neither developers nor users can add more keys.

    Declaration

    Swift

    let kABInstantMessageUsernameKey: String let kABInstantMessageServiceKey: String

    Objective-C

    NSString * const kABInstantMessageUsernameKey; NSString * const kABInstantMessageServiceKey;

    Constants

    • kABInstantMessageUsernameKey

      kABInstantMessageUsernameKey

      The instant messaging username or handle.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceKey

      kABInstantMessageServiceKey

      The instant messaging service.

      Available in OS X v10.7 and later.

  • The predefined constants used to identify instant messaging services. You may use these constants or any other string.

    Declaration

    Swift

    let kABInstantMessageServiceAIM: String let kABInstantMessageServiceFacebook: String let kABInstantMessageServiceGaduGadu: String let kABInstantMessageServiceGoogleTalk: String let kABInstantMessageServiceICQ: String let kABInstantMessageServiceJabber: String let kABInstantMessageServiceMSN: String let kABInstantMessageServiceQQ: String let kABInstantMessageServiceSkype: String let kABInstantMessageServiceYahoo: String

    Objective-C

    CFStringRef kABInstantMessageServiceAIM; CFStringRef kABInstantMessageServiceFacebook; CFStringRef kABInstantMessageServiceGaduGadu; CFStringRef kABInstantMessageServiceGoogleTalk; CFStringRef kABInstantMessageServiceICQ; CFStringRef kABInstantMessageServiceJabber; CFStringRef kABInstantMessageServiceMSN; CFStringRef kABInstantMessageServiceQQ; CFStringRef kABInstantMessageServiceSkype; CFStringRef kABInstantMessageServiceYahoo;

    Constants

    • kABInstantMessageServiceAIM

      kABInstantMessageServiceAIM

      AOL Instant Messenger.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceFacebook

      kABInstantMessageServiceFacebook

      Facebook.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceGaduGadu

      kABInstantMessageServiceGaduGadu

      Gadu-Gadu.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceGoogleTalk

      kABInstantMessageServiceGoogleTalk

      Google Talk.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceICQ

      kABInstantMessageServiceICQ

      ICQ.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceJabber

      kABInstantMessageServiceJabber

      Jabber.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceMSN

      kABInstantMessageServiceMSN

      MSN.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceQQ

      kABInstantMessageServiceQQ

      QQ.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceSkype

      kABInstantMessageServiceSkype

      Skype.

      Available in OS X v10.7 and later.

    • kABInstantMessageServiceYahoo

      kABInstantMessageServiceYahoo

      Yahoo!.

      Available in OS X v10.7 and later.

  • Labels for values contained in ABOtherDatesProperty multi-value properties.

    Declaration

    Swift

    let kABAnniversaryLabel: String

    Objective-C

    kABAnniversaryLabe l

    Constants

    • kABAnniversaryLabel

      kABAnniversaryLabel

      Anniversary date.

      Available in OS X v10.3 and later.

    Availability

    Available in OS X v10.3 and later.

  • Generic labels that may apply to any multi-value list property.

    Declaration

    Swift

    let kABWorkLabel: String let kABHomeLabel: String let kABOtherLabel: String let kABMobileMeLabel: String

    Objective-C

    CFStringRef kABWorkLabel; CFStringRef kABHomeLabel; CFStringRef kABOtherLabel; CFStringRef kABMobileMeLabel;

    Constants

    • kABWorkLabel

      kABWorkLabel

      All kABXXXXWorkLabel constants are equivalent to this label.

      Available in OS X v10.2 and later.

    • kABHomeLabel

      kABHomeLabel

      All kABXXXXHomeLabel constants are equivalent to this label.

      Available in OS X v10.2 and later.

    • kABOtherLabel

      kABOtherLabel

      Can be used with any multi-value property.

      Available in OS X v10.2 and later.

    • kABMobileMeLabel

      kABMobileMeLabel

      MobileMe instant messager or email values.

      Available in OS X v10.7 and later.

  • Constants used to indicate a specific type of record.

    Declaration

    Objective-C

    CFStringRef kABPersonRecordType;

    Constants

    • kABPersonRecordType

      kABPersonRecordType

      Indicates record of an ABPerson object.