When you create a new file with Xcode, the following comment is added to the header. I want to change this because my real name may be included.
//
// ContentView.swift
// Shared
//
// Created by [name] on 2020/10/21.
//
Xcode Below are multiple paths for the template files. https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/dev91a7a31fc
In this User Xcode data: ~/Library/Developer/Xcode/UserData/IDETemplateMacros.plist You can set the file in.
vim ~/Library/Developer/Xcode/UserData/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___
// ___TARGETNAME___
//
// Created by ___USERNAME___ on ___DATE___
// ___COPYRIGHT___
//</string>
</dict>
</plist>
That's it. When you create a new file in Xcode, the comment specified in the template is inserted.
AppCode It is not changed by the same procedure as Xcode above. For AppCode, edit the following settings.
-Explanation of file templates https://pleiades.io/help/objc/using-file-and-code-templates.html
・ List of variables https://pleiades.io/help/objc/file-template-variables.html
The Copyright ~~ statement is not displayed unless the organization name ($ ORGANIZATION_NAME) is defined. To set, open the setting with "⌘;" and edit the Organization from the General tab.