Currently, you have to have permission for notifications granted by the user:
UIApplication *application = [UIApplication sharedApplication];
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
[application registerUserNotificationSettings:settings];
[application registerForRemoteNotifications];
Is it possible to still get remote notifications for subscriptions without having to ask for permission? My CKSubscription is for a record zone, by the way.
I wish there was a way to do this without bugging the user. Especially since even if the user says No, iCloud still gets the needed notifications. So it really is pointless that the alert asks the user.
But the problem is that the calls to registerForRemoteNotifications
and registerUserNotificationSettings:
are not specific to iCloud.
I think anyone using CloudKit needs to make an enhancement request to Apple asking for an API that lets an app register for iCloud notifications without the need to prompt the user for permission (whose result is ignored anyway).
To directly answer your question - no, it's not currently possible to register for iCloud notifications without needlessly prompting the user.