curioustechizen
12/03/2025, 9:36 AMsuspend fun generateImage(prompt: String): ByteArray? is implemented on Swift as func generateImage(prompt: String) async throws -> KotlinByteArray?
However, in my experience, when I allow Xcode to generate the functions for conforming to such a protocol, it would generate 2 overloads for each suspend function
1. One that takes a completionHandler
2. An async one, but prefixed with a double-underscore
I've been deleting the first one and retaining the second one. In the above example, it would be func __generateImage(prompt: String) async throws -> KotlinByteArray?
If I remember correctly this is because this async function does not support cancellations (at least not in all situations), and I suspect this might have something to do with SKIE.
Has there been a change in this area recently? Is my understanding outdated?curioustechizen
12/03/2025, 9:37 AM