当我创建订阅时:
let options: CKSubscriptionOptions = [.firesOnRecordCreation, .firesOnRecordUpdate, .firesOnRecordDeletion]
let subscription = CKDatabaseSubscription(recordType: "Territory", predicate: NSPredicate(value: true), options: options)
并将其保存到我的共享数据库中:
sharedDatabase?.save(subscription) { _, _ in }
它仍然没有出现在我的 cloudkit 仪表板中。为什么?
对于私有(private)数据库,出现...
注册后,我需要知道更改了哪些记录以及更改的类型。
最佳答案
您必须创建一个自定义区域,使用CKDatabaseSubscription
Territory
记录类型
Be aware that CKQuerySubscription is not supported in the shared database, and CKDatabaseSubscription currently only tracks the changes from custom zones in the private and shared database.
更多信息请访问 Technical Q&A QA1917
关于ios - 我如何订阅共享数据库的更改?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45710257/