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
I encountered this issue before, It looks like you need to:
rm -rf ios/Podfile ios/Podfile.lock ios/Pods ios/Runner.xcworkspace
and then run
flutter run
Source: https://github.com/flutter/flutter/issues/41900
UPDATE:
run this fix the issue too:
rm -f ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
I had the same problem following the steps of integrating without CocoaPods (https://firebase.google.com/docs/ios/setup#frameworks) and none of the other answers helped me.
What worked for me was removing -ObjC from Other Linker Flags on the target's Build Settings.
I am still not sure why that worked even though it is explicit written on the steps to add this flag, just wanted to share what worked for me in the attempt of maybe helping someone else.
For me I just installed Firebase framework to Xcode, not using CocoaPods due to other unsolvable issues. After build there is similar errors like above with "symbol(s) not found for architecture x86_64". (maybe because I am working with Xcode on VMWare)
Then I have to manually go to General - Linked Frameworks and Libraries and add:
libsqlite3.tbd, libz.tbd, libc++.tbd
for the project to work.
I tried the solutions in this question, and nothing worked. Also found other threads in SO and GitHub issues. Nothing helped. I am using Xcode 9.2, Swift 4, latest version of cocoa pods. This worked for me...
First, my podfile only contains one firebase pod since I am only using Analytics at this point, however solution approach should be the same if you're using more.
pod 'Firebase/Core'
Second, like documentation states, make sure -ObjC is added to your Other Linker Flags. I did this both at project and target level build settings. They were different.
Third and most important, at Project level build settings, Other Linker Flags, add the following
-framework
"FirebaseCore"
-framework
"FirebaseAnalytics"
-framework
"FirebaseInstanceID"
-framework
"FirebaseNanoPB"
-framework
"FirebaseCoreDiagnostics"
-framework
"nanopb"
Just discovered a similar problem and got it solved by clearing Pod-Cache.
Clear CocoaPods Cache
pod deintegrate && pod cache clean --all
Re-Install Pods
pod install
For me the issue was that xCode has a bug when I would drag in new frameworks it wouldn't set the target membership properly.
Expand all folders and go to your .framework files or .m files that you just dragged in before this started happening, highlight each one, press cmd+option+1 and make sure the target membership box is checked and set to required: