Search code examples
objective-ciosaddressbookuniqueidentifierabaddressbook

Is there a "uniqueID" type property for address book contacts?


I'm making a game involving the user's contacts, but need a way to uniquely identify each contact. This is because the user can easily change the name, phone number, or other property of a given contact. Is there a way to do this?


Solution

  • You can use ABRecordGetRecordID() to get the unique ID of a record. It returns an ABRecordID which is a typedef for int32_t.