130

Does anyone know how to change copyright in the templates for Xcode? That is, at the top of a new file it writes:

//  Copyright 2011 {Company Name}. All rights reserved.

In previous Xcode versions you could change it by running the following command in the terminal:

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = “{Company Name}";}’

In Xcode 4.0 this method no longer works.

Senseful
  • 86,719
  • 67
  • 308
  • 465
woot586
  • 3,906
  • 10
  • 32
  • 40

5 Answers5

238

Xcode 4 (and above) stores this on a per-project basis.

If you select the project in the Project Navigator (Cmd-1) and open the File Inspector (Cmd-Opt-1), you'll see a field for "Organization" under "Project Document".

一二三
  • 21,059
  • 11
  • 65
  • 74
73

You can change the copyright template in Xcode here:

Project Navigator -> File Inspector -> "Organization".

enter image description here

Argus
  • 2,241
  • 1
  • 22
  • 27
  • 1
    This actually helped me figure out where the Organization name was stored in my project. Thanks for that! (worked on XCode 12.2) – N.W Nov 28 '20 at 07:31
30

__MyCompanyName__ being ugly (or if you aren't coding for the company set up in your profile), let's change it.

  1. Click on your project root in the Project Navigator on the left

  2. Enable your Utilities view on the right while the project root is highlighted

  3. Select the File Inspector, while the Identity displays your Project Name.

  4. Under Project Document is a text field called Organization. That's the proper place to set the value you want.

Kheldar
  • 5,361
  • 3
  • 34
  • 63
10

You can find the template files in /Developer/Library/XCode/Templates/

Macmade
  • 52,708
  • 13
  • 106
  • 123
  • Thanks Macmade. For any one looking todo this I have replaced “___ORGANIZATIONNAME___" in each of the files with what I want the copyright to be. – woot586 Apr 24 '11 at 11:01
  • 3
    Sadly, Apple has deleted the /Developer folder for Lion/Mountain Lion. This answer doesn't work any more :( – Adam Oct 07 '12 at 15:38
  • 7
    The same folder hierarchy can now be found inside the xCode application bundle. – Macmade Oct 07 '12 at 16:04
1

Simply go to the Address Book application on your Mac and change the company name that is listed under your own address card.