Contacts - ABRecordCopyValue

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

  1. jjgraz macrumors regular

    jjgraz

    Joined:
    Feb 13, 2009
    #1
    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

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

    http://www.iphonedevsdk.com/forum/i...503-retrieving-phone-number-address-book.html

    Hope it helps....

     
  3. jjgraz thread starter macrumors regular

    jjgraz

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

Share This Page