How can I edit the automatic prefix generation for each new created file in Xcode?

405 Views Asked by At

How can I edit the automatic prefix generation that is generated when I create a new file? I mean a prefix like this one:

//  someViewController.h
//  someAppName
//
//  Created by someProgrammer on 11/6/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.

I just want to specify some other info.

I have typed:

"defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{USERNAME = "Some Name that I want to change";}'"

Nothing have changed. Same story with "FULLUSERNAME". And file com.apple.Xcode.plist not exists there. I have Lion 10.7.2 and latest XCode. May be in newest XCode there is some other method?

2

There are 2 best solutions below

0
On BEST ANSWER

OK, I have found that all that latest soft doesn't use com.apple.Xcode.plist. And if I enter in terminal commands like: defaults write com.apple.Xcode...... so it just creates new com.apple.Xcode.plist and doesn't use it. For company name there is option in XCode in project settings. And for username, Xcode uses Address Book contact.

2
On

You need to create a custom Xcode file template. See here and here.