title: How to navigate to view controller on push notification
body: <p>I'd like to navigate to a certain view controller after receiving a push notification. After navigation, the navigation stack should work as if the user got to the view manually.</p>
  
  <p>The storyboard: <a href="http://www.xpos.nl/xpos/images/common/storyboard.png" rel="noreferrer">http://www.xpos.nl/xpos/images/common/storyboard.png</a></p>
  
  <p>In AppDelegate.swift I already have:</p>
  
  <pre><code>func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
  
      println("didReceiveRemoteNotification")
  
      let storyboard = UIStoryboard(name: "Main", bundle: nil)
  
      let destinationViewController = storyboard.instantiateViewControllerWithIdentifier("MessageViewController") as MessageViewController
  
      let navigationController = self.window?.destinationViewController;
  
      navigationController?.pushViewController(destinationViewController, animated: false, completion: nil)
  
  }
  </code></pre>
  
  <p>But I get an error that destinationViewController is not part of window or if I correct that (trying other answers on stackoverflow), nothing happens.</p>