Another way of injecting classes to swift side with koin #2
osrl
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
Thanks for your feedback, And I think, extending the Koin_coreKoinApplication to store the main Koin context is a good idea. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, first of all, thanks for the repo. I've already shared this with you before but I just wanted to add this here for reference to other people:
here is how I use koin from swift side:
Koin.swift
KoinIOS.kt (iOS Main target)
ContentView.swift
This can even be improved with a property wrapper
I couldn't find a way to use the property wrapper with
@ObservedViewModel
though. So I'm using normal property initializer withinject()
for my ViewModels.Beta Was this translation helpful? Give feedback.
All reactions