I\'m able to send push notifications to my IOS device. But when I click on that notification it just opens the app. No message is shown inside the app.
Code used by
When application is totally killed get notification code
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if (launchOptions != nil)
{
//opened from a push notification when the app is closed
NSDictionary* userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (userInfo != nil)
{
NSLog(@"userInfo->%@",[userInfo objectForKey:@"aps"]);
//write you push handle code here
}
}
}
For more go through this link: Handling Push Notifications when App is Terminated