17
votes

Trying to compile my project after adding some pods. While compiling it gives below error 'GoogleUtilities/GULURLSessionDataResponse.h' file not found

Podfile.lock:

- FBSDKCoreKit (9.1.0):
    - FBSDKCoreKit/Basics (= 9.1.0)
    - FBSDKCoreKit/Core (= 9.1.0)
  - FBSDKCoreKit/Basics (9.1.0)
  - FBSDKCoreKit/Core (9.1.0):
    - FBSDKCoreKit/Basics
  - Firebase/Analytics (3.6.0):
    - FirebaseAnalytics (= 3.4.2)
  - Firebase/Core (3.6.0):
    - Firebase/Analytics
  - Firebase/CoreOnly (7.9.0):
    - FirebaseCore (= 7.9.0)
  - Firebase/Crashlytics (7.9.0):
    - Firebase/CoreOnly
    - FirebaseCrashlytics (~> 7.9.0)
  - Firebase/Messaging (3.6.0):
    - Firebase/Analytics
    - FirebaseMessaging (= 1.2.0)
  - FirebaseAnalytics (3.4.2):
    - FirebaseInstanceID (~> 1.0)
    - GoogleInterchangeUtilities (~> 1.2)
    - GoogleSymbolUtilities (~> 1.1)
    - GoogleUtilities (~> 1.2)
  - FirebaseCore (7.9.0):
    - FirebaseCoreDiagnostics (~> 7.4)
    - GoogleUtilities/Environment (~> 7.0)
    - GoogleUtilities/Logger (~> 7.0)
  - FirebaseCoreDiagnostics (7.9.0):
    - GoogleDataTransport (~> 8.0)
    - GoogleUtilities/Environment (~> 7.0)
    - GoogleUtilities/Logger (~> 7.0)
    - nanopb (~> 2.30907.0)
  - FirebaseCrashlytics (7.9.0):
    - FirebaseCore (~> 7.0)
    - FirebaseInstallations (~> 7.0)
    - GoogleDataTransport (~> 8.0)
    - nanopb (~> 2.30907.0)
    - PromisesObjC (~> 1.2)
  - FirebaseInstallations (7.9.0):
    - FirebaseCore (~> 7.0)
    - GoogleUtilities/Environment (~> 7.0)
    - GoogleUtilities/UserDefaults (~> 7.0)
    - PromisesObjC (~> 1.2)
  - FirebaseInstanceID (1.0.9)
  - FirebaseMessaging (1.2.0):
    - FirebaseAnalytics (~> 3.3)
    - FirebaseInstanceID (~> 1.0)
    - GoogleInterchangeUtilities (~> 1.2)
    - GoogleIPhoneUtilities (~> 1.2)
    - GoogleSymbolUtilities (~> 1.1)
  - Flurry-iOS-SDK (10.1.0):
    - Flurry-iOS-SDK/FlurrySDK (= 10.1.0)
  - Flurry-iOS-SDK/FlurrySDK (10.1.0)
  - GoogleDataTransport (8.3.0):
    - GoogleUtilities/Environment (~> 7.2)
    - nanopb (~> 2.30907.0)
    - PromisesObjC (~> 1.2)
  - GoogleInterchangeUtilities (1.2.2):
    - GoogleSymbolUtilities (~> 1.1)
  - GoogleIPhoneUtilities (1.2.1):
    - GoogleSymbolUtilities (~> 1.0)
    - GoogleUtilities (~> 1.0)
  - GoogleSymbolUtilities (1.1.2)
  - GoogleUtilities (1.3.2):
    - GoogleSymbolUtilities (~> 1.1)
  - GoogleUtilities/Environment (7.3.1):
    - PromisesObjC (~> 1.2)
  - GoogleUtilities/Logger (7.3.1):
    - GoogleUtilities/Environment
  - GoogleUtilities/UserDefaults (7.3.1):
    - GoogleUtilities/Logger

 - FBSDKCoreKit (9.1.0):
    - FBSDKCoreKit/Basics (= 9.1.0)
    - FBSDKCoreKit/Core (= 9.1.0)
  - FBSDKCoreKit/Basics (9.1.0)
  - FBSDKCoreKit/Core (9.1.0):
    - FBSDKCoreKit/Basics
  - Firebase/Analytics (3.6.0):
    - FirebaseAnalytics (= 3.4.2)
  - Firebase/Core (3.6.0):
    - Firebase/Analytics
  - Firebase/CoreOnly (7.9.0):
    - FirebaseCore (= 7.9.0)
  - Firebase/Crashlytics (7.9.0):
    - Firebase/CoreOnly
    - FirebaseCrashlytics (~> 7.9.0)
  - Firebase/Messaging (3.6.0):
    - Firebase/Analytics
    - FirebaseMessaging (= 1.2.0)
  - FirebaseAnalytics (3.4.2):
    - FirebaseInstanceID (~> 1.0)
    - GoogleInterchangeUtilities (~> 1.2)
    - GoogleSymbolUtilities (~> 1.1)
    - GoogleUtilities (~> 1.2)
  - FirebaseCore (7.9.0):
    - FirebaseCoreDiagnostics (~> 7.4)
    - GoogleUtilities/Environment (~> 7.0)
    - GoogleUtilities/Logger (~> 7.0)
  - FirebaseCoreDiagnostics (7.9.0):
    - GoogleDataTransport (~> 8.0)
    - GoogleUtilities/Environment (~> 7.0)
    - GoogleUtilities/Logger (~> 7.0)
    - nanopb (~> 2.30907.0)
  - FirebaseCrashlytics (7.9.0):
    - FirebaseCore (~> 7.0)
    - FirebaseInstallations (~> 7.0)
    - GoogleDataTransport (~> 8.0)
    - nanopb (~> 2.30907.0)
    - PromisesObjC (~> 1.2)
  - FirebaseInstallations (7.9.0):
    - FirebaseCore (~> 7.0)
    - GoogleUtilities/Environment (~> 7.0)
    - GoogleUtilities/UserDefaults (~> 7.0)
    - PromisesObjC (~> 1.2)
  - FirebaseInstanceID (1.0.9)
  - FirebaseMessaging (1.2.0):
    - FirebaseAnalytics (~> 3.3)
    - FirebaseInstanceID (~> 1.0)
    - GoogleInterchangeUtilities (~> 1.2)
    - GoogleIPhoneUtilities (~> 1.2)
    - GoogleSymbolUtilities (~> 1.1)
  - Flurry-iOS-SDK (10.1.0):
    - Flurry-iOS-SDK/FlurrySDK (= 10.1.0)
  - Flurry-iOS-SDK/FlurrySDK (10.1.0)
  - GoogleDataTransport (8.3.0):
    - GoogleUtilities/Environment (~> 7.2)
    - nanopb (~> 2.30907.0)
    - PromisesObjC (~> 1.2)
  - GoogleInterchangeUtilities (1.2.2):
    - GoogleSymbolUtilities (~> 1.1)
  - GoogleIPhoneUtilities (1.2.1):
    - GoogleSymbolUtilities (~> 1.0)
    - GoogleUtilities (~> 1.0)
  - GoogleSymbolUtilities (1.1.2)
  - GoogleUtilities (1.3.2):
    - GoogleSymbolUtilities (~> 1.1)
  - GoogleUtilities/Environment (7.3.1):
    - PromisesObjC (~> 1.2)
  - GoogleUtilities/Logger (7.3.1):
    - GoogleUtilities/Environment
  - GoogleUtilities/UserDefaults (7.3.1):
    - GoogleUtilities/Logger
  1. Clean the project
  2. Close the Xcode
  3. Delete derived data
  4. If you have already installed the POD, kindly delete the “.xcworkspace” & “Podfile.lock” files
  5. Install pod again - Doesn't work
8
Did you ever find a solution to this problem?Ser Pounce
DId you find a solution for this issue?Isuru Bandara

8 Answers

8
votes

Just rename

pod 'Firebase/Analytics'

to

pod 'FirebaseAnalytics'

and run

pod install

2
votes
1
votes

I got the same error after updating rnfirebase to 11.3.3. I was able to solve the problem by removing 'Firebase/Analytics' dependency from the PodFile. i.e. by removing the following line from the Podfile:

pod 'Firebase/Analytics'

and then run pod install command.

1
votes

This happened to me as well. I noticed that pod 'Firebase/Analytics' was installing an old version:

Installing FirebaseAnalytics (3.4.2)

Not sure why was that, but I fixed by adding the version in the pod:

pod 'Firebase/Analytics', '8.1.0'
1
votes

Removing pod 'Firebase/Core' from the Podfile resolved the issue for me.

In my case, the error started to happen after I switched to 'Firebase/AnalyticsWithoutAdIdSupport' from 'Firebase/Analytics'. I noticed the following happens during pod installation every time:

Downloading dependencies
Installing Firebase 3.6.0 (was 8.1.0)
Installing Firebase 8.1.0

So, somehow Firebase/Core causes the old Firebase to be installed as well. Therefore removing it solved the issue, because probably other Firebase dependencies depend on it anyway.

1
votes

The same happened to me when upgrading from SDK v7 to v8. I figured out that replacing

pod 'Firebase/Admob'

with

pod 'Google-Mobile-Ads-SDK'

resolved the problem. The old Firebase 3.6.0 will then not anymore be loaded during pod update.

But be aware that the Mobile Ads API did change slightly from SDK v7 to v8. You have to follow these instructions to adapt your code:

Migrate Mobile Ads SDK v7 to v8

0
votes

This seems to be some sort of issue with Xcode 12.4, cocoapods 1.10.1, and Firebase/Database 8.1.1

Today I just updated to Xcode 12.4 and cocoapods 1.10.1 and this problem came out of no where. I deleted derived data, did a pod deintegrate, pod clean, removed the Podfile, then reinstalled all of my original pods and the problem kept occurring. What I decided to do was just install 1 pod at a time. Eventually i installed all of my Firebase pods and when went to install my GeoFire pod I got the error:

[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
  In snapshot (Podfile.lock):
    Firebase/Database (= 8.1.1)

  In Podfile:
    Firebase/Database

    GeoFire (from `https://github.com/firebase/geofire-objc.git`) was resolved to 4.2.0, which depends on
      GeoFire/Database (= 4.2.0) was resolved to 4.2.0, which depends on
        Firebase/Database (~> 7.0.0)

Specs satisfying the `Firebase/Database, Firebase/Database (= 8.1.1), Firebase/Database (~> 7.0.0)` dependency were found, but they required a higher minimum deployment target.

The error pointed out that the current Firebase/Database I was using was 8.1.1 and GeoFire was incompatible with it. I don't know what version I was using before today but I used the minimum version that it required pod 'Firebase/Database', '~> 7.0.0' and the problem went away. Here is my Podfile and the error is gone.

platform :ios, '10.0' // this was @PaulBeusterien suggestion but it didn't work with Firebase/Database 8.1.1 
install! 'cocoapods', :deterministic_uuids => false

target 'MyApp' do
use_frameworks!

# Pods for MyApp

pod 'Firebase'
pod 'Firebase/Functions'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Messaging'
pod 'FirebaseAnalytics'
pod 'FirebaseCrashlytics'
pod 'Firebase/Installations'
pod 'Firebase/Database', '~> 7.0.0' // This was the fix for me

pod 'Google-Mobile-Ads-SDK'
pod 'PersonalizedAdConsent'

pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'

pod 'GoogleSignIn'
pod 'GoogleAnalytics'

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = ‘5.0’
        end
    end
end

end
0
votes

Just use these versions in pubsec.yaml

firebase_auth: ^0.18.4+1
firebase_core: "0.5.3"
cloud_firestore:
firebase_messaging:

after above dependency installation

run the following commands

rm -rf Podfile.lock
flutter clean
flutter pub get
cd ios
pod install

the above method solved my problem.