更改Xcode项目模板

时间:2014-06-25 13:01:21

标签: xcode templates xcode5

我已经阅读了一些关于创建/编辑Xcode项目模板的帖子,但它们似乎不适用于Xcode 5.

我必须进行更改的目录是/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project Templates / Mac / Application / Command Line Tool.xctemplate

但是,我无法弄清楚我可以进行更改的位置,并包含我希望添加的头文件和其他语句。

Here is the screenshot of the folder

我甚至尝试在文件模板中编辑C ++类。但是,问题是只有在我向项目添加新的c ++类时,自定义类才会起作用。 main.cpp中没有可见的变化

1 个答案:

答案 0 :(得分:0)

这里有项目文件,用于设置所需的基本文件,而不是额外的文件。

当您添加新文件时,我们会在/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates

下添加一个模板

为C ++类复制/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate~//Library/Developer/Xcode/Templates/File Templates/<myGroup>/C++ File.xctemplate执行此操作(替换为所需的组名。然后编辑此目标目录中的文件。