https://kotlinlang.org logo
s

spierce7

03/17/2020, 4:38 AM
If I have a Kotlin lib that does something asyncronously in the background, and returns a stream of data, what’s the best way to expose that from Kotlin to be consumed from Swift? For Android I’m returning it as a
Flow
.
s

spierce7

03/17/2020, 5:01 AM
Interesting! I don’t love it, but it seems reasonable. Thanks!
k

Kurt Renzo Acosta

03/17/2020, 5:02 AM
Yeah. Suspend functions don't have interop so this would do for now.
s

Sean Keane

03/17/2020, 10:28 AM
Can confirm. I made a working version of a VM using this FlowUtil. It seems to work ok for this use case
2 Views