You can do two things.
One of them is to check the launchOptions dictionary of the launchOptions method
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
to find out if the application was launched through the user clicking on the notification. If so, then in this method you can push the appropriate view controller onto the stack, as usual using the application.
If the application is already open but the same theory is applied in the background, use the UIApplicationDelegate method UIApplicationDelegate
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
For more information on handling incoming notifications, see this link .
Mic pringle
source share