Search code examples
iosobjective-cswiftimport-contacts

Get only new/modified phone contacts from iPhone


I want to import all phone contacts into app first time only and save on server.

Second time wants to imports only new, modified and deleted contacts into an app and sync with contacts saved on the server which should be done according to created/modified date of contacts.

From iOS 9, Apple won't allow to get create/modified date using Contacts Framework

How can I achieve with better approach?


Solution

  • You can save contacts identifier and import date in local storage like SQLite. And when you receive contacts update notification, you can send saved date of respective updated contact and also update date in SQLite with received notification timestamp(date).