TheLearner
TheLearner

Reputation: 19507

CompanyName in all new Xcode files not working

Since upgrading to Xcode 4 my company name is not appearing in any new files I create instead this appears:

Copyright 2011 MyCompanyName. All rights reserved.

I have gone into Terminal and run the command and restarted Xcode but nothing happens:

defaults write com.apple.Xcode PBXCustomerTemplateMacroDefinitions'{"ORGANIZATIONNAME" = "MyCompany";}'

defaults write com.apple.Xcode PBXCustomerTemplateMacroDefinitions'{'ORGANIZATIONNAME' = "MyCompany";}'

Upvotes: 3

Views: 1669

Answers (3)

Kevin
Kevin

Reputation: 771

To update all existing files, simply:

  1. Press CMD+OPTION+SHIFT+F to open the Find and Replace.
  2. Type in your old company name and the new company name. Xcode Find and Replace
  3. Press Replace All

To change the default value of __MyCompanyName__ for new all new files created, you can do the following:

  1. Select your project in Xcode (if the Inspector isn't visible, press CMD+1) Xcode Inspector

  2. In the File Inspector along the right sidebar (if the File Inspector isn't visible, press CMD+OPTION+1), edit the Organization entry under the Project Document section: Xcode File Inspector

All new classes that are added to the project will contain this new company name.

Upvotes: 0

Martin
Martin

Reputation: 281

Set your company name in your adresbook. Restart Xcode 4. Works for Xcode 4 Build 4A304a

Upvotes: 3

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

Select the project in the navigator and open the Utility pane. The organization name is found there.

Upvotes: 8

Related Questions