xcode - copy a folder structure into my app bundle
When you add a directory to Xcode, there is a tickbox (on by default) to convert folders into groups.
Turn that off, and it will do what you want.
It is still the same in Xcode 12: Check the Create folder references box when adding the root folder of your folder structure to the project.
To access the resources in code, specify the subdirectory path in your call to Bundle.url()
:
Bundle.main.url(forResource: "blabla",
withExtension: "txt",
subdirectory: "A/B/C/D")