I’ve a kmm app that makes use of Firebase.
Within the android mission, the packages are discovered within the construct course of, the issue is with the ios app.
When I attempt to construct the iOS app, I obtain the error:
> Job :shared:checkSandboxAndWriteProtection
> Job :shared:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Job :shared:compileKotlinIosArm64 UP-TO-DATE
> Job :shared:xcodeVersion UP-TO-DATE
> Job :shared:linkDebugFrameworkIosArm64 FAILED
warning: Can't infer a bundle ID from packages of supply recordsdata and exported dependencies, use the bundle title as an alternative: shared. Please specify the bundle ID explicitly utilizing the -Xbinary=bundleId= compiler flag.
error: /Functions/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Please attempt to disable compiler caches and rerun the construct. To disable compiler caches, add the next line to the gradle.properties file within the mission's root listing:
kotlin.native.cacheKind.iosArm64=none
Additionally, contemplate submitting a difficulty with full Gradle log right here: https://kotl.in/problem
The /Functions/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: warning: ignoring duplicate libraries: '-lcompression', '-ldl', '-lz'
ld: framework 'FirebaseCore' not discovered
error: Compilation completed with errors
FAILURE: Construct failed with an exception.
* What went flawed:
Execution failed for activity ':shared:linkDebugFrameworkIosArm64'.
> Compilation completed with errors
In my app I’ve the most recent variations of Kotlin and Firebase:
kotlin {
androidTarget()
listOf(
iosX64(),
iosArm64(),
//iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "shared"
}
}
plugins{
kotlin("android").model("2.0.21").apply(false)
kotlin("multiplatform").model("2.0.21").apply(false)
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("dev.gitlive:firebase-firestore:2.1.0")
implementation("dev.gitlive:firebase-common:2.1.0")
implementation("dev.gitlive:firebase-auth:2.1.0")
implementation("dev.gitlive:firebase-functions:2.1.0")
}
}
The FirebaseCore is current in hyperlink Binary with Libraries from Xcode:
Additionally in Frameworks targets:
Additionally I exploit the final model of Firebase SDK iOS 11.6.0:
Additionally once I import FirebaseCore in swift for my app, all the pieces goes as anticipated, I may even go contained in the FirebaseCore import and verify their code.
Model of gradle:
distributionUrl=https://companies.gradle.org/distributions/gradle-8.9-bin.zip
What could possibly be the issue of:
ld: framework ‘FirebaseCore’ not discovered