Function

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.

Declaration

CFIndex ABAddPropertiesAndTypes(ABAddressBookRef addressBook, CFStringRef recordType, CFDictionaryRef propertiesAndTypes);

Parameters

addressBook

The address book for the logged-in user.

recordType

The record type you wish to add properties to: kABGroupRecordType or kABPersonRecordType.

propertiesAndTypes

A CFDictionary object containing the properties to add. In each dictionary entry, the key is a string with the property’s name, and the value is a constant with the property’s type. The property’s name must be unique. You may want to use Java-style package names for your properties, for example, "org.dogclub.dogname" or "com.mycompany.customerID". The property type must be one of the constants described in ABPropertyType.

Return Value

The number of properties successfully added.

See Also

Properties

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.