Xcode – Organization Name in Code Header

I did find out something at the Big Nerd Ranch interesting.  Xcode does not always pick up your company name properly from your address book entry.  It should pick up your name, company etc and fill in the standard header and copyright info as you make new source code files.   But it fails a lot of the time.

So here is how you fix it to show your organizational name for good.

Open up terminal.  Replace the word ORGNAME with whatever you want to show for who the code is copyrighted to.  This is all one line to enter into the terminal prompt.  It is going to simply edit a plist preference value setting.  Nothing major.

defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions ‘{ ORGANIZATIONNAME = “ORGNAME”;}’

Share