Question or problem
Hello, i’m trying to built a modular app with tuist + swinject as DI. Let’s say i have:
- Main App target
- Features A, B. Each feature has it’s own interface and implementation target
- Something like DesignSystem as a core module.
In main app module i add all features (A,B) and all core modules (DesignSystem) as dependencies to create a common DI container to pull out dependencies later in feature modules.
In a feature module:
- In interface target i add all core module as dependencies
- In implementation target i add all core modules + FeatureName-Interface of the current as dependencies.
My first question: is it correct approach?
My second question: let’s say i want to open feature module B from module A. Then in module A i’m writing something like “import ModuleBInterface” and do some routing. Everything works but sometimes i get an error where Xcode cannot find a module. So do i need to add ModuleBInterface as a dependency to ModuleAImplemenation target? If yes, is there are any tips how can i automatically update dependencies list based on imports?
- Tuist version: 4.48.1