How to add the record to the address book?

Discussion in 'iOS Programming' started by lizhuo, Apr 26, 2011.

  1. lizhuo, Apr 26, 2011
    Last edited by a moderator: Apr 26, 2011

    macrumors newbie

    Joined:
    Apr 26, 2011
    Location:
    China
    #1
    In XCode, there are nothing records in Address Book.

    So, how to add the record to the address book? Would some one pls give the
    sample about it?
    If we use the ABAddressBookAddRecord: method,

    bool ABAddressBookAddRecord (
    ABAddressBookRef addressBook,
    ABRecordRef record,
    CFErrorRef *error
    );

    What should I do to give the references of this method?

    Thank you.

    EDIT:

    I create a address book and some record. Then add the record to the address book. After all of these, called ABAddressBookSave: method.
    I have added the record successfully. But after I reset the Xcode simulater, I found that the record ,I added before, also in the address book.
    So how to clear the address book?
    Thanks.
     

Share This Page