is there a way to expose any ios lib from objc/swi...
# kotlin-native
c
is there a way to expose any ios lib from objc/swift to kotlin native? Just like the foundation library and other base ios libs which are already available with kotlin native
s
Use the cinterop tool. Make sure to add the framework in both the include and linking sections of the def file.
c
exactly what I was looking for, thanks!
o
@Sam I’ve been trying to do exactly what you are saying. But it says
command not found
. Could you please elaborate on where do I get
cinterop
?
s
It’s bundled with the k/n distribution but I just invoke it through Gradle. https://github.com/JetBrains/kotlin-native/blob/master/GRADLE_PLUGIN.md
o
thanks @Sam I managed to run
cinterop
and it generates
klib
. But I can not run iOS app due to linker error. I described it more detailed on SO https://stackoverflow.com/questions/54047711/kotlin-native-interop-linker-could-not-find-framework do you know what the problem it might be ?