XCode 12, FIRAnalyticsConnector, Build Error

前端 未结 4 1342
无人共我
无人共我 2021-02-13 12:55

After upgrading to XCode 12, my project doesn\'t build for the simulator anymore.

The error I get is:

ld: in ... /Pods/FirebaseAnalytics/Frameworks/FIRAnal         


        
相关标签:
4条回答
  • 2021-02-13 13:28

    After adding "arm64" to Excluded Architectures for the project AND the pods, I was able to resolve this issue I ran into on an Apple M1.

    I also had to clear DerivedData and restart XCode.

    See: https://medium.com/@khushwanttanwar/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9

    0 讨论(0)
  • 2021-02-13 13:35

    My case was a little different. According to this Firebase engineer,

    FIRAnalyticsConnector is now part of the xcframework version of FirebaseAnalytics 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.

    0 讨论(0)
  • 2021-02-13 13:36

    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.

    0 讨论(0)
  • 2021-02-13 13:37

    Ok, I finally found a fix for the issue.

    Change "Build Active Architecture Only" to "Yes" also for "Release".
    The setting can be found selecting your project > "Build Settings" > "Targets" (your target) > "Architectures"

    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.

    0 讨论(0)
提交回复
热议问题