change company name in code files

Discussion in 'iOS Programming' started by match311, May 9, 2009.

  1. match311 macrumors member

    Joined:
    Jun 16, 2007
    #1
    I'm a just learning how to use the SDK and writing some simple code, then I noticed every new file I make Apple inserts my name,date and copyright. like this:

    //
    // MyViewController.m
    // HelloWorld
    //
    // Created by Me on 5/9/09.
    // Copyright 2009 CompanyName. All rights reserved.
    //

    My problem is, when I downloaded the SDK I set the "CompanyName" to the name of my University. So, I would like to change that so my University does not have copyright of my code. I know I can delete the lines and change it to whatever company name I want, but I would like to know if there is a solution that will change my company from-here-on-out. Then, any new code I write will be properly copyrighted to me, automatically.
     
  2. Compile 'em all macrumors 601

    Compile 'em all

    Joined:
    Apr 6, 2005
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    In Terminal, do this:

    Code:
    defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions '{ ORGANIZATIONNAME = "John Doe"; }'
    (Replace "John Doe" with whatever you want it to say.
     
  4. match311 thread starter macrumors member

    Joined:
    Jun 16, 2007
  5. JimBobBennett macrumors member

    Joined:
    May 4, 2009
    #5
    If you set your company name in your address book card, it will use that.
     

Share This Page