Reputation: 1819
It seems CKQuerySubscription
cannot be used for subscribing to shared DB changes in cloud kit. CKDatabaseSubscription
neither works nor does CKSubscription
How can I achieve subscribing to Shared DB changes?
Simply. How can i achive a notification about change made on record that is shared with me. I AM NOT THE OWNER OF THE RECORD.
Related question is here:
How to receive cloudkit notifications about changes made on record shared with me?
Upvotes: 1
Views: 886
Reputation: 51
I struggled for some time to successfully subscribe using CKDatabaseSubscription when the database had been shared with me. It worked fine when I was the one sharing. The mistake I was making was that I was using the same subscriptionID in both cases. You need a unique subscriptionID if you want subscription to the shared database.
Upvotes: 2
Reputation: 1819
Turns out, its not possible to subscribe on a zone level or a record level for Shared DB in CloudKit. Ref: https://developer.apple.com/library/content/qa/qa1917/_index.html
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.
Upvotes: 0