Say I have 2 projects in an Xcode 4 workspace. Project A is the final product which requires the utility app built from project B. The goal is to have the build process of A automatically build project B if necessary, then copy the built app into the resource folder of product A's app bundle.
Xcode 4's documentation is really lacking in this regard. I tried adding the built B.app into project A with Add Files to "project A"... command. It does copy the app bundle but it doesn't check for a dependency. That is, it does not automatically build project B when it's updated.
Any pointer to find the right documentation is also much appreciated.
Edited: I am looking to accomplish the first 2 benefits mentioned in this doc, that are:
One project can use the products of another project while building.
If one project depends on the products of another in the same workspace, Xcode can detect this and automatically build the projects in the correct sequence.
I know the plain old project way of adding a project to another one as a sub-project so I can set the target dependencies. But from the wording of the workspace doc, there's seems to be an easier and automatic way. But I am not able to find the steps to do either of the two features.
Add project B as "Target dependency" in project A's "Build phases" tab in the target screen. (The screen that you get when you click on the top level project node)
Update:
It seems that a project can only define the output of another project as dependency if the second project is a subproject of the first:
If your Workspace has the following structure, defining dependencies is not possible:
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