https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
b

bod

11/05/2019, 10:27 AM
Hello, World! When using a kotlin mpp module exported as an iOS Framework, all
suspend
functions seem to be not visible from swift. I suppose this is a known limitation? Is there an official documentation about this?
a

Artyom Degtyarev [JB]

11/05/2019, 10:30 AM
b

bod

11/05/2019, 10:32 AM
thanks a lot 👍
any insight as if
suspend
function are planned to be supported one day?
r

ribesg

11/05/2019, 10:57 AM
The language would need to support it, so no
The solution is to write your iOS code in Kotlin 🙂
j

Jonas Bark

11/05/2019, 11:28 AM
b

bod

11/05/2019, 12:51 PM
thanks a lot 👍 🙂
Hello @Jonas Bark! (Sorry for the long delay) I've just tried your plugin, and I notice it doesn't want to work when I target
macosX64
(" Unable to find a matching variant".) Is it something for which you would like me to open a bug?
j

Jonas Bark

11/17/2019, 2:56 PM
sure, go ahead
👍 1
b

bod

11/17/2019, 4:10 PM
also, I don't know what I'm doing wrong but I can't see the generated methods in the framework's .h file. Ideas?
j

Jonas Bark

11/17/2019, 4:11 PM
is the kotlin file generated correctly? into which directory?
b

bod

11/17/2019, 4:17 PM
yes, in
commonMain
oh! nevermind! it's actually there 🙂 I've been trolled by gradle (it appeared after a clean)
well ... maybe I'm too much of a noob in Swift, but I have no idea how to call the extension 😞