Search code examples
iosmacoscocoaicloudcloudkit

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:

[[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!


Solution

  • 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. :)