Daniel
12/14/2024, 10:23 PM> Task :shared:checkSandboxAndWriteProtection
> Task :shared:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :shared:compileKotlinIosArm64 UP-TO-DATE
> Task :shared:xcodeVersion UP-TO-DATE
> Task :shared:linkDebugFrameworkIosArm64 FAILED
warning: Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: shared. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag.
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Please try to disable compiler caches and rerun the build. To disable compiler caches, add the following line to the gradle.properties file in the project's root directory:
kotlin.native.cacheKind.iosArm64=none
Also, consider filing an issue with full Gradle log here: <https://kotl.in/issue>
The /Applications/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 found
error: Compilation finished with errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIosArm64'.
> Compilation finished with errors
In my app I have the latest versions of Kotlin and Firebase:
kotlin {
androidTarget()
listOf(
iosX64(),
iosArm64(),
).forEach {
it.binaries.framework {
baseName = "shared"
}
}
plugins{
kotlin("android").version("2.0.21").apply(false)
kotlin("multiplatform").version("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 present in link Binary with Libraries from Xcode : image 1
Also in Frameworks targets: image 2
and I use the last version of Firebase SDK iOS 11.6.0: image 3
Also when I import FirebaseCore in swift for my app, everything goes as expected, I can even go inside the FirebaseCore import and check their code.
Version of gradle:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
What could be the problem of: ld: framework 'FirebaseCore' not found