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

StackOverflow https://stackoverflow.com/questions/8029982

  •  22-02-2021
  •  | 
  •  

Frage

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?

War es hilfreich?

Lösung 2

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.

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top