Source and more elaborate explanation can be found here:
https://stackoverflow.com/a/64139830/4134160
Please note that the problem is not related to Firebase. I'll still leave it since it might lead others to this issue and help them to resolve this.
Apple Silicon
If you're running on an apple silicon chip, consider @Aspen's answer below:https://stackoverflow.com/a/65460729/4134160
After adding arm64
to Excluded Architectures
for the main project AND for the Pods project, I was able to resolve this issue I ran into on an Apple M1.
I also had to clear the DerivedData
folder and restart Xcode.
For more information, see: https://medium.com/@khushwanttanwar/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9
I fixed the issue by running xcode12 under Rosetta (Apple M1).
Open Finder -> Application -> locate Xcode -> right click -> get info -> check open using rosetta.
then reopen xcode.
My case was a little different. According to this Firebase engineer,
FIRAnalyticsConnector
is now part of the xcframework version ofFirebaseAnalytics and isn't needed to link.
Going into the Targets Build Settings
(not the Project), searching for Other Linker Flags
, and then deleting FIRAnalyticsConnector
from the list took care of the issue for me.
Interestingly, when I ran pod deintegrate
and the pod install
it did not fix this issue.
On my end, following the instruction from this link https://github.com/firebase/firebase-ios-sdk/blob/CocoaPods-7.2.0/AppleSilicon.md, solves it.
Had same problem in Xcode v12.4
after running pod install
.
After some searching inside my project I finally found reference to it under target's Build Phases
in Link Binary With Libraries
section. Removing FIRAnalyticsConnector.framework
from the list solved my problem.
For Apple silicon machines I did this in order for the app to work on the simulator:
Please note that you go to PROJECT and not TARGETS.
Step 1:Go to your top project and then -> under PROJECT, add arm64
to Excluded Architectures
Step 2:Go to Pods -> under PROJECT and add arm64
to Excluded Architectures
remove -fraemwork "FIRAnalyticsConnector" from the list of from the TARGET -> "build settings" -> OTHER_LDFLAGS
if you run on Apple Silicone with new Macbook Pro M1 processor. This is a known issue.
Firebase not compiling on Apple Silicone
that worked. I open Xcode using Rosetta.
brew install 417-72KI/tap/xcode-arch
$ xcode-arch -parm64 # `Open using Rosetta` is off$ xcode-arch -cSet x86_64 for /Applications/Xcode.app$ xcode-arch -px86_64 # `Open using Rosetta` is on$ xcode-arch -uSet arm64 for /Applications/Xcode.app$ xcode-arch -parm64 # `Open using Rosetta` is off