Linker errors when building for iOS
See original GitHub issueHi, in my KMM project, I’ve added the following to shared/build.gradle.kts
:
sourceSets {
val commonMain by getting {
dependencies {
implementation("dev.gitlive:firebase-auth:1.0.0")
...
But when I try building the iOS application, I get the following linker errors:
.app/iosApp
ld: warning: Could not find or use auto-linked framework 'GoogleDataTransport'
ld: warning: Could not find or use auto-linked framework 'FirebaseCoreDiagnostics'
ld: warning: Could not find or use auto-linked framework 'FirebaseAnalytics'
ld: warning: Could not find or use auto-linked framework 'nanopb'
ld: warning: Could not find or use auto-linked framework 'FirebaseAuth'
ld: warning: Could not find or use auto-linked framework 'FIRAnalyticsConnector'
ld: warning: Could not find or use auto-linked framework 'GoogleUtilities'
ld: warning: Could not find or use auto-linked framework 'FirebaseCore'
ld: warning: Could not find or use auto-linked framework 'GoogleAppMeasurement'
ld: warning: Could not find or use auto-linked framework 'GTMSessionFetcher'
ld: warning: Could not find or use auto-linked framework 'FirebaseInstallations'
ld: warning: Could not find or use auto-linked framework 'PromisesObjC'
Undefined symbols for architecture x86_64:
"_FIRAuthErrorDomain", referenced from:
_cocoapods_FirebaseAuth_FIRAuthErrorDomain_getter_wrapper0 in shared(result.o)
(maybe you meant: _cocoapods_FirebaseAuth_FIRAuthErrorDomain_getter_wrapper0, knifunptr_cocoapods_FirebaseAuth3_FIRAuthErrorDomain_getter )
"_OBJC_CLASS_$_FIRUser", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRMultiFactorSession", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRPhoneAuthProvider", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRAuthDataResult", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRGoogleAuthProvider", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRMultiFactorInfo", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIREmailAuthProvider", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRGitHubAuthProvider", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRFacebookAuthProvider", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRActionCodeSettings", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRTwitterAuthProvider", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRAuth", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIROAuthProvider", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIROptions", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRActionCodeInfo", referenced from:
objc-class-ref in shared(result.o)
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in shared(result.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I noticed that, when cloning the firebase-kotlin-sdk
repository and trying to build firebase-auth
from there, there’s an additional Carthage step which seems to download the required frameworks and link them:
*** Downloading binary-only framework FirebaseAuthBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"
… but this step doesn’t seem to happen when using dev.gitlive:firebase-auth:1.0.0
as a dependency. Is there a way to solve this issue? Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Apple Mach-O Linker Error | Apple Developer Forums
Hello together, im new in this forum. I just have some problem to test one of my apps. As soon as i press...
Read more >Linker errors when building with Xcode 12 and CocoaPods ...
Xcode 12 raises linker errors about architectures when building the navigation SDK using CocoaPods. These warnings also cause CocoaPods to ...
Read more >Linker errors when building for release on iOS - Airship Support
Linker errors like that could come as a result of an incorrect implementation of the SDK, or some configuration issues. The two things...
Read more >Ionic app linker errors after building for iOS - Stack Overflow
I am developing an app using the Ionic 4 framework and am currently attempting to build it for iOS and release it to...
Read more >Linking Errors Building For iOS. All latest versions. - Unity Forum
I'm encountering this error right now after attempting to build a spectatorview app for iPhone (from Mixed Reality Toolkit). I'm not very ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
sorry, forgot about that part. Add a Cartfile
${rootProject.projectDir}/ios/
containing the required Firebase dependencies: binary “https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json” == 6.30.0 binary “https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json” == 6.30.0 binary “https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json” == 6.30.0 binary “https://dl.google.com/dl/firebase/ios/carthage/FirebaseFunctionsBinary.json” == 6.30.0I think currently the library doesnt export Firebase to projects implementing it. It just tells Xcode to import the library. To add it, in your build.gradle: