Question

I receive PushNotification as badge as well as alert and are displayed as badges on the app icon.

I receive the payload successfully when I click on alert, which appears at top area of the screen.

But, if the notification is received and I click on the application icon i don't get the payload in any of below mentioned the methods.

application:didFinishLaunchingWithOptions:
application:didReceiveRemoteNotification:

So, what could be the problem or have I missed something in handling such case.

Was it helpful?

Solution

That would be expected behavior. You don't want to show the push notification for the user if he himself did not actively chose to to tap on the alert. If user is in your app while receiving notification you can ask the user if he wants to view it or dismiss it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top