Changing the default header comment license in Xcode

With Xcode 9 there is a built-in option which you can find in the details below.

  1. Create a property list file named IDETemplateMacros.plist
  2. Add a FILEHEADER value to the Root and set its string value with your copyright text like Copyright © 2017 ...
  3. Copy the file to one of the following locations
    • For a single project and user
      <ProjectName>.xcodeproj/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist
    • For all team members in a single project
      <ProjectName>.xcodeproj/xcshareddata/IDETemplateMacros.plist
    • For all projects in a workspace for a single user
      <WorkspaceName>.xcworkspace/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist
    • For all projects in a workspace for all team members
      <WorkspaceName>.xcworkspace/xcshareddata/IDETemplateMacros.plist
    • For everything you work on, regardless of project
      ~/Library/Developer/Xcode/UserData/IDETemplateMacros.plist
  4. Create a new file – you should see the new copyright header

Sample IDETemplateMacros.plist for copy and paste:

<?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>
//  Created by Your Name on 29.12.17.
//  Copyright © 2017 Your Company. All rights reserved.
//  </string>
</dict>
</plist>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)