ABPeoplePicker selecting many and returning array of emails

ios, ipad, iphone, objective-c

Solution

You can return `NO` for this delegate method:

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker 
shouldContinueAfterSelectingPerson:(ABRecordRef)person
{
    NSString* name = (__bridge_transfer NSString*)ABRecordCopyValue(person,
                      kABPersonFirstNameProperty);
    NSLog(@"Name %@", name);
    // Do stuff with the person record
    return NO;
}

This allows the user to select a number of people.

Problem

What I want to do: - Present the user with all the contacts on his device that have an email address in the contact. - Allow the user to select/deselect any number of contacts before hitting "done". - Return an array of the email addresses...or an array of dictionaries with all the contact info for the selected contacts. What I have tried: `ABPeoplePicker` but I am not able to get it to work with selecting multiple contacts.

Original source