Is there any example code on how to subscribe to s...
# orbit-mvi
s
Is there any example code on how to subscribe to states and side-effects using a KMP ViewModel in Swift?
g
but unfortunately orbit is not ready for KMP
Sample with Shared ViewModel using KMP-ObservableViewModel: https://github.com/GuilhE/WhosNext Sample using KMP-NativeCoroutines only sharing data layers: https://github.com/GuilhE/Magic (my pref way to go)
hope it helps 😉
v
Thank you for the post and samples ❤️
but unfortunately orbit is not ready for KMP
I briefly skimmed through your blog but couldn’t find much explanation on why Orbit isn’t ready. There’s a footnote mentioning switching to KMP-ObservableViewModel, but it doesn’t explain why. Apologies if I missed it 🙏 ...I’ll make sure to go through your post more carefully, hopefully next week.
💪 1
g
their gradle plugin does not support Kotlin versions > 1.6.0, last update was 4 years ago 😞
K 1
a
Have just started to play around with updating orbit to the latest dependencies as well supporting more native platforms. I have initially started work on compose Multiplatform too - compiles but issues running android unit tests currently, seems to force me to run tests on an emulator/device. After that I was going to pick up viewmodel multiplatform support and see what can be done about better Multiplatform documentation. Hoping to have this stuff in place before KotlinConf :)
🎉 3
gratitude thank you 3
♥️ 2