I'm having an issue with push notifications and it affects only my devices running iOS 9:
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes categories:nil];
[application registerUserNotificationSettings:settings];
[application registerForRemoteNotifications];
}
application:didReceiveRemoteNotification:
).Has anything changed on iOS 9? How can I make the push notifications display also on iOS 9, even if the app is not active? I don't want to use notifications to fetch any content in background, I just need to display a message.
In the end, I had to do two things that made it work for me: