I implemented
application:didReceiveRemoteNotification:
to store data in my application when receiving a push notification.
However, when my application is in the background and I receive a notification, the data is saved only if I touch the notification banner from above:

Instead, if I touch the application icon to reopen it, the contents of the notification will not be saved:

Since I only receive notifications when using the distribution profile, I'm not sure if application:didReceiveRemoteNotification: is only called when I click the notification banner at the top.
I thought it was always called when a notification was received, and not after a user action on the device.
UPDATE I don't know if this will help, but to tell you, I have not implemented any of these methods:
– applicationDidEnterBackground: – applicationWillEnterForeground: - applicationDidBecomeActive:
ios push-notification
aneuryzm
source share