Hi everyone, is there any sample project that uses native library for iOS?
j
Jeff Lockhart
02/01/2024, 7:36 PM
What specifically is your requirement? My KMP library uses a native library for iOS and I have a couple sample apps that link the native framework, one through the CocoaPods plugin and the other manually to a local path.
c
Charles Jo
02/01/2024, 7:37 PM
Thanks, local path is my case. Let me chekc your samples. 👍
Charles Jo
02/01/2024, 7:38 PM
So for example, I have .a file as a static library for iOS as well as jar file for Android. I want to use these libraries in KMM.
Charles Jo
02/01/2024, 7:39 PM
I tried to use cinterop to generate kotlin bindings for the c functions in the library. not able to suceed
j
Jeff Lockhart
02/01/2024, 7:46 PM
I'm using an iOS framework and CocoaPods plugin to generate the C interop, appending some additional definitions. The cliApp manually links to native binaries on macOS, Linux, and Windows, which might be similar to what you're doing. The library generates the C interop for the native C binaries from this .def.