If the user has several specified addresses - work, home, etc., you will need to use the identifier attribute to distinguish between them. What I get is selected from similar messages to email addresses:
#pragma mark - ABPeoplePickerNavigationControllerDelegate - (IBAction)chooseContact:(id)sender { ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; [self presentViewController:picker animated:YES completion:nil]; // [self dismissViewControllerAnimated:YES completion:nil]; } - (void) peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker { [self dismissViewControllerAnimated:YES completion:nil]; } - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person { return YES; } - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { if (property == kABPersonAddressProperty) { ABMultiValueRef addresses = ABRecordCopyValue(person, property); CFIndex addressIndex = ABMultiValueGetIndexForIdentifier(addresses, identifier); CFDictionaryRef address = ABMultiValueCopyValueAtIndex(addresses, addressIndex); // create address string to lookup NSString *street = (NSString*) CFDictionaryGetValue(address, kABPersonAddressStreetKey); NSString *city = (NSString*) CFDictionaryGetValue(address, kABPersonAddressCityKey); NSString *state = (NSString*) CFDictionaryGetValue(address, kABPersonAddressStateKey); NSString *postal = (NSString*) CFDictionaryGetValue(address, kABPersonAddressZIPKey); NSString *country = (NSString*) CFDictionaryGetValue(address, kABPersonAddressCountryKey); CFRelease(address); CFRelease(addresses); [self dismissViewControllerAnimated:YES completion:nil]; return NO; } return YES; }
.
source share