I have just developed an app, but when running in the simulator the debugger console says:
The app delegate must implement the window property if it w
Make sure you have the following property declaration in your AppDelegate class:
var window: UIWindow?
Add the following window declaration in Appdelegate file
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window:UIWindow?
...
Implementation of this property is required if your app’s Info.plist file contains the UIMainStoryboardFile key. The default value of this synthesized property is nil, which causes the app to create a generic UIWindow object and assign it to the property. If you want to provide a custom window for your app, you must implement the getter method of this property and use it to create and return your custom window.
Setting in Info.plist Application Scene Manifest > Enable Mutliple Windows > false. This solved the problem for me.
Swift 5 & Xcode 11
Make sure that SceneDelegate
contains UIWindow
property
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
//...
}