In Xcode, I created a macOS Command Line Tool project which include a
main.swift file. I want to use @main annotation on
ParsableCommand. When @main is added to a
ParsableCommand, I get error:
'main' attribute cannot be used in a module that contains top-level code
When I delete the
main.swift file, it fixed the problem and work. Is this the correct thing to do?
Is there some documentation explaining how to use @main for ArgumentParser app?