Hi! Is it possible to use objC library from kotlin/iosMain? I would like to use ZipArchive. Is it possible to call its methods directly from kotlin or do I need a cinterop wrapper? Does cocoapods integration plugin generate the cinterop automatically?
This is very cool. So one can say kotlin/native is more similar to C/C++ in terms of project config and library ecosystem. I could create kotlin bindings for some C libraries on linux too, right?
m
magnumrocha
03/28/2024, 12:44 PM
yes, if you have the header files for that, you can create a .def file to generate kotlin bindings for the libraries
m
Mikolaj
03/28/2024, 12:46 PM
Awesome! Thank you. I will need to probably create some projects to fully understand but this looks very promising
m
magnumrocha
03/28/2024, 12:48 PM
just remember you have to add the dependency on your iOS project anyway (Swift PM or pod file), because Kotlin Native will only create bindings.
I mean the binary of the bound library will not be embedded on the produced kotlin library
👀 2
m
Mikolaj
03/28/2024, 12:49 PM
This is important insight. I will keep that in mind 🙌