简体   繁体   English

如何检索EKEventStoreChanged通知中已更改的事件

[英]How to retrieve events that has been changed in EKEventStoreChanged notification

I have listened for the notification and whenever there is a modification or change, I am synchronising all the events to the local db. 我已经收听了通知,每当有修改或更改时,我都会将所有事件同步到本地数据库。 But the problem I have is to know whether I can retrieve only the modified events. 但我遇到的问题是要知道我是否只能检索修改过的事件。 This is the EKStoreChanged notification's Userinfo, 这是EKStoreChanged通知的Userinfo,

     "x-apple-eventkit:///Event/p1003",
     "x-apple-eventkit:///Location/p60",
     "x-apple-eventkit:///Location/p61",
     "x-apple-eventkit:///Location/p59",
     "x-apple-eventkit:///Event/p1004",
     "x-apple-eventkit:///Event/p1005"

Is it possible to know which event has been changed, or whether it has been deleted? 是否可以知道哪个事件已被更改,或者是否已被删除?

From apple's documentation: 来自apple的文档:

Posted whenever changes are made to the Calendar database, including adding, removing, and changing events or reminders. 每当对日历数据库进行更改时发布,包括添加,删除和更改事件或提醒。 Individual changes are not described . 没有描述个别变化

So, you need to fetch each entry to known wether it has changed or not. 因此,您需要将每个条目提取到已知已更改的条目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有EKEventStoreChanged通知的NotificationCenter多次调用了不同的通知 - NotificationCenter with EKEventStoreChanged notification called multiple times with different notifications 更改文本字段后如何移动滑块? - How to move slider when textfield has been changed? IOS如何判断沙箱已被更改(设备越狱) - IOS how to judge sandbox has been changed (device jailbreak) 创建通知场景后,如何将其添加到WatchKit目标? - How to add a Notification Scene to WatchKit target after it has been created? 如何知道是否已显示推送通知权限警报 - How to know if the push notification permission alert has already been shown 如果已打开通知,如何直接转到特定的View Controller - How to go directly to a specific View Controller if Notification has been opened 如何判断收到了哪些本地通知? 目标 - C. - How to tell which local notification has been received? Objective - C 我如何知道该应用在后台被杀死后是否已从本地通知中打开? - How can I know if the app has been opened from a local notification after it has been killed in the background? 确定数据库是否已更改的最佳方法? - Best way to determine if a database has been changed? 取消已安排的本地通知 - Cancel a local notification which has been scheduled
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM