I need to launch a view controller from the app delegate.
In the way you would perform a segue between view controllers.
I have an if statement that if true
if you want to use segue identifier, you can use in Swift 2.2.
segue
identifier
Swift
2.2
self.window?.rootViewController!.performSegueWithIdentifier("YOUR SEGUE IDENTIFIER", sender: nil)
and for Swift 3.1 :
self.window?.rootViewController!.performSegue(withIdentifier: "YOUR SEGUE IDENTIFIER", sender: nil)