Hello, I’m having linking issue to Firebase Librar...
# multiplatform
l
Hello, I’m having linking issue to Firebase Library. Yesterday, I had this error:
ld: framework not found FirebaseAuth
The solution [Described here] was to set
isStatic = true
:
Copy code
kotlin {
    android()
    
    listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach {
        it.binaries.framework {
            baseName = "shared"
            isStatic = true             <--------- This fixed it
    }
    . . .
}
Everything was working fine. Then it randomly started throwing a new linking error. I was also getting blank screen on iOS, but I resolved it by Erasing the simulator settings Then now i’m getting the following linking issue:
Copy code
Could not find or use auto-linked framework 'FirebaseAuth'
Could not find or use auto-linked framework 'GoogleUtilities'
Could not find or use auto-linked framework 'FirebaseCore'
Could not find or use auto-linked framework 'GTMSessionFetcher'
Could not find or use auto-linked framework 'FirebaseInstallations'
Could not find or use auto-linked framework 'GoogleAppMeasurement'
Could not find or use auto-linked framework 'GoogleAppMeasurementIdentitySupport'
Could not find or use auto-linked framework 'FirebaseCoreDiagnostics'
Could not find or use auto-linked framework 'GoogleDataTransport'
Could not find or use auto-linked framework 'nanopb'
Could not find or use auto-linked framework 'FirebaseAnalytics'
Could not find or use auto-linked framework 'PromisesObjC'
Undefined symbol: _FIRAuthErrorDomain
Undefined symbol: _OBJC_CLASS_$_FIRUser
Undefined symbol: _OBJC_CLASS_$_FIRMultiFactorSession
Undefined symbol: _OBJC_CLASS_$_FIRPhoneAuthProvider
Undefined symbol: _OBJC_CLASS_$_FIRAuthDataResult
Undefined symbol: _OBJC_CLASS_$_FIRGoogleAuthProvider
Undefined symbol: _OBJC_CLASS_$_FIRMultiFactorInfo
Undefined symbol: _OBJC_CLASS_$_FIREmailAuthProvider
Undefined symbol: _OBJC_CLASS_$_FIRGitHubAuthProvider
Undefined symbol: _OBJC_CLASS_$_FIRFacebookAuthProvider
Undefined symbol: _OBJC_CLASS_$_FIRActionCodeSettings
Undefined symbol: _OBJC_CLASS_$_FIRTwitterAuthProvider
Undefined symbol: _OBJC_CLASS_$_FIRAuth
Undefined symbol: _OBJC_CLASS_$_FIROAuthProvider
Undefined symbol: _OBJC_CLASS_$_FIROptions
Undefined symbol: _OBJC_CLASS_$_FIRActionCodeInfo
Undefined symbol: _OBJC_CLASS_$_FIRAuthTokenResult
Undefined symbol: _OBJC_CLASS_$_FIRApp
My Android app runs fine, but iOS is not working. btw I am following Make your Android application work on iOS – tutorial
The problem only happens when I import
shared
on the iOS project
I’ve looked at the ff GitHub issue, but it didn’t help: https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/111
r
It looks that it is similar issue as this one . Due to this I was unable to use gitlives firebase kotlin sdk and had to do it with interface and android and iOS sdks.
l
This method resolved the specific issue for me, but then I got stuck with Duplicate Symbols error. This issue makes sense because now there are two duplicate libraries imported [one through kmm and another with swift package]. It seems i’m progressing from problem to another problem lol.
@rudolf.hladik I resolved the issue and made a sample project: https://github.com/leoull/KMM-FirebaseAuth
796 Views