32

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
123 321
  • 431
  • 1
  • 4
  • 4

16 Answers16

16

Just rename

pod 'Firebase/Analytics'

to

pod 'FirebaseAnalytics'

and run

pod install

Alex Metelkin
  • 1,520
  • 7
  • 13
8

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 it by adding the version (the latest at the time this was written) in the pod:

pod 'Firebase/Analytics', '8.1.0'
Tinchetsu
  • 116
  • 1
  • 3
  • 1
    That's because cocoapods installs the specified version, which had that name (Firebase/Analytics) at the time and the name is maintained. – naz89 Sep 14 '22 at 19:59
6

Add to the Podfile: platform :ios, '10.0'

More details at https://github.com/firebase/firebase-ios-sdk/issues/7782

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • 1
    this issue is still alive and well. I'm using Xcode 12.4, cocoapods 1.10.1. I deleted derived data, ran pod deintegrate, pod clean, rm Podfile, pod cache clean --all, pod init, reinstalled all of my pods and added `platform :ios, '10.0'` (it was initially '13.0'), then ran pod install, and opened in the xcworkspace, this issue is constant. I didn't have this issue in Xcode 11.1, I just updated today and my projects are at a standstill. I can't upgrade to Xcode 12.5 because I have a 2012 MacBook pro. Xcode 12.5 only supports 2013 MacBook pros and higher – Lance Samaria Jun 19 '21 at 22:46
  • Xcode 12.4 should work fine. Send a reproducible example to https://github.com/firebase/firebase-ios-sdk/issues and we can take a look. If a repro isn't feasible, the Podfile and Podfile.lock might be sufficient to diagnose the problem. – Paul Beusterien Jun 20 '21 at 01:14
  • ok thanks, I'm trying different things now. Im using pod googleplaces, pod googplacesapi, pod geofire, pod personalized adconsent, and bunch of firebase pods. I'm adding them in 1 at a time to see if i can find out which is causing the issue. If I can't find anything (or even if I do) I'll let you know or send the issue to the link you provided. Thanks :) – Lance Samaria Jun 20 '21 at 01:20
  • quick question, I use google places in my iOS app. Do I need both the `googleplaces` pod and the `googleplacesapi` or should I just use one of the two? I use both and I think this might be a partial cause of the issue – Lance Samaria Jun 20 '21 at 01:23
  • This seems to be some sort of issue with `Xcode 12.4`, `cocoapods 1.10.1`, and `Firebase/Database 8.1.1`. Once I downgraded to `Firebase/Database 7.0.0` the error went away. Please look at my answer https://stackoverflow.com/a/68052116/4833705 – Lance Samaria Jun 20 '21 at 02:11
  • This solution worked for me. Just remove the pod file, pod lock file and xcworkspace first. Then create pod file and keep the platform :ios, '10.0' there with your required pods. install and it will work fine. – Zulqarnain Naveed Jan 20 '22 at 07:08
  • This worked, but I had to run `pod update`. Just running `pod install` didn't work. – Eric Jun 02 '22 at 05:22
5

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

Chris
  • 1,231
  • 2
  • 10
  • 20
3

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.

naydin
  • 345
  • 4
  • 5
1

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.

Ahmet Emre Kilinc
  • 5,489
  • 12
  • 30
  • 42
1

Remove:

pod 'Firebase/Core'

from your podfile and run pod install. It is deprecated and no longer needed.

S.S.D
  • 1,579
  • 2
  • 12
  • 23
0

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
Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0

I have faced the same problem. I fixed it by rename below pod names ...

pod 'Firebase/Analytics' -> pod 'FirebaseAnalytics'

pod 'Google/SignIn' -> pod 'GoogleSignIn'

emraz
  • 1,563
  • 20
  • 28
0

For me the problem was to update to Firebase v8.x.x using the pod 'Firebase/Admob', then the GoogleUtilities missing file error appears. So I have replaced:

pod 'Firebase/AdMob'

with

pod 'Google-Mobile-Ads-SDK', '~> 7.x'

This allowed me to continue the build without errors and code changes, as the GoogleMobileAdSDK version 8 or 9 (January 2022) requires code migration, so this code migration is another post story.

Pelanes
  • 3,451
  • 1
  • 34
  • 32
0

I was installing Firebase/Performance, and got this error. My was Firebase was set in the Podfile fixed to 8.5.0. After setting it to a higher version 8.11.0, the project compiled again.

7RedBits.com
  • 454
  • 6
  • 6
0

This is what works for me.

pod 'Firebase'
pod 'FirebaseCore'
pod 'FirebaseCrashlytics'

pod 'FirebaseAnalytics', '8.1.0'
pod 'FirebaseMessaging'
pod 'FirebaseInstallations'  

That pod 'FirebaseAnalytics', '8.1.0' is the most important there.

Note: I am using Ventura and XCode 14.1

Zaldy Bughaw
  • 797
  • 8
  • 16
0

For me, I needed to follow Paul Beusterien & Tinchetsu answers:

Add at the top of the Podfile:

platform :ios, '10.0'

Specify max version for Firebase Analytics:

pod 'Firebase/Analytics', '8.1.0'
Medhi
  • 2,656
  • 23
  • 16
0

I was facing the same issue when I updated to Xcode 14.

To fix the issue, open the podfile and replace

pod 'Firebase/Analytics'

with

pod 'Firebase/Analytics', '~> 6.28.1’

From what I understood, when I checked the podfile.lock, it was installing Firebase/Analytics (3.6.0) by default. By mentioning a newer version of Firebase/Analytics fixed my issue.

and remember to pod deintegrated and pod install after you made the change in podfile. :-P

he110_friend
  • 61
  • 1
  • 5
0

In my case, in a quite old project that I had one time, there was this old library called MaterialControls or something like that.

It's a great help to check the logs of your pod install, and see if there's anything strange like installing multiple, the same, libraries like Firebase. So one could just trial-and-error, removing one by one, each library to see what's the culprit.

Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95
-1

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.

mtmfahath
  • 321
  • 3
  • 7