From what I've read this doesn't seem possible but I'll throw it out there anyway.
When my app wakes up (applicationDidBecomeActive
I want to check if any notifications have triggered since it went to sleep. If my app have triggered a notification I want to launch a certain view in my tabbar.
a bit like this:
I've the option here to query the database for all notifications I have and check if any one is in the past.
I was thinking if there is any way though of simply providing this type of information in the notification itself and query the UIApplication for it? All I need to know is if my app has triggered a notification since it was last open - the view I'm loading will take care of everything else.
When my app wakes up (applicationDidBecomeActive
a bit like this:
Code:
- (void)applicationDidBecomeActive:(UIApplication *)application {
// TODO: check if there is a notification - if there is - move to tab 0.
BOOL notification = YES;
if (notification) {
[self.rootController setSelectedIndex:0];
}
}
I've the option here to query the database for all notifications I have and check if any one is in the past.
I was thinking if there is any way though of simply providing this type of information in the notification itself and query the UIApplication for it? All I need to know is if my app has triggered a notification since it was last open - the view I'm loading will take care of everything else.