0
votes

from a couple of days, I am searching solution for this issue, finally posting it here:

when i get Remote Notifications, and ignore the push notification and launch the app by clicking on application icon, delegate method "didreceiveRemoteNotification" will not be called. is there any way to get full Notification payload dictionary, when app launches.

Any Help would be appreciated!

2

2 Answers

3
votes

No.

You should store the notification details on your server and make a request to the server to get pending details (and update details that have been accessed).

The app has no access to notifications in notification centre unless the user explicitly selected to open the app from there.

0
votes

At launch you will receive the remote notification through the launch options. In your application delegate, implement - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions and then you can retrieve the same dictionary you would otherwise be given in didReceiveRemoteNotification:(NSDictionary *)userInfo like this:

if ([launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]) {
    NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]];

    ...
}