iOS Retrieving Push Notifications on applicationDidBecomeActive when application:didReceiveRemoteNotification isn't triggered

StackOverflow https://stackoverflow.com/questions/18235583

Question

I'm writing an app that receives push notifications. When it gets one, and someone opens their phone through that notification, my application's delegate receives a application:didReceiveRemoteNotification: which comes with important notification data in the second argument.

However, if they get a push notification for another app, and open their phone through that, and then open my app, my apps notification is still queue in the pull-down notification center, and my app's delegate does not receive an application:didReceiveRemoteNotification: message with that push data until they tap that notification in the pull-down notification center. Ergo, I don't get the push data I want processed in my app regardless of how the user opens the app...

Is there a way I can get that notification in applicationDidBecomeActive: somehow?

Help appreciated. Thanks,

Nick

Was it helpful?

Solution

Unfortunately, it isn't possible.

As far as I know, there are only two ways for your app to learn about a push notification:

  • The user opens your app by tapping/swiping the notification
  • You app is open when the device receives the push notification
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top