1

In Xcode, I created some HTML help files and put them in a folder, like this:

But when Xcode builds the final app package, it flattens the folder structure.

ls ~/Library/Developer/Xcode/DerivedData/.../Build/Products/Debug/MyApp.app/Contents/Resources
...     help.css    help.en.html

And the following code crashes, because it expected a subdirectory:

let url = Bundle.main.url(forResource: "help.en", withExtension: "html", subdirectory: "Help")! 

Is there a way to make it copy the directory structure to the output? I will have more files and I don't want to think about name clashes.

Rob N
  • 15,024
  • 17
  • 92
  • 165

0 Answers0