I need to be able to identify a CNContact so as to associate it with a CKRecord in a iCloud private database. If I use a non-unified contact, would the identifier be unique across all existing iOS devices so that I could store the identifier property in a record in the user's iCloud private database to identify a specific contact? The documentation says that the identifier of a CNContact stored object is unique within the device.
If I use a UUID value and store it in the iCloud private database to identify the specific contact, how would I match that with the contact? I would need to save that UUID value as part of the contact object as stored in the contact store. Is that possible without saving the UUID value in the notes property of the contact. It would be better if I could store the UUID value somewhere where the user could not access it and delete or edit it. Is there a way to make the notes property of a contact inaccessible to the user where even if he/she could see it, he would not be able to change it?
I'm not very familiar with the hash and hashValue properties of NSObject object. Though unlikely, would one of those properties be able to identify a contact uniquely across all existing iOS devices so that I could store it in the user's iCloud private database in order to associate a certain record in that database with a specific contact?