This is a set of templates for XCode to generate the Uncle Bob's Clean Architecture classes system for Swift 3.0 and Objective-C.
This work is based on Clean Swift Templates project (http://clean-swift.com) by Raymond Law. Portions are taken from templates project by HELM (https://github.com/HelmMobile/clean-swift-templates).
To learn more about Clean Swift and the VIP cycle, read: http://clean-swift.com/clean-swift-ios-architecture To get the original concept of the Clean Architecture, see Uncle Bob's explanation: https://www.youtube.com/watch?v=o_TH-Y78tt4
See the example MyLife2 app that is written in Swift via the Clean Templates.
To install the Clean Architecture XCode templates, run:
make install
To uninstall the Clean Architecture XCode templates, run:
make uninstall
Open XCode. Make new or open existing project.
I recommend making project's source code folder structure to be same as view controllers structure. Make Scenes folder and create one subfolder for each view controller you have in the project.
- Select the scene subfolder.
- Use menu File->New->File... or press ⌘N. Choose template window appears.
- Scroll to "1. Clean Architecture Swift" (or "2. Clean Architecture Objective-C") section depending on the language you use.
- Select "Scene" template and press Next. Choose options window appears.
- Enter the name of the scene and select the view controller's base class (f.e. UITableViewController) from the drop down list.
- Press Next. Scene classes are added to your project!
- Select unit tests subfolder in the project.
- Use menu File->New->File... or press ⌘N. Choose template window appears.
- Scroll to "1. Clean Architecture Swift" (or "2. Clean Architecture Objective-C") section depending on the language you use.
- Select "Quick Unit Test" if you use Quick/Nimble frameworks for unit testing (or "Unit Tests" for XCTest based tests) and press Next. Unit tests for Interactor Presenter and View Controller are added to your project!
- XCode 7.3+
- Swift 3.0+
- Objective-C