Articles

Xcode 4 Templates: Make one target depend on another

After spending an hour on it I figured out how to make an Xcode 4 template where one target has a target dependency on another target (= one target depends on another target).

It’s quite simple, all you have to do is add an ArrayDependencies” to the Target, where you refer another Target by number.

Some background:

I’m currently writing an awesome app in MacRuby. MacRuby projects have both a normal target and a Deployment target, which compiles and embeds the MacRuby framework in your .app so that it can be distributed to others that don’t have MacRuby installed.

Unfortunately currently MacRuby’s Xcode templates don’t make the Deployment target depend on the normal target, so if you, for example, clean and then run Deployment it won’t build.

Took me a few hours but I submitted a pull request to the awesome MacRuby folks.

Tweet This Leave a Comment

No comments yet.

  • Images