title: Why I get Apple Push Notification with launchOption dictionary nil?
body: <p>I am sending push notifications from server and if the the app is running in background, notification arrives and tapping it calls the didReceiveRemoteNotification(). </p>
  
  <p>But when I kill my app(swiping up the app after double pressing home button, notification arrives but tapping the notification only direct the screen to app home. I already coded in didFinishLaunchingWithOptions:launchOptions() like below.</p>
  
  <pre><code> if (launchOptions != nil)
      {
          NSDictionary* dictionary = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];
          if (dictionary != nil)
          {
  
              NSLog(@"Launched from push notification: %@", dictionary);
  
              NSString *strVendId=[dictionary valueForKeyPath:@"payload.vendor_id"];
  
              UIStoryboard *mainstoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
              UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
  
              VenderDetailController *vDetail=[mainstoryboard instantiateViewControllerWithIdentifier:@"venDetail"];
              vDetail.strVendorId=strVendId;
              [navController pushViewController:vDetail animated:YES];
          }
      }
  </code></pre>
  
  <p>There is no way I can debug this as app gets killed. Maybe I get nil dictionary I can't tell. I even tried to remove launchOption nil condition, still no help.</p>
  
  <p>I am using objective C and this problem is driving me crazy. </p>