framework not found FirebaseAnalytics
Asked Answered
P

14

38

I added Google Analytics by CocoaPod into my project, but my app crashed and gave the following error.

ld: framework not found FirebaseAnalytics
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What should i do to solve this issue ? I followed this tutorial from google to integrate the Google Analytics into my project.

Plectognath answered 9/6, 2016 at 5:54 Comment(1)
This thread could help: #37485641Dys
W
76

You are probably using cocoapods to add Firebase. Make sure that in the build settings for your target the 'Framework Search Paths' both for Debug and Release start with $(inherited).

The build settings for your pod dependencies are defined in a xcconfig file, if you don't have $(inherited) in your target's build settings, the settings from this file will be ignored.

Wassail answered 12/6, 2016 at 7:47 Comment(3)
Need to to this in each target setting, not in project settingPattani
Problem is this is deleted and reset when we do flutter clean.Kibitzer
Once this answer helped me & once this one: https://mcmap.net/q/410327/-framework-not-found-firebaseinstanceid-on-xcodePlumbago
S
22

I had the same error, my Framework Search Paths in Build Settings were already set to $(inherited) for both Debug and Release.

I managed to solve this with the solution here: https://mcmap.net/q/410328/-firebase-framework-not-found

In other words, Podfile.lock had some bad versions in it, running this solved the my issue:

pod update
pod install
Sluggard answered 24/4, 2017 at 20:38 Comment(2)
I was getting the Error: Debug map not found for ....Build/Products/Debug-iphonesimulator/****.app/.... file not found in directory message for the longest time. This finally solved my crisis. Thank you @SluggardSibbie
If you still get same error after pod update and pod install. Clean your build folder and then Build the Project again. (Product > Clean Build Folder )Upu
H
7

I also had this issue and resolved with this:

pod deintegrate && pod install

CocoaPods doc on pod deintegrate: https://guides.cocoapods.org/terminal/commands.html#pod_deintegrate

Hubbell answered 11/1, 2019 at 12:59 Comment(1)
This one helped me, just updating and/or installing didn't, thanks a lot!Foretaste
M
1

You need to remove linked framework from project properties.

Monoicous answered 29/6, 2016 at 17:27 Comment(0)
W
1

I had this issue and resolved it: - Go to Info.plist -> Build Settings -> Framework Search Paths - Verify/fix the paths. In my case, it was the additional Fbsdk search path that was causing issue (see attached picture) error

I changed it to: fix

Wendolynwendt answered 2/3, 2018 at 6:13 Comment(0)
F
0

Maybe You have already added other Framework Search Path to Build setting,

Step 1: Remove all frame work search path in Build setting
Step 2: run Pod install 
Step 3: Add others Framework search path (That's removed in step 1).

Now Run Project!

Final answered 30/6, 2017 at 8:1 Comment(0)
R
0

Make sure that pod 'Firebase/Core' is listed in your podfile; if Firebase/Core is not listed, FirebaseAnalytics will not be installed.

Repetend answered 18/3, 2019 at 21:47 Comment(0)
A
0

Add FirebaseAnalytics.framework from Pods (project) > Pods > FirebaseAnalytics > Frameworks into your project target's Build Phases > Link Binary with Libraries.

Clean project, exit Xcode, wipe Derived Data, open Xcode and try again )

Asante answered 29/4, 2019 at 21:16 Comment(0)
A
0

Make sure your Xcode project is not being loaded by Xcode before the workspace. As a noob to CocoaPods and workspaces I did not realize that my workspace was not being loaded properly because it was still loaded in Xcode. If you can't drill into your project from the Workspace explorer window this is your problem.

To fix:

  1. Open Xcode.
  2. Close all projects and workspaces in Xcode.
  3. Close Xcode.
  4. Open the workspace file

Now you should be able to build the workspace properly.

Ange answered 22/8, 2019 at 17:32 Comment(0)
F
0

Try to change platform :ios, '.....' on the Podfile.

I updated to 11.4 and the problem occurred. When I change back to platform :ios, '10.3' then the problem fixed.

Don't forget to run pod install after editing the Podfile.

Forced answered 26/3, 2021 at 0:26 Comment(0)
L
0

For me, the only solution was to upgrade my Cocoapods gem.

In my Gemfile, the version was 1.7.3, so switching to a later version, 1.10.2 at the time, fixed the problem.

After upgrading the Gem, just run pod install again.

You can check your Cocoapods version with pod --version command line.

Lichtenfeld answered 10/8, 2021 at 13:36 Comment(0)
C
0

Solved by adding arm64 to Excluded Architectures (EXCLUDED_ARCHS) in the Project settings.

Cracksman answered 23/11, 2021 at 17:59 Comment(0)
T
0

You need to install FirebaseAnalytics yarn add @firebase/analytics then do pod install. It worked for me

Triclinic answered 5/12, 2022 at 3:55 Comment(0)
N
0

Even when the search paths are correct, it seems that some libraries have the extension .xcframework instead of the expected .framework and are therefore not found. I have no clue why this happens or who is to blame, but I was able to fix it by manually adding those frameworks explicitly. enter image description here

Nertie answered 27/6, 2023 at 12:34 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.