in the app: didFinishLaunchingWithOptions: you should see what's in the launchOptions dictionary. Something like that:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
โฆ
NSDictionary *userInfo = [launchOptions objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey];
if ( userInfo != nil )
[self handlePushNotification: userInfo];
โฆ
}
Do not forget to implement:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
if a push message arrives while your application is running.
In the handlePushNotification: method, you must create your view stack manually, most likely with an animated: NO.
source
share