I have an app that supports both iOS and watchOS. They operate on data stored in iCloud. What I am trying to do is receive notifications on the Apple Watch when data changes on the iCloud server so I can update complications.
I'm trying to set up a subscription using CKQuerySubscription in applicationDidFinishLaunching in the extension delegate. I'm also calling registerForRemoteNotifications on WKExtension.
- The container and record type are correct, my predicate is
TRUEPREDICATE - I'm operating on the private database
- The subscription save process (i.e.
database.save(subscription)) succeeds - The remote notification registration process succeeds (
didRegisterForRemoteNotificationsis called) - I am running on an actual device and have breakpoints confirming everything sets up fine and nothing comes up as a result
- The watch extension has remote notification background mode and push notification capabilities set up
- The data comes up fine through regular queries when I launch the actual app on the watch
The problem is:
didReceiveRemoteNotificationis never called
Is it actually possible to get push notifications from iCloud or should I just abandon this idea?