Hi! I have a ios app that imports a KMM via pod. I...
# multiplatform
t
Hi! I have a ios app that imports a KMM via pod. In Swift, I have access to the compiled kotlinx_coroutines_coreFlow, Shouldn't I also have access to a kotlinx_coroutines_core_kotlinx_coroutines_flowcallbackFlow, to have access to the callbackFlow function (https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/callback-flow.html) in Swift/Objective C, for example? Isn't callbackFlow and flowOf, and all of kotlin code compiled to Obj C?
r
A lot of flow API is not available to Swift because its suspending
t
But my KMM suspending functions are available in Swift
l
Not that cancellability is not supported there for now though. The reason why
callbackFlow
doesn't work is most likely because it takes a suspending lambda, which is a non-existing concept in Objective-C.
👍 1