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

Bradleycorn

01/27/2023, 9:15 PM
HI all, The last time I used KMM, there were a few “issues” related to iOS: 1. An iOS app could only have a single KMM module dependency. Workaround was to create an “Umbrella Framework” with all of your KMM dependencies for the iOS app. 2. Coroutines and Flows were a bit of a problem (mainly around cancellation) in iOS. A popular workaround was to use the KMP-NativeCoroutines library to “convert” coroutines and flows to Swift equivalents (Async/Await and Combine). Are these issues still present, and are the mentioned workarounds still recommended?
a

ayodele

01/27/2023, 9:24 PM
1. Still the workaround. For number 2 you can turn your flow into a callback, by writing an adapter around it.
b

Bradleycorn

01/27/2023, 9:25 PM
thanks @ayodele!
a

a-dd

01/27/2023, 9:34 PM
There is a new API for helping with an «umbrella framework» case. See https://kotlinlang.org/docs/multiplatform-native-artifacts.html
4 Views