In the method that is called when the notification is executed:
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
Is there a way to find out if a notification was received from the user by clicking on the warning in the notification center, or was the warning received while the application was running?
The reason is because I want to direct the user to a specific page when they click on a warning. This method above is called if the warning is disabled when the user is inside the application (therefore, they did not click the notification in the notification center), and I do not want to kick them to another screen.
However, if the application is running or is in the background, and they pulled out the notification center, I want to bring them to a specific screen and the same method is called in these situations.
source share