Just created this new slide, summarizing what are ...
# multiplatform
d
Just created this new slide, summarizing what are the new components to use with KMP:
👍 13
b
Thanks for creating this, I was looking into how to use SwiftUI/Combine and your previous posts are really helpful.
h
A lot of "the future" feels more present day which is cool...I need at the concurrency line more carefully. I thought exposing coroutines to Android/iOS was a bad idea
d
@HankG you just need to use coroutines in the KMP shared code. You don’t need to expose them to the Android/iOS specific part.
👍 1
b
I’m not well versed with the coroutines implementation on iOS, but what are the main critiques against exposing coroutines to the platforms? Also I thought Kotlin coroutines will be part of Android ecosystem (like ktor) sooner or later.
d
@BollywoodVillain Ktor Client is a Kotlin MultiPlatform HTTP client library, not related to a specific platform. On Android it uses HTTPUrlConnection under the hood, and on iOS, it uses NSURLSession. Coroutines are also a multi-platform feature of Kotlin. It makes sense to use them in the shared code. I guess you could also expose it to an iOS app, and collect it via Swift callbacks, but that in most cases could be avoided.
b
What’s under the hood of the coroutines when they run on iOS? I wonder how the
async/await
has been implemented, is it GCD?
d
@BollywoodVillain I actually don't know for sure, but I suspect they use GCD.