Drux
Drux

Reputation: 12660

Determine order of building projects in Xcode 5 workspace (with dependencies between static library projects)

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?

Upvotes: 7

Views: 2986

Answers (1)

JTea
JTea

Reputation: 234

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.

Upvotes: 14

Related Questions