I have a bug, If I apply this suggestion then it f...
# multiplatform
d
I have a bug, If I apply this suggestion then it fails to run the app (compiles fine)
I use:
Copy code
swiftPackageConfig {
    create("spmMaplibre") {
        dependency {
            remotePackageVersion(
                url = URI("<https://github.com/maplibre/maplibre-gl-native-distribution.git>"),
                products = { add("MapLibre") },
                version = "6.17.1",
            )
        }
    }
}
then
Copy code
listOf(
    iosX64(),
    iosArm64(),
    iosSimulatorArm64()
).forEach { iosTarget ->
    val variant = when (iosTarget.targetName) {
        "iosArm64" -> "arm64-apple-ios"
        "iosSimulatorArm64" -> "arm64-apple-ios-simulator"
        "iosX64" -> "x86_64-apple-ios-simulator"
        else -> error("Unrecognized target: ${iosTarget.targetName}")
    }

    val rpath = "${project.layout.buildDirectory.get()}/spmKmpPlugin/spmMaplibre/scratch/$variant/release/"

    iosTarget.compilations {
        getByName("main") {
            cinterops.create("spmMaplibre")
        }
    }
    iosTarget.binaries.framework {
        baseName = "ComposeApp"
        isStatic = true
        binaryOption("bundleId", "com.mafrend.app.compose")
        linkerOpts("-F$rpath", "-rpath", rpath)
    }
}
f
did you try to build from xcode? does it work ?