Roger Kreienbühl
09/17/2025, 2:21 PMFrançois
09/17/2025, 2:23 PMFrançois
09/17/2025, 2:24 PMRoger Kreienbühl
09/17/2025, 2:25 PMFrançois
09/17/2025, 2:30 PMRoger Kreienbühl
09/17/2025, 3:23 PMld: warning: ignoring duplicate libraries: '-ldl'
ld: framework 'FirebaseCore' not found
I added the dependencies as followed:
swiftPackageConfig {
create("nativeDeps") {
minIos = "15"
linkerOpts = listOf("-ObjC")
dependency {
remotePackageVersion(
url = URI("<https://github.com/firebase/firebase-ios-sdk.git>"),
version = "12.2.0",
packageName = "firebase-ios-sdk",
products = {
add(ProductName("FirebaseCore"), exportToKotlin = false)
add(ProductName("FirebaseCrashlytics"), exportToKotlin = false)
},
)
}
}
}
and the targets for ios are like this:
listOf(
// iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.getTest("debug").apply {
val scratchDir =
if (target.name == "iosSimulatorArm64") {
"arm64-apple-ios-simulator"
} else {
"arm64-apple-ios"
}
linkerOpts +=
listOf(
"-rpath",
"${projectDir.path}/build/spmKmpPlugin/nativeDeps/scratch/$scratchDir/release/",
)
freeCompilerArgs +=
listOf(
"-Xoverride-konan-properties=osVersionMin.ios_simulator_arm64=16.0",
)
}
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
iosTarget.compilations {
val main by getting {
// Choose the cinterop name
cinterops.create("nativeDeps")
}
}
}
Am I missing something?François
09/17/2025, 6:08 PMFrançois
09/17/2025, 6:09 PMRoger Kreienbühl
09/18/2025, 4:44 PM