CKFetchNotificationChangesOperation有时不会返回UPDATE,DELETE通知 [英] CKFetchNotificationChangesOperation sometimes does not return UPDATE, DELETE notifications
问题描述
CKFetchNotificationChangesOperation
返回INSERT操作,但并不总是UPDATE和DELETE。 DELETE,UPDATE在我向App Store提交应用程序时最后工作,但现在不再了。为什么?我创建了以下订阅:
CKFetchNotificationChangesOperation
returns INSERT operations, but UPDATE and DELETE, not always. DELETE, UPDATE worked last when I submitted app to App Store, but now not anymore. Why? I have created subscriptions like:
let s = CKSubscription(recordType: recordType, predicate: NSPredicate(value: true), options: .FiresOnRecordCreation | .FiresOnRecordUpdate | .FiresOnRecordDeletion)
s.notificationInfo = CKNotificationInfo()
subscriptionsToSave.append(s)
仪表板显示所有树触发器:
Dashboard shows all tree triggers:
我不使用任何 alertBody
,所以通知是这样的叫做无声通知,可原因吗?
I do not use any alertBody
, so notification is a so called silent notification, can it be the cause?
在 CloudKit提示和技巧讲师说,订阅需要从开发人员门户打开应用程序ID的APS功能。我不认为我有,但我只想要提取通知,只有在这种情况下才推送。
In CloudKit Tips and Tricks lecturer says that subscription needs APS capability for app ID turned on from the developer portal. I don't think I have, but I just want fetch notifications, push only if this works.
背景功能? - 同样
需要在app的信息plist中设置APS环境密钥。 - 我想我已经拥有它了。
Need to set up APS environment key in app's info plist. - I guess I have it.
推荐答案
我知道这个问题已经过时了,但对于那些Google搜索,请务必查看此内容关于通知不一致的全面帖子:
I know this question is old, but for those Googling, be sure to check out this thorough post on the inconsistency of notifications:
我发现了一个特别微妙的修复。
I found a particularly subtle fix that I mention here.
这篇关于CKFetchNotificationChangesOperation有时不会返回UPDATE,DELETE通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!