Changing the default header comment license in Xcode

后端 未结 11 1974
难免孤独
难免孤独 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:22

    Don't edit anything in /Developer as Apple can overwrite this at any time.

    The following works for Xcode 4, 5 and 6 except later source differs and is under /Applications

    Instead copy the templates that you want to change from /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates to ~/Library/Developer/Xcode/Templates/File Templates and then edit the files keeping the same directory structure but edit the directory name that is the template to not show up a a duplicate in Xcode.

    e.g for a new category of C/C+ files in Xcode 5 copy /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/C and C++ to ~/Library/Developer/Xcode/Templates/File Templates/GPL C and C++

    this process is copied from Red Glasses's blog

    For Xcode 4 the source path is or for Xcode 4 /Developer/Library/Xcode/Templates/File Templates

提交回复
热议问题