You must save three values: record identifier, first name and last name.
1) In case the record identifier has not changed, you are golden - just use this to find the record you need.
2) If ABAddressBookGetPersonWithRecordID() does not find the record for your saved record identifier (it returns NULL), you will need to search for the personโs records to match based on name and surname. You can opt out of using ABAddressBookCopyPeopleWithName() potentially or write your own location code if you already have an array with all the faces in memory. Finding a new record is up to you. To find a new record, you can update the data store with a new record identifier.
Ultimately, you end up saving the record ID so you can use it directly if it doesn't change (if you're lucky), and also save some keys from the address book entry that are unlikely to be changed. The name of the person or organization associated with the address book entry is likely to change. Of course, you should consider the case when you cannot find a record with a stored record identifier or by searching for a name. This may trivially mean that the record has been deleted, or it may mean that the record has been renamed. You must handle this case, whichever way you choose, is best for your specific application.
source share