I have strange behavour of AddressBook framework. I'm creating and showing people picker controller this way:
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
NSArray *displayedItems = [NSArray arrayWithObjects:[NSNumber numberWithInt:kABPersonFirstNameProperty], [NSNumber numberWithInt:kABPersonLastNameProperty], nil];
picker.displayedProperties = displayedItems;
[self presentViewController: picker animated:YES completion: nil];
then in delegate I have the following:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
{
myPersonRec = person;
[self dismissViewControllerAnimated:YES completion: nil];
return NO;
}
later when I try to access myPersonRec properties, I can read only first name and last name (which were displayed in people picker), all other properties are nil. If I change return value to YES
, I'll get phone numbers and all stuff, but won't be able to get person's image anyway. What am I doing wrong?