I also needed to keep the directory structure of the header files for the C ++ library project, and I finally managed to do this. This is ridiculously difficult with Xcode compared to a simple task. The key is to first create “folder links”, then copy the header folders in the additional build phase, and then remove the .c / .cpp files from these exported header folders with a script, since Xcode will not only copy the .h files.
I wrote a blog post here on how to achieve all this because it is more difficult. You can also check out an example Xcode project in which I have a github bank.
source share