我相信我已经设置好了一切,并且一切都适用于 iOS 模拟器中的 CloudKit
,但是我无法让 CloudKit
在 watch 模拟器:“无法发送有效签名”
有人知道为什么会这样吗?
我知道
CloudKit
根据 Apple“iCloud 交互”在 watchOS 3 中工作。 从 watchOS 3 开始,WatchKit
扩展可以进行通信 直接使用CloudKit
和其他 iCloud 技术。”我已经完成了“设置”>“iCloud”,然后使用您的 Apple ID 登录
根据 enter link description here 在 iOS 模拟器上在 Watch Extension 中,我根据 enter link description here 使用
CKContainer(identifier:"iCloud.com.xx.xx")
调用 CloudKit我仔细检查了 Apple 的文档以确保我没有遗漏任何内容:
enter link description here我在 watch 上访问的是同一个
CloudKit
容器
iOS,所以访问CloudKit
中的数据没有问题
- 具有容器标识符的 CloudKit 功能已设置 正确地在 Watch Target 中
最佳答案
CloudKit usage is blocked on watchOS Simulators. Running any test will throw a “Not Authenticated” error even though you are signed in via the paired iOS Simulator. Workaround: Use CloudKit on paired devices with watchOS 3 and iOS 10.
这是来自 watchOS 3 发行说明,但似乎尚未修复。只需在真正的 watch 上进行测试,一切都会正常工作。
关于ios - 使用 watchOS 3 时出现 CloudKit 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41253820/