Kotlin native for iOS should compile to a framewor...
# kotlin-native
a
Kotlin native for iOS should compile to a framework/library project for iOS targets so that any iOS developer can just use it and build their apps with swift if they need be
o
yes, we were considering this approach, but this requires designing bindings of Kotlin to Objective C/Swift to call functions written in Kotlin. Current approach we're using is implementing protocols in Kotlin/Native and register handlers for interesting events.
a
I see. you would have to generate objc header files?
o
yes, pretty much, along with types mapping
a
well this would defeat the purpose of open source kotlin libraries for iOS devs
they wouldnt be able to use libraries written in Kotlin Native then and require them to reimplement their app in Kotlin
it rubs against the JVM compatibility where you interop is pronounced and the original whole premise of Kotlin
also not allowing interop between Kotlin + Swift/ObjectiveC means that is a already a nonstarter for many well established apps and companies, so they cannot in stages migrate a codebase over to full Kotlin