https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
h

HenSh

02/25/2024, 7:05 AM
I created xcframework from kmm library and want to integrate it into another kmm library but I can’t access the xcframework, I tried to build:
Copy code
val myFrameworkDefFilePath = "src/nativeInterop/cinterop/MyFramework.def"
    val myFrameworkCompilerLinkerOpts = listOf("-framework", "MyFramework", "-F${projectDir}/libs/MyFramework.xcframework/ios-arm64")
    iosArm64 {
        compilations.getByName("main") {
            val MyFramework by cinterops.creating {
                // Path to .def file
                defFile(myFrameworkDefFilePath)

                compilerOpts(myFrameworkCompilerLinkerOpts)
            }
        }
        binaries.all {
            // Tell the linker where the framework is located.
            linkerOpts(myFrameworkCompilerLinkerOpts)
        }
    }
No errors, but when I try to call MyFramework I can’t find it, any idea?
2 Views