Mac Developer Library


Address Book C Framework Reference for Mac ABMultiValue C Reference

Deployment Target:

On This Page

ABMultiValue C Reference

The ABMultiValue and ABMutableMultiValue opaque types are used to represent properties that might have multiple values. Each value in a multi-value list must be the same type, and has an associated pre-defined or user-defined label, and unique identifier. The labels, however, need not be unique. For example, you can have multiple “Home” phone numbers. Each multi-value object may have a primary identifier—used to lookup a default value when a label is not provided. For example, a person record may have multiple addresses with the labels “Home” and “Work”, where “Work” is designated as the primary value. Instances of this class are immutable, see ABMutableMultiValue for functions that manipulate the content of a multi-value list.

You can access values using a numeric index (similar to an array). Use the ABMultiValueCopyIdentifierAtIndex function to get an identifier, the ABMultiValueCopyLabelAtIndex function to get a label, and the ABMultiValueCopyValueAtIndex function to get a value. However, a numeric index is temporary since a multi-value list may change. Each value or entry in a multi-value list has a unique identifier which can be used to save a reference to a specific value—the identifier is guaranteed never to change.

Use the ABMultiValueCopyPrimaryIdentifier function to get the primary identifier (the identifier associated with the primary value).

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


Data Types

  • A reference to an ABMultiValue or ABMutableMultiValue object.



    typealias ABMultiValueRef = ABMultiValue


    typedef const struct __ABMultiValue *ABMultiValueRef;

    Import Statement


    @import AddressBook;


    import AddressBook


    Available in OS X v10.2 and later.