0

I want to ask about the address book framework on iPhone application. I have import the framework and .h in my class. However, I don't know how to retrieve all of the First name and last name in the address book and store it in the NSMutableArray. what is the problems in my code? Thank you very much.

NSArray *displayedItems = [NSArray arrayWithObjects:[NSNumber numberWithInt:kABPersonFirstNameProperty], [NSNumber numberWithInt:kABPersonLastNameProperty ], nil];
Wevah
  • 28,182
  • 7
  • 83
  • 72
Questions
  • 20,055
  • 29
  • 72
  • 101
  • You need to use ABPerson/ABRecord functions to actually get the values from the address book. Right now you're just storing the keys corresponding to those properties... – jtbandes Jul 27 '10 at 04:39
  • @jtbandes, thank you for your reply. Would you mind to show some code to me for refer? – Questions Jul 27 '10 at 06:14

1 Answers1

0

I found the answer in this post.

https://stackoverflow.com/questions/3341961/how-to-convent-the-cfarrayref-to-nsmutablearray-or-nsarray

Community
  • 1
  • 1
Questions
  • 20,055
  • 29
  • 72
  • 101