I am trying to create an Xcode project template that contains two compilable targets, with one target (an app) dependent on the other (a static lib).
Everything works so far, except that I cannot figure out how to specify the actual dependency in the template so that it shows up in the Target Dependencies section of the Build Phases tab of the app target of an Xcode project created from the template.
I've configured the TemplateInfo.plist of the project as follows:
The Components section identifies the static library project template and successfully brings the contents of that template, and its target, into the app project. And once everything is compiled, the static library is successfully linked in the end, by Item 3 in the OTHER_LDFLAGS entry.
But try as I might, the Dependencies section of the template does not cause the static lib to appear in the Target Dependencies section of the Build Phases tab of the app target. I've tried specifying the dependency using the numeric values 0 and 1, and I've tried it as a string using the name of the static library target (cocos2d), but none of these work.
In the end, in each Xcode project created from this template, I'm left with users having to perform the step of navigating to the Target Dependencies section of the Build Phases tab of the app target, and manually selecting and adding the static library target. Although this is a relatively simple task, it shouldn't be necessary at all.
Can anyone advise me on how to configure the template dependencies so this manual step is not necessary?