I have the following problem, related to the Apple Push Notification service on iPhone: if the app is on background when the remote notification arrives, the alert is never displayed.
I know the notifications are reaching the device because: 1) a badge is shown or a sound is played if the payload contains any and 2) if the app is on foreground, the method -application:didReceiveRemoteNotification: gets called with the proper value on userInfo.
I noticed that on the Notifications settings on the device, my app has only the options Badges and Sounds, while other apps have also an Alerts option. My guess is that somehow my app has the alerts disabled, but I don’t know how to enable it.
Any thoughts?
Check if UIRemoteNotificationTypeAlert is registered in your appDelegate didFinishLaunchingWithOptions OR didFinishLaunching method.
it should look like that:
an other, less reasonable is that you might disabled the “alert” in the Notification center in your device preferences.