Silent Push Notifications in dev environment?

I'm trying to debug why I'm not receiving silent push notifications in the dev environment.

In terms of setup:
  • I create a CKSubscription.NotificationInfo with shouldSendContentAvailable set to true.

  • Add that to a CKDatabaseSubscription and send to CloudKit via my private CKDatabase's save(_: completionHandler:) which returns successfully.

  • I confirm the subscription exists in subsequent launches via CKFetchSubscriptionsOperation.

  • In my AppDelegate I call application.registerForRemoteNotifications() in application(_:didFinishLaunchingWithOptions:)

  • A device token is received in application(_:didRegisterForRemoteNotificationsWithDeviceToken:)

  • The app is setup with entitlements for Push, CloudKit, and Background Modes with Remote Notifications and Background Processing checked.

  • I run the app on two hardware devices (iPhone and Mac mini) and initiate a record update on either device.

However, I don't receive a notification that an update has taken place on either device; application(_:didReceiveRemoteNotification:fetchCompletionHandler) is never called.

I don't see any pushes fired via the Dashboard, and I can't seem to find record of the subscription – even though I can see them when I query via a CKFetchSubscriptionsOperation on the device.

Am I missing something? Is there a good way of debugging this?





Answered by tcldr in 649426022
Turns out CKDatabaseSubscription doesn't work with the default record zone – custom zones only.
Accepted Answer
Turns out CKDatabaseSubscription doesn't work with the default record zone – custom zones only.
Silent Push Notifications in dev environment?
 
 
Q