Change Company Name in Xcode

February 1, 2009

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

4 comments

Or you can also insert a company name in your Address Book entry.

by charex on Feb 2, 2009 at 2:19 am. Reply #

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.

by Rick Shafer on Feb 13, 2009 at 10:28 am. Reply #

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.

by Ryan Morlok on Feb 16, 2009 at 10:38 pm. Reply #

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.

by Walt Sellers on Sep 9, 2010 at 12:56 pm. Reply #

Post a comment:

Required.

Required. Not published.