2

I was working with AddressBook Framework. The requirement is to save some contacts selected from AddressBook and the saved contacts will be edited some later times. So I used ABRecordGetRecordID(ABRecordRef record) method to get the unique identifier to the AddressBook record. Complete code is added below.

ABAddressBookRef addressBook  = ABAddressBookCreateWithOptions(NULL, error);
CFArrayRef allPeople          = ABAddressBookCopyArrayOfAllPeople(addressBook);

// Started looping in allPeople... loopCount=> looping variable

ABRecordRef person            = CFArrayGetValueAtIndex(allPeople, loopCount)
// Fetching the unique id to the contact 
CFIndex uniqueId              = ABRecordGetRecordID(person);

And the issue is, this uniqueId is changed after I synced my contacts with iCloud.

Is that a bug in the implementation of iOS AddressBook of do i need to update something in my code ???

or

Please refer me some other idea to uniquely identify an individual contact record in AddressBook iOS.

Alex Andrews
  • 1,498
  • 2
  • 19
  • 33
  • 1
    There doesn't appear to be a long term persistent unique ID! http://stackoverflow.com/questions/14763688/keeping-a-long-term-reference-to-an-ios-addressbook-entry – john elemans Nov 04 '15 at 19:06

0 Answers0