Forwarding Address: OS X

Saturday, September 04, 2004

Post #2 in which I explore things that I suspect are patently obvious to everyone else but not to me: only recently have I started using Project Builder again after a long hiatus (remember XCode?). When you create a new class file PB automagically sticks the following into the top of the file:
     Copyright 2004 __MyCompanyName__. All rights reserved.
But where to change __MyCompanyName__ from? I Googled, I read the PB docs, I couldn't find it. Finally I just resorted to clicking through every file created in the PB project and lo! there it is in InfoPlist.strings which, in hindsight, makes total sense.

So for the sake of Googling generations to come I record that here for posterity that they might be spared a fruitless hunt.

Update: I just created a new class file and there it is: __MyCompanyName__ so I'm totally wrong in the post above. If you have any idea where this gets set, kindly post to the comments.

Update 2:Scott posted the necessary link to the comments, thanks! Here for simplicity, type this into the Terminal:

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ "ORGANIZATIONNAME" = "CompanyName";  }'
Obviously.

6 Comments:

  • There has to be some place to change the default, maybe some environment variable. Unfortunately I have no idea where that is. Notice that the initial .m file it creates has your proper name in it, which it got from your user info, but it also says __MyCompanyName__.

    By Mike, at 9:37 AM  

  • Firstly, I detest the fact that I need a blogger account to post with my info.

    Secondly, this link looks like it might be an answer:

    http://www.macosxguru.net/article.php?story=2003092411095361


    Scott
    http://blankbaby.typepad.com

    By Anonymous, at 9:53 AM  

  • defaults write com.apple.xcode 'PBXCustomTemplateMacroDefinitions' "{ORGANIZATIONNAME = 'My Actual Company Name' ; }"

    By Anonymous, at 11:21 AM  

  • (I'll second the comment about the Blogger account requirement being annoying.)

    I'm surprised that you couldn't find it by Googling. I just typed "__MyCompanyName__ xcode" into Safari's Google search field and the first result had the answer.

    Eric
    http://outofcheese.org/

    By Anonymous, at 1:07 PM  

  • I'd like to think it's percolated up through the Google pagerank because it's now linked to from here and we're linked to from damned near everywhere (honest) and that before this morning it used to be down around position 53 217.

    Either that or my Google-fu just sucks.

    By Chris, at 2:14 PM  

  • Hey Guys!
    Thank you for that easy to find solution for my problem! I was searching for a solution to rename the __MyCompanyName__ field in the XCode Templates.. and found it on my google-session ;) great thing!

    By Anonymous, at 9:28 AM  

Post a Comment

<< Home