Change created by commented code tag in XcodE

Change created by tag in Xcode… Simple TIP!

If you want to change the header commented code tag

//  Created by {my name here} on 8/4/20.
//  Copyright 2020 __{my company name here}__. All rights reserved.

This name and company template is usually filled with your User and Company, the one is set on: System Preferences –> Users & Groups –> Current User

But if you have a different User, like a private or trivial one, regardless, you can change this name and other variables in the file header by creating a property list file called: IDETemplateMacros.plist

Copy the underneath file and save it as IDETemplateMacros.plist to one of the following locations.

The directory specifies in which context the customized text macros should be applied:

• For a single project and user: .xcodeproj/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist

• For all team members in a single project: .xcodeproj/xcshareddata/IDETemplateMacros.plist

• For all projects in a workspace for a single user: .xcworkspace/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist

• For all projects in a workspace for all team members: .xcworkspace/xcshareddata/IDETemplateMacros.plist

• For everything you work on, regardless of project: ~/Library/Developer/Xcode/UserData/IDETemplateMacros.plist

IDETemplateMacros.plist:

<?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>
//  ___FILENAME___
//  ___PROJECTNAME___
//
//  Created by YOUR NAME on ___DATE___.
//  Copyright © ___YEAR___ YOUR COMPANY. All rights reserved.
//</string>
</dict>
</plist>

Leave a Reply

Your email address will not be published. Required fields are marked *