My app is receiving remote notifications (APNS) and is working for all the common scenarios:
- App is not running (didFinishLaunchingWithOptions:)
- App is running and active (didReceiveRemoteNotification:)
- App is running, the phone is locked and I unlock the device as soon as I get the notification (didReceiveRemoteNotification:)
However, not if I in the last case choose not to unlock the device immediately (with the slider) and I wait until the screen goes black again. The message/notification is still shown in the lock screen, but the slider can now only unlock the device and when I do, didReceiveRemoteNotification: doesn’t get called at all.
I’m afraid this is the intended behaviour. Quote the Local and Push Notification Programming Guide, part Scheduling, Registering, and Handling Notifications: