How can we currently collect Flow from swift?
With the new Support for Kotlin’s suspending functions in Swift flow's collect method gets this rather unwieldy signature in swift
vm.topStoriesFlow.collect(
collector: Kotlinx_coroutines_coreFlowCollector,
completionHandler: @escaping (KotlinUnit?, Error?) -> Void
)
Any idea how it might be used or even if its usage is currently supported?
As Kevin stated one possible and popular approach would be to create a wrapper. You can check out kotlinconf-app/CFlow for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With