I can't find the words to say how happy I'm, so here is a picture:
After giving it a try without success, I realized you patched the wrong templates (Xcode3 vs Xcode4). The Xcode4 templates are in the misc/xcode4-templates directory. I do not know if your changes can be backported to the Xcode4 templates :(
Oops, sorry :)
Going to look at how to patch the xcode4 templates
Make Deployment target depend on main target
@lrz I removed the Xcode 3 changes and fixed the Xcode 4 templates
And a bit shameless self promotion, I wrote a blogpost: Xcode 4 Templates: Make one target depend on another
Awesome! I checked again and it seems to work! Thanks for your contribution.