Hi - I believe this is related to https://github.com/Kotlin/kotlinx.coroutines/issues/246, but that was closed, so I open a new issue.
I used kotlinx.coroutines for my shared library project, with the include as
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version"
Where version was 1.2.1
The common code co-routines work fine from Android.
This produced a .framework successfully for use in iOS. However, all the suspend functions are not put in as attributes in the header, and thus not available in Swift or ObjC. Does this still require an actual implementation on the iOS side of things?
How can this be used in iOS? Or do we need to have an async wrapper in the common code as well strictly for iOS usage?
The same issue.
Is there any way how kotlin compiler can automatically transform suspend function into callbacks?
Also, it was weird that in case of suspend functions compiler didn't warn that they will be ignored for iOS.
That is Kotlin/Native issue. It will close by this PR: https://github.com/JetBrains/kotlin-native/pull/3915
Most helpful comment
The same issue.
Is there any way how kotlin compiler can automatically transform suspend function into callbacks?
Also, it was weird that in case of suspend functions compiler didn't warn that they will be ignored for iOS.