I have something fairly simple I want to do. I attach a custom piece of data to some push notifications that I handle in
-(BOOL)application:(UIApplication *)
To detect if the app was activated by remote notication, try this:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (userInfo == NULL)
{
NSLog(@"didFinishLaunchingWithOptions user startup userinfo: %@", userInfo);
}
else
{
NSLog(@"didFinishLaunchingWithOptions notification startup userinfo: %@", userInfo);
}
}