如何在 Xcode 4.0 (build 4A304a) 中更改默认公司名称
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5286979/
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 to change the default company name in Xcode 4.0 (build 4A304a)
提问by Linkou Bian
Possible Duplicate:
Where do I set my company name?
可能重复:
在哪里设置我的公司名称?
I installed Xcode 4.0 (build 4A304a) just now. The default company name can't be updated via defaults command on my side. I googled a lot and tried many solutions (AddressBook, com.apple.Xcode and com.apple.dt.Xcode plist file ...) mentioned by others. None works for me...
我刚刚安装了 Xcode 4.0 (build 4A304a)。默认公司名称无法通过我这边的 defaults 命令更新。我在谷歌上搜索了很多并尝试了许多其他人提到的解决方案(AddressBook、com.apple.Xcode 和 com.apple.dt.Xcode plist 文件...)。没有一个对我有用...
It's not a big issue and I can even ignore it. But I just want to know why and how.
这不是什么大问题,我什至可以忽略它。但我只想知道为什么以及如何。
Did you meet with this issue with Xcode 4? Please advise, thanks!
您在 Xcode 4 中遇到过这个问题吗?请指教,谢谢!
回答by AndrewS
In XCode 4, open up your project. Select the top-most item in the Project Navigator (MyProjectName, 1 target, iOS SDK 4.3 -- or whatever). Open up the file inspector (View->Utilities). In the Project Document section, you should see an "Organization" line. Edit that, and new files that you create will display the new organization name. This is a project setting, hence you'll have to do it for every project. You'll have to search-and-replace to fix up any existing files.
在 XCode 4 中,打开您的项目。选择项目导航器中最顶层的项目(MyProjectName、1 个目标、iOS SDK 4.3 —— 或其他)。打开文件检查器(View->Utilities)。在项目文档部分,您应该看到“组织”行。编辑它,您创建的新文件将显示新的组织名称。这是一个项目设置,因此您必须为每个项目都这样做。您必须搜索并替换以修复任何现有文件。
For new projects that you create, the Organization Name will be whatever the value was on the previously open project. (You can edit it when creating the new project.)
对于您创建的新项目,组织名称将是先前打开的项目中的任何值。(您可以在创建新项目时对其进行编辑。)
If the Organization Name entry in the UI is blank (and for your very first project ever in XCode maybe?) it'll pull the business name from the "Me" card in your address book.
如果 UI 中的组织名称条目是空白的(对于您在 XCode 中的第一个项目,也许?)它会从您的地址簿中的“我”卡片中提取公司名称。
回答by nomo1751
This works for me!
这对我有用!
The ORGANIZATIONNAME substitution value in templates is now replaced with the Company Name from the current user's Address Book card if present, rather than MyCompanyName. If the PBXCustomTemplateMacroDefinitions user default has already been set, it will be honored.
That we have to set the company name of my name card in address book of the MacOSX.
模板中的 ORGANIZATIONNAME 替换值现在替换为当前用户地址簿卡中的公司名称(如果存在),而不是MyCompanyName。如果已经设置了 PBXCustomTemplateMacroDefinitions 用户默认值,则它将被遵守。
我们必须在MacOSX的地址簿中设置我名片的公司名称。
from: http://www.waterworld.com.hk/en/blog/set-company-name-xcode-4
来自:http: //www.waterworld.com.hk/sc/blog/set-company-name-xcode-4
回答by PostCodeism
No, no, and no. You see the TRUELY weird thing in Xcode 4 is that it's actually pulling the company name from the "Me" entry in your address book. This overrides all previous solutions!
不,不,也没有。您会看到 Xcode 4 中真正奇怪的事情是,它实际上是从地址簿中的“我”条目中提取公司名称。这将覆盖所有以前的解决方案!
I couldn't figure out why it kept on inserting my old company name.
我不明白为什么它一直插入我的旧公司名称。
- Checked the ORGANIZATIONNAME in the command line. That was set as my new company name. Fail, it was still overridden.
- Checked the Company Name entry in the Address Book. That was set as my new company name. Fail, it was still overridden.
- Changed the company name under the "Me" entry in the Address Book. Finally, success!
- 检查命令行中的 ORGANIZATIONNAME。那被设置为我的新公司名称。失败,它仍然被覆盖。
- 检查地址簿中的公司名称条目。那被设置为我的新公司名称。失败,它仍然被覆盖。
- 更改了地址簿中“我”条目下的公司名称。最后,成功!
回答by Korutech App Solutions
To clarify as there seems to be a lot of confusion every time I look for this.
澄清一下,因为每次我寻找这个时似乎都有很多困惑。
XCode will pull the company name from the 'me' entry in your address book IFthe organisation line in the project document section is blank. You can override your address book entry on a per project basis using the answer given by AndrewS.
如果项目文档部分的组织行为空白,XCode 将从您地址簿中的“我”条目中提取公司名称。您可以使用 AndrewS 给出的答案在每个项目的基础上覆盖您的地址簿条目。