hmlongco / Factory

A new approach to Container-Based Dependency Injection for Swift and SwiftUI.
MIT License
1.83k stars 115 forks source link

Replace resolver with the factory pacakge but my app architure is modular #195

Open EngOmarElsayed opened 6 months ago

EngOmarElsayed commented 6 months ago

Today, I have been trying to replace resolver with the factory pacakge but my app architure is modular and when I create a property inside an extension for the container and then go to another package in the app to use this instance, it doesn’t find any of the property’s I created. I created the property in a global file.

Did I miss something ?

Resolve files are the one’s that containes the extension of the container that contains the computed property’s

Screenshot 2024-03-25 at 7 23 51?AM
SaidAlSouti commented 5 months ago

I am struggling with the same problem here. My app is also modular and it follows Clean Architecture. So the domain layer (use cases) does not know the implmentation (doe snot impot data layer modules) so how can we resolve the data layer service as a protocol.

SaidAlSouti commented 5 months ago

Any update on this??

EngOmarElsayed commented 5 months ago

I think you should use Resolver insted it works

SaidAlSouti commented 4 months ago

I did return to Resolver package, which is archived. We raised this issue so the maintainers will be aware off.

hmlongco commented 4 months ago

Various solutions to this were described in the documentation on modularization.

https://hmlongco.github.io/Factory/documentation/factory/modules