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 3782340
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:04:09+00:00 2026-05-19T11:04:09+00:00

I have an app that displays ABAddressBook contacts in a UITableView . Currently I’m

  • 0

I have an app that displays ABAddressBook contacts in a UITableView. Currently I’m reading the contacts into an NSDictionary, however this appears to crash for some users, which I suspect is a memory issue.

Is there another approach to display ABAddressBook contacts in a UITableView without either first storing them in an NSDictionary or using ABPeoplePicker?

  • 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-05-19T11:04:10+00:00Added an answer on May 19, 2026 at 11:04 am

    You can use following way,

    ABAddressBookRef ab = ABAddressBookCreateWithOptions(NULL, NULL);
    NSArray *arrTemp = (NSArray *)ABAddressBookCopyArrayOfAllPeople(ab);
    

    The above 2 lines will create an array for all your contacts on the iPhone.

    Now whatever property of a contact you want to display you can display by using the below code. For example, I want to display the first name of all contacts and then create one Mutable array called it arrContact.

    NSMutableArray *arrContact = [[NSMutableArray alloc] init];
    for (int i = 0; i < [arrTemp count]; i++) 
    {
        NSMutableDictionary *dicContact = [[NSMutableDictionary alloc] init];
        NSString *str = (NSString *) ABRecordCopyValue([arrTemp objectAtIndex:i], kABPersonFirstNameProperty);
        @try 
        {
            [dicContact setObject:str forKey:@"name"];
        }
        @catch (NSException * e) {
            [dicContact release];
            continue;
        }
        [arrContact addObject:dicContact];
        [dicContact release];
    }
    

    Now just display it using the arrContact array in a table view..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an App that downloads and displays images from URL's. This works fine
I have developed a simple app that contains a UITableView that displays data, and
Ok, currently I have a view in my android app that displays a list
I have an app that displays transcripts, something like this myapp.com/transcript/1234 The transcripts are
I currently have an app that displays the time. I want to change the
I have a UITableView in my app that displays some Location objects which I
I have an App that displays thousands of Pin annotations on a google map
I have an app that displays a splash screen. The splash screen activity creates
I have an app that displays 9 UIImageViews, and I'm adding in the ability
I have an app that displays 9 UIImageViews, and I'm trying to add in

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.