In XCode 11.7, when I add a Copy Files build phase, it only allows me to select files, not directories, and while I can select files from within sub-directories, they all get mashed together into the top-level.
I can work around it by adding multiple Copy Files phases with a different subpath so that the structure ends up correct, but this is tedious and feels wrong.
Is there a better way to make the output directory structure of Copy Files match the input?
I figured out how to do it - instead of a Copy Files phase, I added a Run Script phase and used the
cp -R
command.In my case, I wanted to copy a
TargetApp/www
folder to the "Wrapper" (root of the app), so my full script is: