blog.kulman.sk/creating-your-own-xcode-templates

Preview meta tags from the blog.kulman.sk website.

Linked Hostnames

7

Thumbnail

Search Engine Appearance

Google

https://blog.kulman.sk/creating-your-own-xcode-templates

Creating and using your own Xcode file templates

Working on an iOS or macOS project in Xcode you typically create classes with the same structure over and over again. I use coordinators so I am creating new UIViewControllers, each time referencing RxSwift, having methods for setting up UI, bindings .. most of the time also containing a delegate for the coordinator. Having to create files with the same structure over and over again manually is a waste of time, a much better solution is creating Xcode file templates for those files. Xcode file templates File template location All the Xcode custom file templates are located in ~/Library/Developer/Xcode/Templates/File Templates and grouped into sections by their folder name. If you want Xcode to show a “Custom” section at the bottom of the new file dialog, just create a ~/Library/Developer/Xcode/Templates/File Templates/Custom folder. File template structure Each file template is a separate folder with a name ending in .xctemplate. If you want to create a simple “Swift Class” file template, you have to create a folder named Swift Class.xctemplate in ~/Library/Developer/Xcode/Templates/File Templates/Custom. Each file template folder should contain at least 3 files: TemplateInfo.plist - describing the template TemplateIcon.png - icon shown in the Xcode new file dialog ___FILEBASENAME___.swift - the actual template file



Bing

Creating and using your own Xcode file templates

https://blog.kulman.sk/creating-your-own-xcode-templates

Working on an iOS or macOS project in Xcode you typically create classes with the same structure over and over again. I use coordinators so I am creating new UIViewControllers, each time referencing RxSwift, having methods for setting up UI, bindings .. most of the time also containing a delegate for the coordinator. Having to create files with the same structure over and over again manually is a waste of time, a much better solution is creating Xcode file templates for those files. Xcode file templates File template location All the Xcode custom file templates are located in ~/Library/Developer/Xcode/Templates/File Templates and grouped into sections by their folder name. If you want Xcode to show a “Custom” section at the bottom of the new file dialog, just create a ~/Library/Developer/Xcode/Templates/File Templates/Custom folder. File template structure Each file template is a separate folder with a name ending in .xctemplate. If you want to create a simple “Swift Class” file template, you have to create a folder named Swift Class.xctemplate in ~/Library/Developer/Xcode/Templates/File Templates/Custom. Each file template folder should contain at least 3 files: TemplateInfo.plist - describing the template TemplateIcon.png - icon shown in the Xcode new file dialog ___FILEBASENAME___.swift - the actual template file



DuckDuckGo

https://blog.kulman.sk/creating-your-own-xcode-templates

Creating and using your own Xcode file templates

Working on an iOS or macOS project in Xcode you typically create classes with the same structure over and over again. I use coordinators so I am creating new UIViewControllers, each time referencing RxSwift, having methods for setting up UI, bindings .. most of the time also containing a delegate for the coordinator. Having to create files with the same structure over and over again manually is a waste of time, a much better solution is creating Xcode file templates for those files. Xcode file templates File template location All the Xcode custom file templates are located in ~/Library/Developer/Xcode/Templates/File Templates and grouped into sections by their folder name. If you want Xcode to show a “Custom” section at the bottom of the new file dialog, just create a ~/Library/Developer/Xcode/Templates/File Templates/Custom folder. File template structure Each file template is a separate folder with a name ending in .xctemplate. If you want to create a simple “Swift Class” file template, you have to create a folder named Swift Class.xctemplate in ~/Library/Developer/Xcode/Templates/File Templates/Custom. Each file template folder should contain at least 3 files: TemplateInfo.plist - describing the template TemplateIcon.png - icon shown in the Xcode new file dialog ___FILEBASENAME___.swift - the actual template file

  • General Meta Tags

    11
    • title
      Creating and using your own Xcode file templates - Igor Kulman
    • charset
      utf-8
    • X-UA-Compatible
      IE=edge
    • viewport
      width=device-width, initial-scale=1, shrink-to-fit=no
    • theme-color
  • Open Graph Meta Tags

    5
    • og:title
      Creating and using your own Xcode file templates
    • og:description
      Working on an iOS or macOS project in Xcode you typically create classes with the same structure over and over again. I use coordinators so I am creating new `UIViewControllers`, each time referencing RxSwift, having methods for setting up UI, bindings .. most of the time also containing a delegate for the coordinator. Having to create files with the same structure over and over again manually is a waste of time, a much better solution is creating Xcode file templates for those files.
    • og:type
      article
    • og:url
      https://blog.kulman.sk/creating-your-own-xcode-templates/
    • og:image
      https://blog.kulman.sk/images/XcodeTemplates.png
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:image
      https://blog.kulman.sk/images/XcodeTemplates.png
    • twitter:title
      Creating and using your own Xcode file templates
    • twitter:description
      Working on an iOS or macOS project in Xcode you typically create classes with the same structure over and over again. I use coordinators so I am creating new `UIViewControllers`, each time referencing RxSwift, having methods for setting up UI, bindings .. most of the time also containing a delegate for the coordinator. Having to create files with the same structure over and over again manually is a waste of time, a much better solution is creating Xcode file templates for those files.
  • Item Prop Meta Tags

    7
    • name
      Creating and using your own Xcode file templates
    • description
      Working on an iOS or macOS project in Xcode you typically create classes with the same structure over and over again. I use coordinators so I am creating new `UIViewControllers`, each time referencing RxSwift, having methods for setting up UI, bindings .. most of the time also containing a delegate for the coordinator. Having to create files with the same structure over and over again manually is a waste of time, a much better solution is creating Xcode file templates for those files.
    • datePublished
      2018-07-18T08:29:12+01:00
    • dateModified
      2018-07-18T08:29:12+01:00
    • wordCount
      391
  • Link Tags

    10
    • apple-touch-icon
      https://blog.kulman.sk/apple-touch-icon.png
    • canonical
      https://blog.kulman.sk/creating-your-own-xcode-templates/
    • icon
      https://blog.kulman.sk/favicon.ico
    • preload
      https://blog.kulman.sk/theme.png
    • preload
      https://blog.kulman.sk/images/avatar.jpg

Links

25