我正在使用公共数据库.
当我使用相同的用户(相同的iCloud帐户)进行测试时,我会收到通知.
如果我使用其他用户(不同的iCloud帐户),我不会收到通知.
订阅是否仅适用于同一用户的设备之间?
以下是描述订阅的文档:
Use a CKSubscription object to track changes occurring on the server.
A subscription acts like a persistent query on the server that can
track the creation,deletion,and modification of records. When
changes occur,they trigger the delivery of push notifications so that
your app can respond appropriately.
无论哪个用户编辑记录,我都希望收到通知,而订阅谓词仍应匹配.
UPDATE
*每个用户都有一个具有相同谓词的订阅,主要关注具有特定属性值的单个recordType.
此订阅的有效负载仅用于推送shouldSendContentAvailable = YES.
文件内容如下:
When this property is YES,the server includes the content-available
flag in the push notification’s payload. That flag causes the system
to wake or launch an app that is not currently running. The app is
then given background execution time to download any data related to
the push notification,such as the set of records that changed. If the
app is already running in the foreground,the inclusion of this flag
has no additional effect and the notification is delivered to the app
delegate for processing as usual.
recordType的安全权限是:
进一步更新
检查设备未接收推送的日志,并且看到:
apsd[85]: Silent Push: Deny app not available
重启设备,现在工作正常!
解决方法
>除了修改导致通知的文件的特定设备
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。