views:

261

answers:

1

hi all, i am able to get the phone no of any contact from following code

NSLog(@"%@",ABMultiValueCopyValueAtIndex(ABRecordCopyValue(ref,kABPersonPhoneProperty) ,0));
        NSLog(@"%@",ABMultiValueCopyValueAtIndex(ABRecordCopyValue(ref,kABPersonPhoneProperty) ,1));
        NSLog(@"%@",ABMultiValueCopyValueAtIndex(ABRecordCopyValue(ref,kABPersonPhoneProperty) ,2));
        NSLog(@"%@",ABMultiValueCopyValueAtIndex(ABRecordCopyValue(ref,kABPersonPhoneProperty) ,3));
        NSLog(@"%@",ABMultiValueCopyValueAtIndex(ABRecordCopyValue(ref,kABPersonPhoneProperty) ,4));

but from above code i does not identify which phone number is related to which one (for ex- mobile, home, main, iPhone etc).

Please suggest how can I identify the type of any number?

A: 

Try ABMultiValueCopyLabelAtIndex, this will give you the type of the phone number

Nick