Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8684951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:26:12+00:00 2026-06-12T22:26:12+00:00

I have strange behavour of AddressBook framework. I’m creating and showing people picker controller

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:26:13+00:00Added an answer on June 12, 2026 at 10:26 pm

    Problem source was found:

    ABPerson object is not loaded into memory whole at once. It is loaded partially and new fields or image are loaded when needed, and to be loaded properly, this object should be tied to an exististing ABAddressBook instance. When I used person picker viewcontroller, it referenced to it’s own ABAddressBook instance that was released after picker was dismissed, so I wasn’t able to get any new data after viewcontroller dismissal (but entries which were loaded earlier still were accessible).

    To solve this problem I’ve created an ABAddressBook shared instance in my model class singleton, and use it whenever I need. Since I’m only reading from address book, it should be fine solution.

    So, picker creating code should look like this finally:

    ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;
    NSArray *displayedItems = [NSArray arrayWithObjects:[NSNumber numberWithInt:kABPersonFirstNameProperty], [NSNumber numberWithInt:kABPersonLastNameProperty], nil];
    picker.displayedProperties = displayedItems;
    picker.addressBook = [[MyModel instance] sharedAddressBookRef];
    [self presentViewController: picker animated:YES completion: nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why this two functions have the strange behaviour of when I click on thead,
I'm hacking my way through learning Flex and have found some strange behaviour. When
I have a strange behaviour when autowiring I have a similar code like this
I have this strange behaviour in VS2010 where any modifications I make to keyboard
I have this strange behaviour in IE9 where, when I change the border-color of
I'm seeing a strange behaviour, hopefully someone out there can explain this. I have
I found some strange(for me) behavour in MySQL. I have a simple query: SELECT
I have a strange behaviour, maybe I'm missing something. I have this DOM element
This is a very strange behaviour. If I have something like this (time interval
I have a strange behaviour of my phonegap app on Android. I'm using this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.