Currently working in a multi-platform project and ...
# multiplatform
i
Currently working in a multi-platform project and wanna share the
CoroutineDispatcher
I'm using for iOS. There's a few variants out there, but this specific implementation allows for using
delay()
calls in suspend function. I keep this object inside my
SharedViewModel
and use it to define the
viewModelScope
for iOS coroutines.
t
If you use the native-mt version of Coroutines you don't need this. Then you can just use Dispatchers.Main.
👆 1
👍 1
i
Appreciate the heads up!