Please give me some tips for this case. I have an iPhone APP which can receive push notification. When I click this notification in Notification Center, my APP will be launched. Is there a way to configure the screen in my APP to be displayed based on the notification received instead of the default screen. It should be possible because I have seen these behaviors in some APPs. After searching the answers, I got the below methods, however If the app is in background and I click the message in notification center didFinishLaunchingWithOptions and didReceiveRemoteNotification will not be invoked, instead, applicationWillEnterForeground will be invoked. In this case, how can I pass data to the application.
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
}
// will be called when in foreground
(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
}
It’s a simple matter of presenting the UI or functionality you want in the provided delegate method
didReceiveRemoteNotification.I don’t use story board but you should be able to swap whatever the current root view of the app is, or provide the different functionality when that method is fired.
Your question is a little vague, as you already have the right idea of how to go about it.