Search code examples
iphoneobjective-ciosipadaddressbook

Unique Record Identifier of Addressbook contact + SQLite database


I am developing one application that requires records from Addressbook, I need all details of contact, plus I am using google service to get lat-long of contact address and storing this details to SQLite.

Now the questions are:
1). Which one is better option, storing unique record identifier of contact in SQLite or storing all details of contact?
2). If your answer is identifier then will this unique record identifier refer the same record every time?


Solution

  • 1). Which one is better option, storing unique record identifier of contact in SQLite or storing all details of contact?

    I would say there is no need to store the whole data, since that is already stored in the device, so a simple identifier will do.

    2). If your answer is identifier then will this unique record identifier refer the same record every time?

    Yes, it must refer to the same record every time, which is why it is a unique identifier.

    Additionally I would recommend reading the section of unique identifiers in the AddressBook framework directly from the source: Apple Address Book Programming Guide

    Hope that helps.