19.3 The DemoProjectApp.swift File
The DemoProjectApp.swift file contains the declaration for the App object as described in the chapter entitled “SwiftUI Architecture” and will read as follows:
import SwiftUI
@main
struct DemoProjectApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
As implemented, the declaration returns a Scene consisting of a WindowGroup containing the View defined in the ContentView.swift file. Note that the declaration is prefixed with @main. This indicates to SwiftUI that this is the entry point for the app when it is launched on a device.