When Xcode 12 was launched in 2020 it brought with it a new app life cycle for SwiftUI applications. Prior to this, SwiftUI based apps were using AppDelegate.swift and SceneDelegate.swift.
Creating a new app can be done with this code:
1 2 3 4 5 6 7 8 9 10 |
import SwiftUI @main struct MyNewApp: App { var body: some Scene { WindowGroup { ContentView() } } } |