Sean Chin Jun Kai
05/26/2025, 9:29 AMSean Chin Jun Kai
05/26/2025, 10:11 AMTask composeApplinkDebugFrameworkIosSimulatorArm64 FAILEDerror: Compilation finished with errors I suspect that it is because of the following declaration in the kmp library
cocoapods {
ios.deploymentTarget = libs.versions.ios.deploymentTarget.get()
framework {
baseName = "FirebaseAI" // Not FirebaseAIBridge due to ld: can't link a dylib with itself. same install_name as dylib being built
}
pod("FirebaseAIBridge") {
source = git("<https://github.com/SeanChinJunKai/FirebaseAIBridge>") {
branch = "main"
}
extraOpts += listOf("-compiler-option", "-fmodules")
}
}
Andrey Yastrebov
05/26/2025, 10:20 AMSean Chin Jun Kai
05/26/2025, 10:20 AMSean Chin Jun Kai
05/26/2025, 10:23 AMAndrey Yastrebov
05/26/2025, 10:50 AMSean Chin Jun Kai
05/26/2025, 10:56 AMAndrey Yastrebov
05/26/2025, 11:00 AMSean Chin Jun Kai
05/26/2025, 11:01 AMSean Chin Jun Kai
05/26/2025, 11:38 AMAndrey Yastrebov
05/26/2025, 11:38 AMSean Chin Jun Kai
05/26/2025, 11:42 AMSean Chin Jun Kai
05/26/2025, 1:08 PMAndrey Yastrebov
05/26/2025, 1:11 PMversion = "1.0"
Sean Chin Jun Kai
05/26/2025, 4:48 PMcocoapods {
version = "1.0"
podfile = project.file("../iosApp/Podfile")
summary = "Sample App demonstrating firebase-ai-kmp sdk"
homepage = "<https://github.com/SeanChinJunKai>"
license = "Apache-2.0"
ios.deploymentTarget = libs.versions.ios.deploymentTarget.get()
pod("FirebaseAIBridge") {
source = git("<https://github.com/SeanChinJunKai/FirebaseAIBridge>") {
branch = "main"
}
linkOnly = true
extraOpts += listOf("-compiler-option", "-fmodules")
}
framework {
baseName = "ComposeApp"
isStatic = true
}
}
and this is my iosApp podfile
source '<https://cdn.cocoapods.org>'
deployment_target = '15.0'
target 'iosApp' do
use_frameworks!
platform :ios, deployment_target
# Pods for iosApp
pod 'FirebaseAIBridge', :git => '<https://github.com/SeanChinJunKai/FirebaseAIBridge>', :branch => 'main'
pod 'composeApp', :path => '../composeApp'
end
but im still getting the below error:
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: '-ldl'
ld: framework 'FirebaseAIBridge' not found
error: Compilation finished with errors
FAILURE: Build failed with an exception.Andrey Yastrebov
05/26/2025, 5:55 PMSean Chin Jun Kai
05/26/2025, 5:59 PMAndrey Yastrebov
05/26/2025, 6:02 PMSean Chin Jun Kai
05/26/2025, 6:02 PMSean Chin Jun Kai
05/27/2025, 9:28 AMAndrey Yastrebov
05/27/2025, 12:26 PMCompile Kotlin Framework
build phase from your project
3. remove this, since you are using cocoapods integration
listOf(
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
binaryOption("bundleId", "com.seanchinjunkai.VertexSample")
}
}
Andrey Yastrebov
05/27/2025, 12:28 PMAndrey Yastrebov
05/27/2025, 12:29 PMAndrey Yastrebov
05/27/2025, 12:29 PMSean Chin Jun Kai
05/27/2025, 12:31 PMSean Chin Jun Kai
05/27/2025, 12:31 PMSean Chin Jun Kai
05/27/2025, 12:31 PMSean Chin Jun Kai
05/27/2025, 12:32 PM