The app delegate must implement the window property
Closed this issue · 0 comments
sravanpabolu commented
How to resolve the error The app delegate must implement the window property if it wants to use a main storyboard file swift
If you are not using SwiftUI
, Here are the steps, I have followed.
- Deleted
Application Scene Manifest
entry fromInfo.plist
- Deleted
SceneDelegate.swift
file - Deleted all scene related methods in
AppDelegate.swift
class - added
var window: UIWindow?
property inAppDelegate.swift
class
After these steps, your AppDelegate.swift
file should look something like the following.
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
}