如何更改 Xcode 4 中的版权模板?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5770126/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I change the copyright template in Xcode 4?
提问by woot586
Does anyone know how to change copyright in the templates for Xcode? That is, at the top of a new file it writes:
有谁知道如何更改 Xcode 模板中的版权?也就是说,它在新文件的顶部写入:
// Copyright 2011 {Company Name}. All rights reserved.
In previous Xcode versions you could change it by running the following command in the terminal:
在以前的 Xcode 版本中,您可以通过在终端中运行以下命令来更改它:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = “{Company Name}";}'
In Xcode 4.0 this method no longer works.
在 Xcode 4.0 中,此方法不再有效。
回答by u596219
Xcode 4 (and above) stores this on a per-project basis.
Xcode 4(及更高版本)在每个项目的基础上存储它。
If you select the project in the Project Navigator (Cmd-1) and open the File Inspector (Cmd-Opt-1), you'll see a field for "Organization" under "Project Document".
如果您在项目导航器 (Cmd-1) 中选择项目并打开文件检查器 (Cmd-Opt-1),您将在“项目文档”下看到“组织”字段。
回答by Argus
回答by Kheldar
__MyCompanyName__
being ugly (or if you aren't coding for the company set up in your profile), let's change it.
__MyCompanyName__
丑陋(或者如果您没有为您个人资料中设置的公司编码),让我们改变它。
Click on your project root in the
Project Navigator
on the leftEnable your Utilitiesview on the right while the project root is highlighted
Select the
File Inspector
, while the Identity displays yourProject Name
.Under
Project Document
is a text field called Organization. That's the proper place to set the value you want.
单击
Project Navigator
左侧的项目根目录在突出显示项目根目录时启用右侧的实用程序视图
选择
File Inspector
,而身份显示您的Project Name
.下面
Project Document
是一个名为Organization的文本字段。这是设置所需值的正确位置。
回答by Macmade
You can find the template files in /Developer/Library/XCode/Templates/
您可以在以下位置找到模板文件 /Developer/Library/XCode/Templates/
回答by Liam McNulty
Simply go to the Address Book application on your Mac and change the company name that is listed under your own address card.
只需转到 Mac 上的地址簿应用程序并更改您自己的地址卡下列出的公司名称。