Correct way of removing SceneDelegate from iOS 11+ project - What code is necessary in application(_: didFinishLaunchingWithOptions)

Solution 1:

You only need to make sure

1- UISceneDelegate is deleted

2- Key UIApplicationSceneManifest is removed from Info.plist

3- These methods are removed from AppDelegate

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
    // Called when a new scene session is being created.
    // Use this method to select a configuration to create the new scene with.
    return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
    // Called when the user discards a scene session.
    // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
    // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}

4- Add var window: UIWindow? to AppDelegate

5- Make sure entry point vc is selected in Main.storyboard

After that Don't worry of anything and leave didFinishLaunchingWithOptions empty as if there is no change happened in Xcode 11