1、创建文件 IDETemplateMacros.plist

2、向文件里添加内容FILEHEADER

  • 具体内容

  1. // 文 件 名:___FILENAME___
  2. //
  3. // 版权所有:___COPYRIGHT___
  4. // 创 建 者:___FULLUSERNAME___
  5. // 创建日期:___DATE___.
  6. // 文档说明:
  7. // 修 改 人:
  8. // 修改日期:
  9. //

3、前往文件夹

  • 通过将 IDETemplateMacros.plist 文件放置到不同的目录,其影响的范围也不同:

    • 只对当前 Project 指定的用户(username)有影响

      .xcodeproj/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist
    • 对当前 Project 的所有成员有影响

      .xcodeproj/xcshareddata/IDETemplateMacros.plist
    • 对指定用户的 Workspace 下的 Project 有影响

      .xcworkspace/xcuserdata/[username].xcuserdatad/IDETemplateMacros.plist
    • 对所有成员 Workspace 下的 Project 有影响

      .xcworkspace/xcshareddata/IDETemplateMacros.plist
    • 对 Xcode 所有创建的文件都有影响

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

4、将IDETemplateMacros.plist移动到目录下, 新文件即生效

  • 效果图:

5、官方文档对应内容

  • 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 © 2018 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:

    NSHumanReadableCopyright

    Copyright © 2018 Apple, Inc. All rights reserved.

Notice that the value includes a newline.

  • ORGANIZATIONNAME

    The name for your organization that appears in boilerplate text throughout your project folder. The organization name in your project isn’t the same as the organization name that you enter in App Store Connect.

  • 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.


OC自定义文档头部注释的更多相关文章

  1. (转)HTML文档头部信息

    原文:http://www.cnblogs.com/sunyunh/archive/2012/07/25/2609199.html HTML(3)HTML文档头部信息   <!DOCTYPE h ...

  2. 关于文档头部定义和meta元素

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  3. IT兄弟连 HTML5教程 HTML文档头部元素head

    HTML头部标记是<head>,主要包括页面的一些基本描述语句,以及CSS和JavaScript,一般都可以定义在头部元素中.它用于包含当前文档的有关信息,例如网页标题和关键字等.通常位于 ...

  4. IDEA 自定义文件头注释

    什么是 IDEA 自定义文件头注释 IDEA 自定义文件头注释指的是创建 Java 类文件时,IDEA 可以自动设置文件头的注释信息,如下: 如何设置 IDEA 自定义文件头注释 打开 File-&g ...

  5. C#如何给PDF文档添加注释

    整理文档时,我们可能会需要在一些或一段文字上添加注释加以说明,那如何以编程的方式实现呢?本文将实例讲述C#中如何使用免费组件给PDF文档添加文本注释,包括自由文本注释.自由文本注释能允许我们自定义它的 ...

  6. idea 模版之自定义类与方法注释

    idea 模版之自定义类与方法注释 很多公司都有要求的代码注释规范,我们每新建类或者方法的时候从新复制粘贴很麻烦,而且容易粘错. 当然自定义模板还可以用到很多地方,比如系统自带的 sout就是syst ...

  7. SpringBoot(十一):springboot2.0.2下配置mybatis generator环境,并自定义字段/getter/settetr注释

    Mybatis Generator是供开发者在mybatis开发时,快速构建mapper xml,mapper类,model类的一个插件工具.它相对来说对开发者是有很大的帮助的,但是它也有不足之处,比 ...

  8. eclipse中设置自定义文档签名(工具)

    今天第一次认真学习eclipse的使用,看到自定义文档签名,步骤如下:  1.点击window->preferences->java->Code Style->Code Tem ...

  9. Eclipse中设置自定义文档签名

    今天第一次认真学习eclipse的使用,看到自定义文档签名,步骤如下: 1.点击window->preferences->java->Code Style->Code Temp ...

随机推荐

  1. win10下默认使用福昕打开PDF

    win10为了推他的edge浏览器, 将默认的pdf打开设置为了edge浏览器, 非常令人反感, 做浏览器就好好做浏览器, 为什么要默认打开pdf? 而且修改默认为福昕后, 下次打开pdf文件, 他又 ...

  2. Linux学习笔记 -- Shell 变量

    定义变量 语法: 变量名=值 myVal= 需要注意一下变量明德规则: 首个字符必须为字母(a-z,A-Z). 中间不能有空格,可以使用下划线(_). 不能使用标点符号. 不能使用bash里的关键字( ...

  3. 固态硬盘安装win7系统问题。

    可能出现:安装程序无法创建新的系统分区 出现这个错误后, 1.可以先尝试把固态硬盘插在硬盘的第一个硬盘口上,然后安装系统时拔掉U盘刷新再点击安装. 2.可以尝试在PE下直接安装系统. 如果上两个方法都 ...

  4. JQUEY 引用

    $(document).ready(function(){ alert($("a:first").attr("id")); });

  5. 有关DNS

    单位的域控制器和下面客户端的连接一直有问题,时常会找不到服务器连接: 错误基本显示为:没有可以登录的服务器 无法连接seed.com域 后来发现,是DNS解析的问题,单位使用了外部解析地址202.96 ...

  6. AMF解析之数据类型定义 (转)

    目录(?)[-] OpenRTMFPCumulus Primer15AMF解析之数据类型定义 数据类型 undefined Type null Type false type true type in ...

  7. codeforces:Helga Hufflepuff's Cup

    题目大意:有一个包含n个顶点的无向无环连通图G,图中每个顶点都允许有一个值type,type的范围是1~m.有一个特殊值k,若一个顶点被赋值为k,则所有与之相邻的顶点只能被赋小于k的值.最多有x个顶点 ...

  8. Docker01 centos系统安装、centos安装docker、docker安装mongoDB

    1 centos系统安装 本博文是基于 centos6.5 的,利用VMware 虚拟机搭建 centos6.5 系统 1.1 centos6.5资源获取 1.2 安装 1.2.1 新建虚拟机 1.2 ...

  9. Win10 Tensorflow 配置Mask_RCNN

    1.安装Anaconda3 下载地址  Anaconda 官网下载地址:https://www.continuum.io/downloads 下载以后,点击exe程序,开始安装,详细的安装过程(图片参 ...

  10. Docker学习笔记_安装ActiveMQ

    一.实验环境 1.宿主机OS:Win10 64位 2.虚拟机OS:Ubuntu18.04,虚拟机名称:Ubuntu18VM1,虚拟机IP:192.168.8.25 3.操作账号 :Docker 4.在 ...