Function

ABRecordSetValue

Sets the value of a given property for a record.

Declaration

iOS
bool ABRecordSetValue(ABRecordRef record, ABPropertyID property, CFTypeRef value, CFErrorRef *error);
macOS
bool ABRecordSetValue(ABRecordRef record, CFStringRef property, CFTypeRef value);

Parameters

record

The record you wish to modify.

property

The property whose value you wish to set. May be a pre-defined or program-defined property. See Common Properties for a list of properties all records have, and specific ABRecord derived opaque types for any additional properties. If NULL, this function raises an exception.

value

The new value for property in record. If NULL or not the correct type, this function raises an exception.

Return Value

If property is a multi-value list property, this method checks to see if the values in the multi-value list are the same type. If the multi-value list contains mixed types, this method returns false. Returns true if successful, false otherwise.

See Also

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.

ABRemoveRecord

Removes the specified record from the Address Book database.