How to replace the company name in the template headers in Xcode?
Asked Answered
H

5

11

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?

Hight answered 15/7, 2009 at 17:42 Comment(1)
Just a note for visitors: In Xcode 4 company name is set at project level, see this question: #5770626Googins
I
10

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

Inocenciainoculable answered 11/6, 2013 at 7:26 Comment(0)
A
9

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

Aposiopesis answered 15/7, 2009 at 17:46 Comment(0)
A
8

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

Avertin answered 15/7, 2009 at 17:49 Comment(0)
T
1

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.

Trichome answered 15/7, 2009 at 18:17 Comment(0)
C
0

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

Entered in Terminal.

Clinkscales answered 15/7, 2009 at 18:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.