https://kotlinlang.org logo
Title
a

Andrew Reed

02/14/2023, 5:28 PM
is there a roadmap for KMM native? Are there plans to support Pure Swift imports via the cocoapods plugin?
l

Landry Norris

02/14/2023, 5:48 PM
The YouTrack board shows the latest roadmap items. The K/N section indicates that pure-Swift imports are not currently on the roadmap.
The Swift ABI isn’t fully stabilized yet (I think Swift 6 or 7 is supposed to bring Module+ABI stability), so I’d imagine it’ll be a while before we see pure-swift interop in any language.
a

Andrew Reed

02/14/2023, 5:52 PM
shame, i guess one option is to write an objective-c wrapper that uses the swift code underneath and then use that via cocoapod import.
l

Landry Norris

02/14/2023, 5:53 PM
You can write Swift code, but you have to mark the class and methods with the objc annotation
Here's an example of a gradle plugin that allows you to write Swift code and call it from your Kotlin.
a

Andrew Reed

02/14/2023, 5:56 PM
interesting, will check it out cheers