views:

337

answers:

3

Whenever I create a new .cpp/.h file in Xcode a comment is added to the top of the file. For example:

/*
 *  <file>.cpp
 *  <Name of project>
 *
 *  Created by <My name> on <Date>.
 *  Copyright <Year and company>. All rights reserved.
 *
 */

I want to change the default comment to be another license, like GPL/LGPL/ or something else. Is there somewhere I can change this behavior in Xcode?

A: 

I think its in one of these places:

  • Xcode preferences
  • A resource file/template inside the Xcode application
  • A template file somewhere else on your disk
  • Hard coded into Xcode (which I think it isn't but...)
alexy13
+1  A: 

Try modifying this file:

/Developer/Library/Xcode/File\ Templates/C\ and\ C++/Header\ File.pbfiletemplate/header.h
CaseyIT
+2  A: 

"/Developer/Library/XCode/File Templates"

any update of your SDK will wipe changes here so keep your template backed up somewhere else

Griffo
http://www.macresearch.org/custom_xcode_templates Here I found information on how to create new File Templates. (Though it was a bit self-explanatory)
ErikPerik