Clean Swift Kai iOS Architecture is a proposal strongly based on Raymond Law's Clean Swift Architecture idea. The idea was to extract the VIP cycle setup from the ViewController into a Factory (here an enum
, but it could be a struct
with an abstraction without any problem). Another change was to use dependancy injection for the Interactor, Presenter, Router and Worker. Concerning the Worker, it is now used as a Facade for the different services used by the Scene.
To install the Clean Swift Kai Xcode templates, run:
make install_templates
To uninstall the Clean Swift Kai Xcode templates, run:
make uninstall_templates
If you check Enable segue routing ?
, func prepare(for segue: UIStoryboardSegue, sender: Any?)
will be overriden to give the task of passing datas to the router.
If you check Instantiated by Storyboard segue instead of code ?
, the setup won't be done in a factory enumeration but inside the ViewController directly.
Adaptation of the templates for SwiftUI + an example project