-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a way to know when all dependencies are resolved #56
Comments
Hi, @sebastian-zarzycki-es . Sure, you can do it right away inside |
I wish I could help, but while I'm no stranger to DI/IoC concepts, I'm coming from different environments (mainly Flex and AngularJS) and I don't feel proficient enough in Swift at the moment, to contribute. But yes, I was thinking about such protocol, like you've described. I'd greatly appreciate such addition. From my evaluation, Dip is the best DI solution for Swift there is on the market atm (I didn't like Swinject or Typhoon that much). |
Ok, will add it in the next version 🙇 |
Awesome! |
@sebastian-zarzycki-es this feature is released with 4.3.0 - check out =) |
Great stuff, thanks! |
Hmm, @ilyapuchka , seems like I cannot pull 4.3.0 from cocoa pods if I have DipUI listed in pods as well. Apparently DipUI still targets 4.1.0, which prevents pods from getting 4.3.0. I know it's not the right place to ask as it's unrelated, but can someone look into this? |
@sebastian-zarzycki-es Thanks for noticing! Will fix Dip-UI pod spec and update it. |
For some reason, it doesn't work for me. I've updated it from pods now, it says it's 4.3.0 and I can see the public protocol declared in code, but if I use it, it says the protocol cannot be found (even if I use import Dip). Not sure why. |
Have you tried to deep clean project? Shift+Cmd+Alt+K and Shift+Cmd+K. |
That actually worked, thanks! I didn't know about this. One last think I've noticed is that DipUI got it's version reverted from 0.0.2 (as it was before in cocoapods) to 0.0.1 - was that intentional? |
No, in fact it was bumped to 0.1.0 |
Ah, got it. Ok, I guess we can finally close this now :) |
👍 |
Most solid IoC containers provide some form of notification after the object that has some dependencies, has the dependencies resolved.
If I set up my dependencies like so:
I need a way to determine within Login Model when loginService is resolved in, because I might need to instantly operate on it for some reason. I cannot do this in initializer, because loginService isn't injected yet. In theory, I could call a method within the resolveDependencies block, but that doesn't feel like an elegant solution. Does Dip provide/could provide something like this?
The text was updated successfully, but these errors were encountered: