0

I synced contacts between Contact app and my app in ABAddressBook framework compared with kABPersonModificationDateProperty.

But I can't find Contact's modification property API in CNContact Framework.

I have waited for iOS 12, some report it to apple, but is has not that kind of API.

Do you have any idea to sync contact between Contact app and my app?

dobiho
  • 1,025
  • 1
  • 11
  • 22

1 Answers1

1

you can fetch all contact via CNContact Framework - Save them into your coredata or any other local DB

  • Whenever contact changes it sent an notification

    NotificationCenter.default.addObserver( self, selector: #selector(contactStoreDidChange), name: .CNContactStoreDidChange, object: nil) }@objc func contactStoreDidChange(notification: NSNotification) {}

Replace your coredata data with new data

Bhargav Sejpal
  • 1,352
  • 16
  • 23