When my app is in background, push notifications are handled only if I touch the top notification banner

Viewed 4329

I've implemented

application:didReceiveRemoteNotification:

to store data in my app when a push notification is received.

However when my app is in background and I receive a notification, the data is stored only if I touch the notification banner appearing on top:

enter image description here

Instead, if I touch the app icon to reopen it, the content of the notification is not stored:

enter image description here

Since I'm receiving the notifications only when I use the distribution profile, I'm not sure if application:didReceiveRemoteNotification: is invoked only when I push the notification banner on top.

I thought it is always invoked at the time a notification is received, and not after a user action on the device.

UPDATE. I don't know if this can help but, just to let you know, I haven't implemented any of these methods:

– applicationDidEnterBackground:
– applicationWillEnterForeground:
- applicationDidBecomeActive:
1 Answers
Related