This has worked in iOS 8 and prior, so it may be a bug in iOS 9 beta - or it's a changed behaviour.
After asking the user for permission to send local notifications -
NSSet *categories = ...;
UIUserNotificationType notificationTypes = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:categories];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
and user chooses "Allow", application:didRegisterUserNotificationSettings:
is called with [notificationSettings types] == UIUserNotificationTypeNone
.
However, the next time I run registerUserNotificationSettings
it will be called with the correct permission types.
Apple's reference doesn't say anything that may indicate this is intended, so it may be a bug.
Anyone knows what's the problem or how to work around it?
Just found that Apple have modified their
didRegisterUserNotificationSettings
methodFrom
To
Don't know wether this will resolve issue but you can try.