How to replace the company name in the template headers in Xcode?

后端 未结 5 420
别那么骄傲
别那么骄傲 2020-12-30 08:17

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

//  Copyright 2009 __MyCompanyName__. All rights reserved.
<
相关标签:
5条回答
  • 2020-12-30 08:53

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

    0 讨论(0)
  • 2020-12-30 09:00

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

    Entered in Terminal.

    0 讨论(0)
  • 2020-12-30 09:01

    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";}'

    0 讨论(0)
  • 2020-12-30 09:10

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

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题