1

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?

Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
Nikita
  • 1,811
  • 1
  • 20
  • 41

2 Answers2

1

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

Jef
  • 2,134
  • 15
  • 17
  • ok, 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 the newest XCode there is some other method? – Nikita Nov 06 '11 at 23:41
  • If the file does not exist than running the shell command on it won't have any affect. I don't have Lion so I cannot help you further with that. – Jef Nov 07 '11 at 15:07
0

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.

Nikita
  • 1,811
  • 1
  • 20
  • 41