How do I add a dependency on a .framework to the `...
# kotlin-native
n
How do I add a dependency on a .framework to the
iosTest
target? Im getting an error
ld: framework not found FirebaseCore
in the task
linkDebugTestIos
d
Use this arg
-L/folder/where/framework/is/on/your/system
n
Thanks @Dominaezzz how do I add that arg in the build.gradle?
d
The same way you did
-framework FirebaseCore
d
Oh. You're consuming a library with framework dependency.
n
Yes
d
I'm not entirely sure how to do this with iOS. You need to access
linkerOpts
in gradle, for Windows, Linux, etc it's in the
executable
block.
n
And the firebase-auth module depends on the firebase-app module which is the one that has the FirebaseCore.framework dependency
n
We tried the below but didnt work:
Copy code
binaries {
    getTest("DEBUG").apply {
        linkerOpts("-F$projectDir/../build/FirebaseAnalytics/FirebaseCore")
    }
}
d
You have
-F
instead of
-L
b
also that path looks kind of funny to me. try
$buildDir
instead of
$projectDir/../build
1
Its because its in the top level build folder while $buildDir points to the submodule's build folder
d
rootProject.buildDir
. The other just seems a bit.... bare.
👍 1
n
Updated, unfortunately doesn't fix the issue though
Ok made good progress! had
binaries {...}
in
sourceSets
instead of
kotlin
🤭, thanks both for your help!
y
@Nick Williams Hi Nick. I have the exact same problem. Trying to run linkDebugTestIos fails with ld: framework not found FirebaseFirestore. Can you share how you fixed it?
n
i dont remmeber now but have a look in https://github.com/GitLiveApp/firebase-kotlin-sdk/
y
do you mean the build.gradle file of the firebase app module?
@Dominaezzz Hi, I saw your previous message in this thread, and I have the same exact issue, but I have no idea where my firebaseFirestore framework is.. can you please help?
d
Haven't touched this level of K/N for a while and idk about iOS. Try using
find
to find the framework.