https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

Derek Ellis

03/26/2020, 1:40 PM
What do people usually do for dependency injection on the Swift/iOS side of Multiplatform projects (or js for that matter)? I've tried Kodein but manually binding everything for constructor injection was a chore to say the least.
k

Kris Wong

03/26/2020, 1:40 PM
there is no solution that supports concurrency
Kodein is the only project that supports multiplatform at all, though i've heard Koin is working on it
i rolled my own dead simple DI/SL that uses
by inject()
d

Derek Ellis

03/26/2020, 7:19 PM
I guess I didn't have to deal with concurrency so I didn't have that issue, but that's good to keep in mind
I thought this was a neat idea https://chrynan.codes/kotlin-inject/ get to keep Dagger on the Android side, but I'm not sure where to go for iOS. Needle seemed nice because it had compile-time validation, but I have no experience with it