Contacts - ABRecordCopyValue

Discussion in 'iOS Apps' started by jjgraz, Mar 4, 2009.

  1. jjgraz macrumors regular


    Feb 13, 2009
    The code below is a snip of how we pull data out of contacts from a btn in our application and insert into a UILabel.(just like the example in the apple documentation) Pretty straight forward. How is the same thing done to pull the phone number out? We can pull the first & last name, but not the number....I'm sure it's very similar....Can't locate the answer though. Any help would be appreciated.

    NSString* name = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
    self.firstName.text = name;
    [name release];

    Thank you.
  2. PaulONeill macrumors newbie

    Mar 5, 2009
    Perth, Western Australia
    Hey jjgraz, check out this post I found relating to the Address Book and phone numbers:

    Hope it helps....

  3. jjgraz thread starter macrumors regular


    Feb 13, 2009
    Much appreciated. It's exactly what I'm after. Thanks again.

Share This Page