The Development section is for discussing the compiler itself. Questions relating using the language need to go in the Using Swift section.
_main is the entry point of the process. Without it, the OS doesn't know where to begin executing the binary.
In Swift, you have two ways of providing that entry point:
main.swiftfile which contains script-like top-level code that will be executed on processes launch.
@mainattribute that can be attached on a type, in which case the program begins by executing a
static func main()(may be
class, may also be
In your case, since you're using SwiftUI, the type that provides such a
main static method is
You are either missing an implementation of the
App protocol entirely, or your implementation is missing the
If you create a new SwiftUI app from a template in Xcode, it will generate all the code you need for the implementation of the