Christopher
Christopher

Reputation: 168

Cocoapods - framework not found FirebaseCoreDiagnostics

I recently updated to the most recent version of firebase so that I could integrate apple sign in for my ios app (obj-c) and I can't for the life of me work out why I'm getting this error:

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

Here's my podfile:

    platform :ios, '13.7'
    
    pod 'Firebase/Database'
    pod 'Firebase/Auth'
    pod 'Firebase/AdMob'
    pod 'Firebase/Messaging'
    pod 'Firebase/Analytics'
    pod 'Google-Mobile-Ads-SDK'
    pod 'SDWebImage', '~> 5.0'
    pod 'FBSDKCoreKit', '~> 5.2'
    pod 'FBSDKLoginKit', '~> 5.2'
    pod 'FBSDKPlacesKit', '~> 5.2'
    pod 'FBSDKShareKit', '~> 5.2'
    pod 'FBSDKMarketingKit'
    
    target 'WriteAnythingPrototype' do
    
    end

I've checked my Pods and can see that FirebaseCoreAnalytics is there. Also if I try and manually add the framework into the frameworks folder, I get the error that the framework is duplicated.

I've also tried deleting my derived data and deleting my pod folder and then reinstalling the pods.

I'm at my wits end and can't seem to find this problem online, can anyone please explain why this is happening?

Upvotes: 13

Views: 9189

Answers (4)

Antonin Noel
Antonin Noel

Reputation: 171

I had to remove the framework in "Other linked flags" in target's build settings : look for OTHER_LDFLAGS in build settings search bar and remove FirebaseCoreDiagnostics from the list.

Upvotes: 17

Kegham K.
Kegham K.

Reputation: 1614

I had same issue with a couple of firebase dependencise I tried pod deintegrate and then pod install a couple of times nothing worked. But what worked is removing the references from the .xcodeproj from the project.pbxproj file.

Check screen shot below.enter image description here

Upvotes: 9

Paul Beusterien
Paul Beusterien

Reputation: 29547

Something about the Xcode project is corrupt. Try the following:

  • pod deintegrate
  • Examine the resulting xcproject source and remove any FirebaseCoreDiagnostic references.
  • Rerun pod install

Upvotes: 16

Nikhil Manapure
Nikhil Manapure

Reputation: 3868

Put the pods inside the target, so that they get linked to your target.

platform :ios, '13.7'

target 'WriteAnythingPrototype' do
   pod 'Firebase/Database'
   pod 'Firebase/Auth'
   pod 'Firebase/AdMob'
   pod 'Firebase/Messaging'
   pod 'Firebase/Analytics'
   pod 'Google-Mobile-Ads-SDK'
   pod 'SDWebImage', '~> 5.0'
   pod 'FBSDKCoreKit', '~> 5.2'
   pod 'FBSDKLoginKit', '~> 5.2'
   pod 'FBSDKPlacesKit', '~> 5.2'
   pod 'FBSDKShareKit', '~> 5.2'
   pod 'FBSDKMarketingKit'
end

You can find the CocoaPods documentation here.

Upvotes: 1

Related Questions