I am suffering from an issue. I wanted to get get userInfo or payload data when app is in suspended mode. I am able to get payload data when i tap on received notification. but i am not able to get userInfo data when app is in suspend more exited. Is there any way or method to get push notification data ? when app suspend more exited mode
i am using following method :
- (void)applicationWillEnterForeground:(UIApplication *)application
{
NSLog(@"notification active=%@",userInfo);
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
flag=0;
if (application.applicationState == UIApplicationStateActive || application.applicationState == UIApplicationStateInactive || application.applicationState == UIApplicationStateBackground)
{
NSLog(@"notification active=%@",userInfo);
}
else
{
NSLog(@"notification inactive%@",userInfo);
}
application.applicationIconBadgeNumber = 0;
}