I know how to get the phone number from an ABRecordRef
, but what I want now is to also get the type of the number, i.e. its label as a string:
const CFStringRef kABPersonPhoneIPhoneLabel;
const CFStringRef kABPersonPhoneMainLabel;
const CFStringRef kABPersonPhoneHomeFAXLabel;
const CFStringRef kABPersonPhoneWorkFAXLabel;
const CFStringRef kABPersonPhonePagerLabel;
Here is how I get the numbers:
//get all phone numbers
NSArray *phoneNumbersArray = (NSArray*)ABMultiValueCopyArrayOfAllValues(phoneNumberProperty);
NSInteger numbersCounter = 0;
for(numbersCounter = 0; numbersCounter < [phoneNumbersArray count]; numbersCounter++)
{
NSString currentPhoneNumber = [phoneNumbersArray objectAtIndex:indexPhoneNumber];
// here i would like to read the type of phone number
// NSLog(@"NumberType:%@",numberType);
}
I tried all sorts of things and I've read the ABPerson Reference and I don't know how to get the phone number type?
I have figure out how to read the localized label of the phone number