With Xcode 9 there is a built-in option which you can find in the details below.
- Create a property list file named IDETemplateMacros.plist
- Add a
FILEHEADERvalue to the Root and set its string value with your copyright text likeCopyright © 2017 ... - 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
- For a single project and user
- 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>