如何更改Xcode的整个版权声明模板? [英] How to change entire copyright notice template for Xcode?

查看:1133
本文介绍了如何更改Xcode的整个版权声明模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经找到几个如何更改公司名称的答案,但是有什么方法可以更改Xcode中的整个版权模板?

I've found a few answers on how to change your company name, but is there any way to change the entire copyright template in Xcode?

例如:

/ p>

Change :

(c) 2012 MyCoolCompany

到:

(c) 2012 MyCoolCompany, unauthorized reproduction is prohibited, contact bla-bla-bla@example.com for details, etc.


推荐答案

转到:

/Developer/Library/Xcode/Templates/File Templates

或如果您使用较新的自包含 Xcode.app

or if you're using the newer self contained Xcode.app,

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Tem‌​plates/File Templates

为避免模板被Xcode更新破坏,请复制所需的模板编辑并将其移动到您的家庭库文件夹 -

To avoid the templates from being clobbered by Xcode updates, make a copy of the template that you want to edit and move it to your home library folder–

~/Library/Application Support/Developer/Shared/Xcode/File Templates

如果 - 假设是Objective-C类模板,以下子目录:

If - let's say - it's the Objective-C class template you want to change then, go to the following subdirectory :

/Cocoa/Objective-C class.xctemplate

打开:

NSObject/___FILEBASENAME___.h
NSObject/___FILEBASENAME___.m

并编辑它们。

提示:您必须根据需要调整尽可能多的模板文件如果您需要您的版权标头对NSDocument子类有效,请确保您也编辑这些文件...; - ))

Hint : You'll have to tweak as many template files as you need (e.g. if you need your copyright header to be valid for NSDocument subclasses, then make sure you edit those files too... ;-))

一个示例(我的 ___ FILEBASENAME ___ 文件类似):

An example (of what my ___FILEBASENAME___ files look like) :

/******************************************************
 | ___PROJECTNAME___
 |******************************************************
 | File : ___FILENAME___
 | 
 | Created on ___DATE___
 | By Ioannis Zafeiropoulos (a.k.a. Dr.Kameleon)
 |*********************************************************************
 | Copyright (c) ___YEAR___ InSili.co.uk. All rights reserved.
 |*********************************************************************/

这篇关于如何更改Xcode的整个版权声明模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆