Push Notifications for Shared Database

Hi,

I'm working on a collaboration app and I already implemented Push Notificatios for private databases, so if other people change "my" data, I get a notification. But the other way around it doesn't work so easily, because CKQuerySubscription isn't available for shared databases.

Does anyone have a solution for that?

Replies

1) You can use the public database rather than the shared database. 'Roll your own' shared database by adding a field that contains a reference to the 'owner' and include that value in your query - so you are only getting that owner's data.


or


2) whenever you change your data also post something to the public database that will generate a query-based notification going to those who are sharing your data. (This is essentially half of #1 above.)

Did you end up doing what PBK recommended? Do all your push notifications now live in your public database? If so, how is that working out?


I've noticed that I can get background change notifications to go back and forth between my data and their data, but push notifications don't work due to the absence of CKQuerySubscriptions, like you mentioned.