title: Set root view controller in didFinishLaunchingWithOptions results in a blank screen
body: <p>Trying to <em>programmatically</em> set the initially view controller in AppDelegate's didFinishLaunchingWithOptions(..) function - followed the answers <a href="https://stackoverflow.com/questions/10428629/programmatically-set-the-initial-view-controller-using-storyboards">here</a> and <a href="https://stackoverflow.com/questions/26753925/set-initial-viewcontroller-in-appdelegate-swift">here</a>, but running into the problem where when debugging instead of showing the "Home" VC, a black screen loads instead. I have tried to look for answers to the "black screen" issue that others have experienced, but no luck.</p>
  
  <p>Here is my AppDelegate's didFinishLaunchingWithOptions :</p>
  
  <pre><code>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {
      // Override point for customization after application launch.
      FirebaseApp.configure()
      ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
  
  
      let frame = UIScreen.main.bounds
      let window = UIWindow(frame: frame)
  
      let storyBoard : UIStoryboard = UIStoryboard(name: "Home", bundle: nil)
      let homeVC = storyBoard.instantiateViewController(identifier: "Home")
  
      window.rootViewController = homeVC
      window.makeKeyAndVisible()
  
      return true
  }
  </code></pre>
  
  <p>My "Home" VC in the "Home" Storyboard has "Is Initial View Controller" disabled/unchecked.</p>
  
  <p>My Project's "Main Interface" is left empty, under the "Deployment Info" section of "General" settings.</p>
  
  <p>I can see that my "Home" VC's viewDidLoad() override function loads all the way through - but, the Storyboard itself does not load (is white), before the black screen is produced.</p>
  
  <p>Help? Not sure what else may be relevant.</p>
  
  <pre><code>// Home.swift:
  
  import Foundation
  import UIKit
  import Firebase
  
  class Home: UIViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          print("Something!")
          self.view.backgroundColor = .green
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GZqiB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GZqiB.png" alt="Home VC Storyboard"></a></p>
  
  <p>Console output:</p>
  
  <pre><code>&lt;Warning&gt;: Please set a value for FacebookAutoLogAppEventsEnabled. Set the flag to TRUE if you want to collect app install, app launch and in-app purchase events automatically. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#disable-auto-events.
  &lt;Warning&gt;: You haven't set a value for FacebookAdvertiserIDCollectionEnabled. Set the flag to TRUE if you want to collect Advertiser ID for better advertising and analytics results. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#disable-auto-events.
  - &lt;AppMeasurement&gt;[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
  6.10.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60103000 started
  6.10.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ..)
  FBSDKLog: Unable to find a valid UIWindow
  Something!
  [WindowScene] Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
  Unbalanced calls to begin/end appearance transitions for &lt;ProjectName.Home: 0x7ffa2640ff90&gt;.
  </code></pre>
  
  <p><strong>Editing to clarify:</strong></p>
  
  <p>The point in attempting to try to programmatically set the initial VC is so that <em>any</em> VC can be set. This is useful in scenarios such as when the app initially loads, checking if the user is logged in or not, and depending on the token, showing the respective screen.</p>
  
  <p>Trying to avoid having an intermediate VC that does the forwarding, because with iOS 13, the order of windows is layered.</p>
  
  <p>Thank you everyone!</p>