The structure of a SwiftUI app uses a lot of Swift syntax to appear simple:
import SwiftUI
@main // <-- Attribute (potentially an attached macro)
struct MyApp: App {
var body: some Scene { // <-- computed property with implicit get only (using an opaque type satisfying the Scene protocol)
WindowGroup { // <-- getter implicitly returning WindowGroup instance with a constructor receiving a closure
ContentView() // <-- closure implicitly returning this
}
}
}