问题
Xcode 4 completely changed the (project) template system. There's a lot more you can do now, but it comes at a price. Take a look in the TemplateInfo.plist files scattered around your /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Application
folder and you'll quickly lose the perspective. The new setup is very hard to modify, even harder to re-create. The writer of boreal-kiss.net has a real good post about the new structure.
One of the things he mentions struck me because I had the same thought while connecting the dots of the extensive use of inheritance in XML:
In fact it seems Apple creates them not by coding but by automatic generation tools.
My question is: Does someone know of such a tool? Is there a hidden helper utility in Xcode? Is it a download somewhere? Or has someone maybe created a tool like this to generate those TemplateInfo.plist XMLs?
It's a stretch, I know, but doing all those files by hand is a project of it's own, a hassle one shouldn't have to worry this hard about in a modern IDE.
UPDATE: While you can code the template files by hand, you can't rely on the templates you create to survive API changes by Apple with new releases of Xcode. I eventually wrote my own system for templating projects, by way of copying existing projects into new ones. This is done within a proprietary set of scripting instructions and a command line RubyGem called klipp
. See: https://rubygems.org/gems/klipp
回答1:
I'd expect that a tool to help developers manage template libraries is something Apple will be releasing at some point but the priority has to be there if you want to see it anytime soon. Be sure to submit a bug report (https://bugreport.apple.com/) so that Apple knows that it is a concern. You could even reference all of the blog posts and forum posts which show the number of developers who want to manage templates with a tool.
来源:https://stackoverflow.com/questions/5362022/what-does-apple-use-for-xcode-4-template-generation