-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ios test task is failing with: "Id: framework not found FirebaseCore" #499
Comments
In your project add:
Unfortunately cocoapod dependencies are not transitive so your tests wont be able to find them |
@Daeda88 How achieve it with SPM ? |
@PRUJA you cannot achieve this with SPM since Kotlin Native has no support for it. The problem with this is not in your iOS project, but rather in the app that gradle builds internally to run tests on. It needs to have the frameworks linked to start, much like your real iOS project. If the cocoapods block is too hefty for you (which I can imagine as it increases build times by a lot) you can manually set it in the block IFF you know the location of your frameworks: val iosTarget: KotlinNativeTarget.() -> Unit = {
binaries {
getTest("DEBUG").apply {
linkerOpts() // Set link to Framework here
}
}
}
iosX64(iosTarget)
iosArm64(iosTarget)
iosSimulatorArm64(iosTarget) |
In our own project we have a separate repo that simply contains the cocoapods block in gradle, and then use it to retrieve the required LinkerOpts for our project: Use it as:
|
Steps to reproduce:
dev.gitlive:firebase-firestore:1.12.0
to common dependenciesiosSimilatorArm64().binaries.framework { isStatic = true }
commonTest
source set:myKmpModule:allTests
Notes:
The build is failing only on ios test task, another platform tests are running fine.
Looks like
isStatic
andkotlin.mpp.enableCInteropCommonization
flags are not not working on test buildsThe text was updated successfully, but these errors were encountered: