Changing the default header comment license in Xcode

后端 未结 11 1991
难免孤独
难免孤独 2020-12-04 08:05

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

/*
 *  .cpp
 *  
 *
         


        
11条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 08:27

    This blog post has some good steps for modifying file templates in Xcode 4.3:

    http://error-success.piku.org.uk/2012/04/27/how-to-make-xcode-4-3-2-templates/

    The /Developer folder no longer exists, so you copy the templates from within the Xcode.app bundle located in /Applications:

    /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/

    And place your modified copy here, as before:

    ~/Library/Developer/Xcode/Templates/File\ Templates/

    UPDATE: I decided to write a script that would extract the built in Xcode templates and replace the headers. Source and instructions can be found at the following url:

    https://github.com/royclarkson/xcode-templates

提交回复
热议问题