Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using kotlinx.coroutines from Kotlin/Native #1299

Closed
steve-the-edwards opened this issue Jun 26, 2019 · 2 comments
Closed

Using kotlinx.coroutines from Kotlin/Native #1299

steve-the-edwards opened this issue Jun 26, 2019 · 2 comments
Labels

Comments

@steve-the-edwards
Copy link
Contributor

Hi - I believe this is related to #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?

@ReginFell
Copy link

ReginFell commented Jun 27, 2019

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.

@elizarov
Copy link
Contributor

elizarov commented Apr 8, 2020

That is Kotlin/Native issue. It will close by this PR: JetBrains/kotlin-native#3915

@elizarov elizarov closed this as completed Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants