My interpretation of the VIPER architecture for iOS with a Template
This is a template for Xcode. Adding it to the system, when selected, it will generate all the components, given the component name:
Wireframe
ViewItem
ViewProtocol
PresenterProtocol
Presenter
InteractorProtocol
Interactor
ServiceProtocol
Service
Entity
- Check out this template.
- Open the templates folder in Finder (
/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/
) - Create a new folder in it (I've called Patterns, but you can name it as you want. It will serve as the section name).
- In it, copy the VIPER.xctemplate
- Now, everytime you create a new file in Xcode, it will offer the option to generate the whole set of the VIPER architecture for you.