Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Caspa

macrumors member
Original poster
Apr 11, 2003
51
0
Sydney
Hi All,

Quick question regarding Xcode.
When I make new files it generates the usual:
/*
* untitled.h
* Project
*
* Created by bla bla on Fri Jan 09 2004.
* Copyright (c) 2004 __MyCompanyName__. All rights reserved.
*
*/

Anybody know how to set what it automatically generates, or at least set your company name? I've look everywhere in preferences, both in Xcode and Project builder.. anyone know?!

thanks :)
 

Caspa

macrumors member
Original poster
Apr 11, 2003
51
0
Sydney
grrr can't seem to get it to work..
copy-pasted defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions {ORGANIZATIONNAME = "My Company's Name"; } into terminal (and tried it after su'ing) but gave me: -bash: syntax error near unexpected token `}'
Am I doing something wrong? :confused:
 

iElvis

macrumors member
Jan 30, 2003
61
0
Wellington, New Zealand
I would love to know the answer to this too. I use xcode during school for my java class. I use my iBook while everyone else has to use the school comps (XP + Novell) including the teacher.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Originally posted by Caspa
grrr can't seem to get it to work..
copy-pasted defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions {ORGANIZATIONNAME = "My Company's Name"; } into terminal (and tried it after su'ing) but gave me: -bash: syntax error near unexpected token `}'
Am I doing something wrong? :confused:

I can't get this to work either! Try opening the file (~Library/Preferences/com.apple.Xcode) in the plist editor and add the definition there instead.
 

cp21yos

macrumors newbie
Jan 11, 2002
11
0
Sydney
If you company name has spaces like mine...

you need to add single quotes:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME = "Some Company Name"; }'
 

Caspa

macrumors member
Original poster
Apr 11, 2003
51
0
Sydney
Re: If you company name has spaces like mine...

Originally posted by cp21yos
you need to add single quotes:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME = "Some Company Name"; }'

Thanks heaps... worked! :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.