苹果使用XCode 4模板生成什么? [英] What does Apple use for XCode 4 template generation?

查看:111
本文介绍了苹果使用XCode 4模板生成什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 4完全更改了(项目)模板系统.您现在可以做更多的事情,但这是有代价的.看一下分散在/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Application文件夹中的TemplateInfo.plist文件,您将很快失去视野.新设置很难修改,甚至很难重新创建. boal-kiss.net的作者具有

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.

他提到的一件事震惊了我,因为在连接广泛使用XML继承的点时,我有相同的想法:

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.

我的问题是:有人知道这样的工具吗? Xcode中有隐藏的帮助程序实用程序吗?在某处可以下载吗?还是有人创建了这样的工具来生成那些TemplateInfo.plist XML?

我知道这很麻烦,但是手动处理所有这些文件是它自己的项目,一个麻烦的人不必在现代IDE中为此烦恼.

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.

更新:尽管您可以手动编写模板文件,但您不能依靠自己创建的模板来生存新版本Xcode所导致的Apple的API更改.我最终通过将现有项目复制到新项目中,编写了自己的模板项目系统.这是在一组专有的脚本说明和一个名为klipp的命令行RubyGem中完成的.请参阅: https://rubygems.org/gems/klipp

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

推荐答案

我希望Apple会在某个时候发布一种可帮助开发人员管理模板库的工具,但如果您想这样做,则必须优先考虑很快就会看到它.确保提交错误报告(https://bugreport.apple.com/),以便Apple知道这是一个问题.您甚至可以引用所有博客文章和论坛文章,这些文章显示了想要使用工具管理模板的开发人员的数量.

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.

这篇关于苹果使用XCode 4模板生成什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆