【发布时间】:2015-07-19 07:42:38
【问题描述】:
更新通知停止工作。在 Apple 解决问题之前,您有什么解决方法?
CKFetchNotificationChangesOperation sometimes does not return UPDATE, DELETE notifications CloudKit push notifications on record update stopped working https://forums.developer.apple.com/thread/7288
我的快速修复,每分钟,当用户触发UIRefreshControl,然后我下载自上次更新以来修改的所有记录。有用。但我心里有个更好的主意,好奇,你怎么看。任何缺点。
我正在考虑将Change 表添加到数据库中。它将有一个recordName、recordType、changeType 字段。 changeType 可以有 insert、update、delete 字符串值。 (或相应的 int 枚举)
我将只使用CKSubscription 创建和观察Change 表。总是当在自定义表中创建、更新、删除记录时,我会做两件事,做那个动作,作为第二个动作,我会在Change 表中创建一个“日志条目” .因为它是Change 中的Insert 操作,并且插入通知似乎有效,所以所有设备都会收到通知。他们可以下载引用的记录。
你觉得有什么缺点吗?
【问题讨论】:
标签: ios cloudkit ckfetchrecordchangesopera ckfetchnotificationchange