How to create a new “templates” category on Xcode 4 and use my own file templates there?

前端 未结 2 740
我寻月下人不归
我寻月下人不归 2021-02-09 10:00

I would like to start using my own templates for iOS applications. I don\'t want any significant changes, but simpler things like

  • add/remove some boilerplate code<
2条回答
  •  南方客
    南方客 (楼主)
    2021-02-09 10:42

    This blog post by borealkiss has detailed instructions. For starters:

    If you add your own templates, the place you should use is under the following path:

    ~/Library/Developer/Xcode/Templates/
    

    The problem is that it is quite hard to create a custom template. For example, to copy and paste the built-in template to your place will not show up the template on Xcode 4 until you manually change its identifier in TemplateInfo.plist.

提交回复
热议问题