On Jul 21, 2009, at 6:17 PM, John Mikros wrote: I have no idea how you're "supposed to" do it, but what we do is create a Run Script Build Phase with the following script, and this works for us.
cd "$SRCROOT/path/to/your/other/project" xcodebuild -project OtherProject.xcodeproj -target "My Target" -configuration Debug exit
We also put the other project into Groups and Files for easy access to it.
Oh please don't do that.
You're just spinning up another instance of all of Xcode, taking time and memory, for no good reason.
1) Drag project B into project A's Groups and Files tree. 2) Open the target in project A and select the General tab. 3) In the Target Dependencies list, click the + button to add a dependency. 4) In the sheet, select the target in project B that you want project A to be dependent on.
Whenever you build that target in project A, it will first check the status of the target in project B, and build it if necessary.
Note that this is an independent step from whether project A actually uses project B's build products. You can have projects that force each other to build, but never use each other's build products; or you can have projects that use each others' build products but do not force a build, or set it up to do both.
Chris |