Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CNContact last modified date and contacts changed

Tags:

ios

cncontact

Questions:

  1. How to get the last modified date in CNContact (new apple contacts framework) ?
    The last modified date is not present in the list of keysToFetch

  2. I would like to fetch and update contacts that have been modified since my last fetch. How can I do this ?

like image 841
user1046037 Avatar asked Oct 18 '15 01:10

user1046037


1 Answers

According to the Apple Staff reply, no api for that right now. https://forums.developer.apple.com/thread/16049

To perform nearly the same thing, I would suggest using

enumerateContactsWithFetchRequest:error:usingBlock:

Assuming an individual contact is identified by name, when the name field remain the same but other infos are changed, we can say the contact is updated. If you concern about the performance, do it on a background queue.

Hope this help.

like image 124
MatthewLuiHK Avatar answered Oct 22 '22 19:10

MatthewLuiHK