Change Company Name in Xcode

Sun, Feb 1

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. 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. 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. 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. Reply #

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>