Feb 01 2009
Change Company Name in Xcode
Although covered many other places on the net, I recently had to make a change to the name that Xcode automagically inserts when creating new files, so I figured I’d also pass on this tip to readers of this blog as well.
By default, Xcode inserts a company name something similar to the following in all new source files (.m .h etc):
Copyright (c) 2009 MyCompanyName. All rights reserved.
Changing this reference is as simple as entering the following from within a terminal window, replacing “YourNameHere” with the text you prefer. Also, make sure this is all entered on one line in the terminal.
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions
'{ORGANIZATIONNAME="YourNameHere";}' |
Tips by RSS
Tips by Email
Or you can also insert a company name in your Address Book entry.
Or you could even go to ~/Library/Preferences and double-click com.apple.Xcode.plist and use the handy-dandy plist editor to set this and a whole bunch of other interesting defaults not covered by the Xcode or IB preference panels.
You can also change the whole template XCode uses to generate these boilerplate comments, or create entirely custom templates for your XCode projects/files. Dylan covers how to do all that here.
You can open the ~/Library/Preferences/com.apple.Xcode.plist file directly in XCode now. It will present the file and has an advantage over Property List editor; XCode can search a plist.