iphone-sdk-4.1abrecordref

Store array of ABRecordRef


How can we store and access a list of ABRecordRef so that we can use this in another class and later on?


Solution

  • You can get recordId from the record of type ABRecordRef from addressBook Then convert it into NSString. Store it in NSUserDefaults

    When you want to fetch the record...

    fetch that recordId from NSUserDefaults,Convert it in integer

    then use

        ABRecordRef myRecord =
     ABAddressBookGetPersonWithRecordID(addressBook, recordId);
    

    So you will get the record which you saved earlier.