Try iterating thru a contact's phone numbers (the kABPersonPhoneProperty
multivalue), using CFBridgingRelease
:
// Access the person's phone numbers (an ABMultiValueRef)
ABMultiValueRef phoneProperty = ABRecordCopyValue(person, kABPersonPhoneProperty);
if (phoneProperty)
{
// Iterate through the phone multivalue
for (CFIndex index = 0; index < ABMultiValueGetCount(phoneProperty); index++)
{
// Get the phone identifier for this phone property
ABMultiValueIdentifier phoneIdentifier = ABMultiValueGetIdentifierAtIndex(phoneProperty, index);
// Get the phone number
NSString *phoneNumber = CFBridgingRelease(ABMultiValueCopyValueAtIndex(phoneProperty, index));
}
}