Sometimes we do not get other label's contact number from the iPhone device. We only get "Mobile" labelled number or "iPhone" labelled number. Here is the code to get all type of labels contacts from an iPhone device.
Inside the loop where we have getContactsWithAddressBook function:-
use this code:-
NSString* mobileLabel;
for(CFIndex i = 0; i < ABMultiValueGetCount(phones); i++) {
mobileLabel = (__bridge NSString*)ABMultiValueCopyValueAtIndex(phones, i);
NSLog(@"%@",mobileLabel);}
Happy Coding :)
0 Comment(s)