id value = [(id)ABRecordCopyValue(person, property) autorelease];
if (ABPersonGetTypeOfProperty(property) & kABMultiValueMask)
{
CFIndex index = ABMultiValueGetIndexForIdentifier(
(ABMultiValueRef)value, identifier);
value = [(id)ABMultiValueCopyValueAtIndex(
(ABMultiValueRef)value, index)
autorelease];
}
// show results to developer...
NSString* firstname = (NSString*)ABRecordCopyValue(
person, kABPersonFirstNameProperty);
NSLog(@" ~~~~~~~~~~~~~~~~~~~~ firstname is %@",firstname);
NSLog(@" ~~~~~~~~~~~~~~~~~~~~ field clicked on: %@", value);