Changing __MyCompanyName__ in XCode

Scenario

You start a new project in XCode, and it rather cutely picks up your name from the Address Book, and attributes you as the creator of the auto-generated code. However, in a rather sterile fashion, it tells you that the code is the copyright to  __MyCompanyName__.

// Created by John Doe on 04/10/2009
// Copyright __MyCompanyName__ 2009. All rights reserved.

I can think of things I would rather set this to, so how can we change it, without editing every file that is created?

Solutions

1. Changing the company name of code that you write, in Address Book

Unsurprisingly, XCode also grabs your company information from your Address Book entry.

Open Address Book, and make sure you have entered a name in the Company field on your own Card.

Company field set in Address Book

XCode will check this field when creating new projects and files, and enter your assigned Company of the copyright owner of the work you create.

This may or may not be what you want to achieve.

2. Changing the default value for company names

If you would rather not have a company name in your Address Book, or if you don’t want the copyright of your code attributed to that company name, you can change the default value XCode uses. You might, for example,  prefer to use your own name in the copyright line.

Open a Terminal window, and type the following command (on a single line):

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions -dict ORGANIZATIONNAME "Funky Monkey Futures, Inc"

This will result in all new files having your chosen company name in the copyright attribution, regardless of your Address Book entry.

// Created by John Doe on 04/10/2009
// Copyright Funky Monkey Futures, Inc 2009. All rights reserved.

Note: This option will override your Address Book settings, rather than act as a default if that setting is missing.

Disclaimer

The above information is true as of XCode 3.1 running on Leopard.

Posted on October 4, 2009 at 11:56 am by d. · Permalink
In: Development · Tagged with: ,

8 Responses

Subscribe to comments via RSS

  1. Written by CAMERON
    on Thursday 24 June 2010 at 12:42 pm
    Permalink

    Medicamentspot.com International Legal RX Medications. Special Internet Prices (up to 40% off average US price). NO PRIOR PRESCRIPTION REQUIRED!…

    Combivir@buy.online” rel=”nofollow”>.…

  2. Written by HECTOR
    on Friday 25 June 2010 at 9:07 pm
    Permalink

    Pillspot.org. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Pillspot.org. Herbal-supplements@buy.online” rel=”nofollow”>.…

    Categories: Antiviral.Mental HealthAntidiabetic.Skin Care.Blood Pressure/Heart.Anxiety/Sleep Aid.Stop SmokingMens Health.Antibiotics.Pain Relief.Vitamins/Herbal Supplements.Stomach.Anti-allergic/Asthma.Weight Loss.Antidepressants.Womens Health.Eye…

  3. Written by NORMAN
    on Thursday 15 July 2010 at 8:45 pm
    Permalink


    PillSpot.org. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. Online Pharmacy. Buy drugs online

    Buy:Cialis Professional.Super Active ED Pack.Propecia.Viagra Professional.Zithromax.Cialis Soft Tabs.Viagra Super Active+.Tramadol.Levitra.Cialis Super Active+.Soma.Cialis.Viagra.VPXL.Maxaman.Viagra Soft Tabs.Viagra Super Force….

  4. Written by solo
    on Sunday 29 August 2010 at 11:37 am
    Permalink
  5. Written by Grow
    on Sunday 29 August 2010 at 12:15 pm
    Permalink
  6. Written by Hugger
    on Sunday 29 August 2010 at 10:35 pm
    Permalink
  7. Written by Supplement
    on Sunday 29 August 2010 at 11:08 pm
    Permalink
  8. Written by Kitchen
    on Monday 30 August 2010 at 8:22 am
    Permalink

Subscribe to comments via RSS

Leave a Reply