Contents

main()

Initializes and runs the app.

Declaration

@MainActor @preconcurrency static func main()

Discussion

If you precede your App conformer’s declaration with the @main attribute, the system calls the conformer’s main() method to launch the app. SwiftUI provides a default implementation of the method that manages the launch process in a platform-appropriate way.

See Also

Running an app