XCode Templates was created to save time for iOS/MacOS developers that are usually spending time copy-pasting same code from another projects just to create new screen with simple UI elements. With XCode Templates this process can be significantly automated.
It automatically creates MVP components for a new screen: programmatical view, view controller, helpers, services, extension, models, etc.
The main idea is to create All-in-One solution where developer will be able to select template, UI framework (UIKit/SwiftUI) and select needed architecture (MVC/MVP/MVVM/VIPER). In every template I'm using only programmatical view, no xib/storyboard.
Feel free to leave your wishes and comments.
-
Create "Templates" directory
$ mkdir ~/Library/Developer/Xcode/Templates
-
Open "Templates" directory that you just created
$ cd ~/Library/Developer/Xcode/Templates
-
Clone repository
$ git clone https://github.com/mihail-konoplitskyi/4KSOFT-XCode-Templates.git
-
Restart XCode if it was opened
-
Open XCode project, press CMD+N, scroll down to 4KSOFT-XCode-Templates and use needed template
-
Add newly created module to a project
-
Remove module reference from a project (remove reference, not a directory)
-
Highly recommend to use SwiftLint in your project using .swiftlint.yml which was used to create templates
-
Templates are using different third-party frameworks. You can find installation guide below:
- SnapKit (DSL to make Auto Layout easy on both iOS and OS X)
All iOS/MacOS developers are spending tons of time doing absolutely identical work. This repository was created to solve this problem. In a close future I will create most recent templates for developers needs.
After most recent templates will be created with UIKit, I'll start preparing AppKit templates for MacOS and SwiftUI templates.