Home > AI > IOS >

change XCode header comment

File path:

~/Library/Developer/Xcode/UserData/IDETemplateMacros.plist

Template 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>ORGANIZATIONNAME</key>
        <string>Shanghai Fengcao</string>
        <key>FILEHEADER</key>
        <string>
// ___FILENAME___
// ___PACKAGENAME___
//
// Created by Shanghai Fengcao Culture Communication Ltd., Co (Shanghai Fengcao) on ___DATE___.
//
// Copyright © ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
// ------------------------
//
// Non-disclosure Terms
// -------------------------
// These codes are ___ORGANIZATIONNAME___'s property, employee cannot disclose, spread, copy, preserve, sell, and do other activities without the consent of ___ORGANIZATIONNAME___.
//
// Employee ___USERNAME___ agree with above terms.
//
// Technique Support
// -------------------------
// jobyme88.com
        </string>
</dict>
</plist>            

Text macros reference

COPYRIGHT

A copyright string that uses the company name of the team for the project. If there is no company name, the string is blank.

The example shows a copyright string when the company is set to “Apple”.

Copyright © 2017 Apple. All rights reserved.

DATE

The current date.

DEFAULTTOOLCHAINSWIFTVERSION

The version of Swift used for the default toolchain.

FILEBASENAME

The name of the current file without any extension.

FILEBASENAMEASIDENTIFIER

The name of the current file encoded as a C identifier.

FILEHEADER

The text placed at the top of every new text file.

FILENAME

The full name of the current file.

FULLUSERNAME

The full name of the current macOS user.

NSHUMANREADABLECOPYRIGHTPLIST

The entry for the human readable copyright string in the Info.plist file of a macOS app target. The value of the macro must include the XML delimiters for the plist. For example, a valid value is:

<key>NSHumanReadableCopyright</key>

<string>Copyright © 2017 Apple, Inc. All rights reserved.</string>

Notice that the value includes a newline.

ORGANIZATIONNAME

The company name for the team used for the provisioning profile.

PACKAGENAME

The name of the package built by the current scheme.

PACKAGENAMEASIDENTIFIER

A C-identifier encoded version of the package name built by the current scheme.

PRODUCTNAME

The app name of the product built by the current scheme.

PROJECTNAME

The name of the current project.

RUNNINGMACOSVERSION

The version of macOS that is running Xcode.

TARGETNAME

The name of the current target.

TIME

The current time.

USERNAME

The login name for the current macOS user.

UUID

Returns a unique ID. The first time this macro is used, it generates the ID before returning it. You can use this macro to create multiple unique IDs by using a modifier. Each modifier returns an ID that is unique for that modifier. For example, the first time the UUID:firstPurpose modifier is used, the macro generates and returns a unique ID for that macro and modifier combination. Subsequent uses of the UUID:firstPurpose modifier return the same ID. Adding the UUID:secondPurpose modifier generates and returns a different ID that will be unique to UUID:secondPurpose, and different from the ID for UUID:firstPurpose.

WORKSPACENAME

The name of the current workspace. If there is only one project open, then the name of the current project.

YEAR

The current year as a four-digit number.

Leave a Reply