TargetViewController is not part of the window because it has not been added, just initialized. Based on the assumption that the ViewController is your rootViewController, click on your destinationViewController as follows:
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?.rootViewController as! UINavigationController navigationController?.pushViewController(destinationViewController, animated: false, completion: nil) }
Optional: To go from "Bestellen" to "MessageViewController" and then click on "Berichten", you also need to click on all the other viewControllers between the two. There is no built-in function or algorithm for this.
source share