I was trying to init var window: UIWindow? to a UIViewController programmatically in AppDelegate.But I cannot achieve it. When I was updated my Xcode to Version 11.0 (11A420a), in project init section, I choosed to with Storyboard not to SwiftUI but I can not achieved to programmatically assign the UIWindow's rootViewController to a view controller. So first of all, I removed the Main.storyboard file, then I hang with Info.plist and removed the storyboard section as usual like I do before but there's some configs about UIApplicationSceneManifest as shown below. And
<key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <false/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneConfigurationName</key> <string>Default Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> </dict> </array> </dict> </dict> By the way, for checking out what happens, I tried the init window in SceneDelegate.swift and AppDelegate.swift file but simulator's screen shows black screen fully. So what I must to do?
Hint: var window: UIWindow! variable description is not added to AppDelegate default anymore, its in SceneDelegate. So can I set my rootViewController from SceneDelegate file?
What's the way to achieve fully programmatically this in the new AppDelegate/SceneDelegate approach?