I am working with an Xcode workspace that combines one iOS application projects with several iOS static library projects. I've now added a further library B project that is dependent on one of its siblings A and run into a build error whereby the compiler cannot find one of A's header files when compiling one of B's files.
I assume this has to do with the order in which these projects are built. So I am wondering what determines the order of the different steps. How can I be sure that A's Copy Files build phase (which copies the required header file) executes before B's file are compiled. I can see the apparent order of source files for compilation in the target's Compile Sources build phase; is there a similar list that determines the "order" of projects inside the workspace. The project navigator view imposes one, but swapping A and B in that view does not remedy the problem.
Has any one succeeded with this kind of setup (cross-dependency between static library projects in a workspace, all compiled into a single bundle) and what was the required configuration?
A dependency is another target that must be built before the current target can be. For example, if you have an app target and a framework target, the app target can have the framework target as a dependency, to ensure that the framework is built first. That is, the app target "depends" on the framework.
In the scheme under 'Build' you can drag the targets used into a specific order. If you un-check the 'Parallelize Build' option the targets are built in the specified order. So the later ones can have dependencies to the earlier ones.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With