Remove Xcode Header Comments
1 min read

Remove Xcode Header Comments

Xcode header comments are taking up valuable editor space, how to remove those comments completely?

  1. Execute this script in your project root directory to remove the header comments from an existing project:
  1. Remove the header comments from the file templates, for Swift code the template file path is:

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source/Swift File.xctemplate

  1. If you just want to customize the header comment, not remove it, create a file at /Users/muyexi/Library/Developer/Xcode/UserData/IDETemplateMacros.plist with the below content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>FILEHEADER</key>
    <string>
//  muyexi.im
//  ___COPYRIGHT___
//
//</string>
</dict>
</plist>