Does anyone have a good working example of how to ...
# multiplatform
c
Does anyone have a good working example of how to implement a kotlin interface with a suspend function on the Swift side? Here's what I see:
Copy code
//Kotlin
interface Foo {
    suspend fun getThing(): Bool
}

//Swift
class IosFoo: Foo {
    func __getThing(completionHandler: @escaping (KotlinBoolean?, Error?) -> Void) {
        // Actual implementation
    }
}
Xcode inserts the double-underscore prefixed method name and it feels weird. It also inserts an async/await version and then immediately complains about conflict. Has anyone found a way to implement a suspend function on the Swift side?