Dispatchers are the same only for iOS, not for Android.

ktorScope uses GlobalScope (not recommended at moment) that allows you to define global coroutine for background work. By default, GlobalScope uses Dispatchers.Default. It's ok for Android, but in iOS we need to specify all dispatchers by ourselfs. And we have to use dispatchers queue main, because dispatchers queue global (any qos) is not bound to any thread.


My name is Anna Zharkova, I'm from Barnaul. Lead Mobile developer, more than 7 years of experience. I develop both native and cross platform. Kotlin GDE

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store