Why bundle.main does not work when i use it in xcode project ( command line project) but it works when i use it with SwiftUI project. And vice versa with FileManger
Applications (such as SwiftUI projects) are bundles. Tools (Command Line projects) are just a single binary file, so have no main bundle.
Diggory answered the first part of your question but I’m curious about this:
And vice versa with
It seems like you’re saying that
FileManager doesn’t work in a SwiftUI project, which is most unexpected. Can you clarify this?
Share and Enjoy
Quinn “The Eskimo!” @ DTS @ Apple