Hello all! I am currently trying to add a custom X...
# multiplatform
l
Hello all! I am currently trying to add a custom XCFramework to the shared KMM module without using cocoapods. This is my
MetalEngine.def
file :
Copy code
language = Objective-C
modules = MetalEngine
package = MetalEngine
And this is the gradle build script from shared module :
Copy code
iosTarget("ios") {
        binaries {
            framework {
                baseName = "shared"
            }
        }

        compilations.getByName("main") {
            val MetalEngine by cinterops.creating {
                defFile("src/nativeInterop/cinterop/MetalEngine.def")
                compilerOpts("-framework", "MetalEngine", "-F/shared/src/MetalEngine.xcframework")
            }
        }

        binaries.all {
            linkerOpts("-framework", "MetalEngine", "-F/shared/src/MetalEngine.xcframework")
        }
    }
Im getting
fatal error: module 'MetalEngine' not found
error. Am I missing any config step?
k
I would guess that your path is absolute, not relative
"-F/shared/src/MetalEngine.xcframework"
b
Did you get this to work?