CNContact上次修改日期和联系人已更改 [英] CNContact last modified date and contacts changed

查看:192
本文介绍了CNContact上次修改日期和联系人已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:


  1. 如何获取CNContact中的最后修改日期(新的苹果联系人)框架)?

    keysToFetch中没有最后修改日期

  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

我想获取和更新有联系人的联系人自我上次获取以来被修改过。我怎么能这样做?

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


推荐答案

根据Apple员工的回复,现在没有api。
https://forums.developer.apple.com/thread/16049

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.

希望此帮助。

这篇关于CNContact上次修改日期和联系人已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆