iosswiftviper-architecture

How to use ModuleConfiguration and ModuleInitializer in swifty_viper implementation


I have generated a new VIPER module in my application using Generamba (https://github.com/strongself/Generamba) with it's swifty_viper template. It has generated a module which have Configurator group with "ModuleConfigurator.swift" and "ModuleInitializer.swift" files.

The question is how should I use them?


Solution

  • ModuleInitializer is object that you can add to storyboard. Not needed if you init module from the source code. ModuleConfigurator will setup main relations between VIPER components.

    You do not need to add any code to ModuleInitializer, it is support class to setup module from storyboard. But you may add some additional configuration to ModuleConfigurator. for example inject some shared network manager to interactor, or something like this.