Xcode 8 模板存储在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40352366/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 09:31:50  来源:igfitidea点击:

Where are Xcode 8 templates stored?

xcodetemplates

提问by Aaron

I've browsed sources that say Xcode looks for templates at:

我浏览了说 Xcode 在以下位置寻找模板的来源:

~/Library/Developer/Xcode/Templates

~/Library/Developer/Xcode/Templates

but I see no such directory. Is there a new location? I want to make a custom template.

但我看不到这样的目录。有新地点吗?我想做一个自定义模板。

回答by original_username

There are multiple Library folders that Xcode.app searches.

Xcode.app 搜索多个库文件夹。

Apple stores the defaultTemplates that come with the app here:

Apple 将应用随附的默认模板存储在此处:

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates

You can add your own customTemplates to one of the standard Library folders, most likely you want "per user", which is here:

您可以将自己的自定义模板添加到标准库文件夹之一,很可能您想要“每个用户”,这里是:

~/Library/Developer/Xcode/Templates

But you could also choose "/Library" instead of "~/Library" if you want your templates to be accessible between multiple user accounts.

但是,如果您希望您的模板可以在多个用户帐户之间访问,您也可以选择“/Library”而不是“~/Library”。