I have a library that will be used by Android and ...
# multiplatform
t
I have a library that will be used by Android and iOS. It needs to use the Opus c-library. In the past, we used JNI and Cocoapods to provide that functionality when they were separate apps. I was wondering if it is possible to use Kotlin's C interop functionality and have this code put into commonMain instead of having expect/actual to use JNI/Cocoapods?
k
Cinterop is only for K/N
You will have to write JNI bindings and then wrap them in the kotlin JVM source set
t
Thanks. I already have the bindings for JNI implemented in the Android actual class. I need to figure out how to use cocoapods in the iOS actual. It's not recognizing the import right now. I expected the gradle sync to do the pod install for the dependencies, but I guess it doesn't. Thanks for the advice!