curioustechizen
01/15/2024, 8:53 AM//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?