How to replace the company name in the template he

2020-02-25 08:55发布

When Xcode creates a new file, there's always something like this in the header:

//  Copyright 2009 __MyCompanyName__. All rights reserved.

How can I change that?

5条回答
Juvenile、少年°
2楼-- · 2020-02-25 09:15

You can change it in Xcode project File. This is my image for tutorial. enter image description here

查看更多
够拽才男人
3楼-- · 2020-02-25 09:18

Xcode will try to pull this information from your entry in the system address book - if you can't modify it there, try using this command to override:

defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions '{ ORGANIZATIONNAME = "ORGNAME";}'

查看更多
我命由我不由天
4楼-- · 2020-02-25 09:22

As a follow-up to the answer above, for documentation of that and many other preferences see the Xcode defaults reference

查看更多
可以哭但决不认输i
5楼-- · 2020-02-25 09:29

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions ' { "ORGANIZATIONNAME" = "javacom"; } '

Entered in Terminal.

查看更多
霸刀☆藐视天下
6楼-- · 2020-02-25 09:32

As of xcode 3, it will use the "company" field from your Address Book card if the "PBXCustomTemplateMacroDefinitions" key is missing from com.apple.Xcode.plist.

查看更多
登录 后发表回答