Someone else here on Stackoverflow posted a way to obtain a user selected phone number from the contacts list. Could be done for email addresses and if so, how do I do it? Here is the code:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
{
if (property == kABPersonPhoneProperty) {
ABMultiValueRef multiPhones = ABRecordCopyValue(person, kABPersonPhoneProperty);
for(CFIndex i = 0; i < ABMultiValueGetCount(multiPhones); i++) {
if(identifier == ABMultiValueGetIdentifierAtIndex (multiPhones, i)) {
CFStringRef phoneNumberRef = ABMultiValueCopyValueAtIndex(multiPhones, i);
CFRelease(multiPhones);
NSString *phoneNumber = (__bridge NSString *) phoneNumberRef;
CFRelease(phoneNumberRef);
_contactNumber.text = [NSString stringWithFormat:@"%@", phoneNumber];
}
}
}
[self dismissViewControllerAnimated:YES completion:nil];
return NO;
}
Here is the link to the post: How do you get a persons phone number from the address book?