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.