I'm not finding Apple's documentation very helpful for actually getting data with a people picker, and there doesn't seem to be much other information on the internet :( I assume I need to get the email in this function:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
{
}
What can I put in there to get the email of the selected person?
Kal answer is actually inaccurate - namely because "ABMultiValueCopyValueAtIndex" takes an index not identifier.
Identifier value is static (like enumeration)
So it will crash when the person selected only have 1 email stored, which is a "Work Email". Since the identifier is "1", but we need index "0".
Luckily we can use following to get the index:
Code:
Use
After that, you can use the ABMultiValueRefs API method calls to get email address.
EDIT -- This should give you email