Tag: xcode
-
Create custom Xcode templates
Everytime we create a new file, Xcode suggests some built-in templates that may be useful. Luckily, we could also create our own templates. Technically, Xcode looks for templates in ~/Library/Developer/Xcode/Templates and /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates. Let’s call the first path P1 and the second path P2. A template could be iferred by a folder MY_TEMPLATE.xctemplate. Assume we gonna create a template for MVVM. It should create 3 files: [Feature]Model.swift, [Feature]ViewModel.swift and [Feature]ViewController.swift. Ex: LoginModel.