You may need to add a Appdelegate.swift file if you want to switch your project from SwiftUI to UIKit. You need to create a new file named AppDelegate.swift which conforms to UIResponder, UIApplicationDelegate. Like: @main class AppDelegate: UIResponder, UIApplicationDelegate{ var window:UIWindow? // your code }