Not receiving CloudKit push notifications for Custom Record Zone on the Mac

I’ve setup a custom zone subscription to receive (silent) push notifications from my custom record zone. Everything works fine on my iOS devices but I’m not able to receive the notifications on my Mac.

To register the notifications I’m registering the notification type in applicationDidFinishLaunching:

  • Swift 2.0 minimum system version requirement (deployment target)
  • Is it possible to get the 'live' current location with an iOS Simulator?
  • Apple CI / Xcode Service and Jenkins
  • How to make RACSignal to become hot?
  • Subclassing v.s. Protocols
  • How can I programmatically find Swift's version?
  • [[NSApplication sharedApplication] registerForRemoteNotificationTypes:NSRemoteNotificationTypeNone];
    

    (Tried the other types with the same result)

    application:didRegisterForRemoteNotificationsWithDeviceToken:
    

    is then called with a valid token. Everything seems fine but when the custom zone registers changes, I receive no notification and

    application:didReceiveRemoteNotification:
    

    is not called. I’ve also tried to set the alert body to an empty string like this:

    CKNotificationInfo *info = [[CKNotificationInfo alloc] init];
    info.alertBody = @"";
    info.shouldSendContentAvailable = YES;
    

    but it didn’t work either. When I set a string as the alert body (and register the appropriate notification type) I also get a notification with that body in the top right corner but application:didReceiveRemoteNotification: is not called.

    Hope you can help me. Thanks!

    2 Solutions Collect From Internet About “Not receiving CloudKit push notifications for Custom Record Zone on the Mac”

    I think it’s fixed with macOS Sierra. Working for me now.

    Edit:
    Oh wow: just noticed that I (!) asked this question 1,5y ago. 🙂

    Simply extracting the correct solution from one of the shared links: If you use a CKNotificationInfo for your alerts, didReceiveRemoteNotification will NOT be called on the Mac until and unless you set CKNotificationInfo.soundName to an empty string! This looks like a bug only in OS X (10.10 & 10.11 so far) but can be worked around by this simple change.