I am sending Push Notifications to my iPhone app, and I\'d like a different set of instructions to execute depending on whether the app is already launched or not. I\'m new
If you are going to check applicationState on iOS less than 4, you'll need to check that applicationState is supported:
if ([application respondsToSelector:@selector(applicationState)] ){
// Safe to check applicationState
UIApplicationState state = [application applicationState];
}