I am using firebase as part of a project I am working on in iOS, and I just stumbled upon the following linking error when I try to compile my code against an iPhone 6 or 7
If nothing is working for you then try downgrading firebase pods. I downgraded it to '6.27.0' and it worked like a charm. I read this solution here.
pod 'Firebase/Core', '6.27.0'
I got the same error when I integrated Firebase manually without using CocoaPod and built for simulator. (There is no problem just for device build.)
This is old question, but it's related, so I show my recent solution.
First, I gave up building for only simulator.
It takes too long time for building, but I set "Build Active Architecture Only" to "No" to build all the targets including simulator.
Also I added "Any iOS Simulator SDK - arm64" in "Excluded Architectures" in Build Settings, because my Mac OS architecture is not "arm64" but "x86_64".
If necessary, you should add "Any iOS Simulator SDK - i386" too. Firebase contains "i386" architectures, but some other Ad SDK doesn't support "i386" any more.
That's my acceptable solution.
Also had this issue...
Added $(inherited)
to other linker flags in build settings and everything works fine now
Had the same problem, and for me the issue was that I had imported the FirebaseMessaging framework manually, by downloading the entire Firebase SDK and then manually importing the Messaging framework into the project (I didn't use Cocoapods or Carthage). I didn't import the other framework in the same folder, "Protobuf.framework". Once adding Protobuf and making sure the target memberships included my project target, it worked.
In my case, for using only Firebase Auth and Firebase Firestore, installing with Cocoapods, all I had to do was click the +
sign for both Debug
and Release
sections under Other Linker Flags
in Build Settings. The $(inherited)
flag was added automatically. Built just fine after that!
Screenshot
I have tried all advices but only this one worked !!! My error was this after installing firebase pod :
Undefined symbols for architecture x86_64
error: linker command failed with exit code 1 (use -v to see invocation)
And here is the only solution worked for me:
pod deintegrate && pod cache clean --all
rm -rf ~/Library/Developer/Xcode/DerivedData
then add the below version of Firebase to your pod file
pod 'Firebase', '6.27.0'
and then
pod install