I’ve seen how to define the __MyCompanyName__ macro value that displays in all header comments in XCode by defining it globally via a terminal command:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = "My Company";}'
However, I do work under multiple company names and would like an easy way to switch this depending on what project I’m working on. I realize that I can just write a simple shell script to do this, but then I still have to remember to run it every time I open a project. Am I missing an easy way to define this per project statically somewhere? (This seems like a silly hoop to have to jump through… Apple, hello?)
Since Xcode 3.2 (IIRC) this is a per-project setting.
Just “Get Info” on your project in Xcode. It’s right there on the “General” tab.
Update
The above answer is for Xcode 3.2. See Sri Sankaran’s & aeldron’s answers below for Xcode 4.
Update
Also appropriate for Xcode 4 is the first part of trtwn’s answer below. in other words, setting the “company” in the address book is one way to solve the problem in case the company will always be the same for all New files created in Xcode on a particular mac.