30

Trying to compile my project after adding some pods. While compiling it gives below error

'GoogleUtilities/GULAppEnvironmentUtil.h' file not found

Podfile.lock snippet

- FirebaseCore (5.1.1):
        - GoogleUtilities/Logger (~> 5.2)
      - FirebaseDynamicLinks (3.0.2):
        - FirebaseAnalytics (~> 5.1)
      - FirebaseInAppMessaging (0.11.0):
        - FirebaseAnalytics (~> 5.1)
        - FirebaseCore (~> 5.1)
        - FirebaseInstanceID (~> 3.2)
        - GoogleUtilities/Environment (~> 5.0)
      - FirebaseInstanceID (3.2.1):
        - FirebaseCore (~> 5.1)
        - GoogleUtilities/Environment (~> 5.2)
      - FirebaseMessaging (3.1.0):
        - FirebaseCore (~> 5.0)
        - FirebaseInstanceID (~> 3.0)
        - GoogleUtilities/Reachability (~> 5.2)
        - Protobuf (~> 3.1)
      - FirebaseRemoteConfig (3.0.1):
        - FirebaseABTesting (~> 2.0)
        - FirebaseAnalytics (~> 5.1)
        - FirebaseCore (~> 5.1)
        - FirebaseInstanceID (~> 3.2)
        - GoogleUtilities/Environment (~> 5.2)
        - "GoogleUtilities/NSData+zlib (~> 5.2)"
        - Protobuf (~> 3.5)
      - Google/Analytics (2.0.4):
        - Google/Core
        - GoogleAnalytics (~> 3.12)
      - Google/Core (2.0.4):
        - GoogleInterchangeUtilities (~> 1.0)
        - GoogleNetworkingUtilities (~> 1.0)
        - GoogleSymbolUtilities (~> 1.0)
        - GoogleUtilities (~> 1.1)
Kuldeep
  • 4,466
  • 8
  • 32
  • 59
Prateek Roy
  • 303
  • 1
  • 4
  • 8
  • seems to be related with this issue https://github.com/apache/cordova-ios/issues/394 – CaSUaL Aug 21 '18 at 08:32
  • Have a look at my post [here](https://stackoverflow.com/questions/54246350/firebasecore-lexical-or-preprocessor-issue/55285806#55285806) to see what worked for me. – AlphaBeta Mar 25 '19 at 10:24
  • This is a duplicate question, please check this https://stackoverflow.com/a/58389295/5572214 – Shafi Muhammed Nov 18 '19 at 05:48

9 Answers9

23

In the Podfile, change Google/Analytics to GoogleAnalytics. The Google pod is deprecated and not compatible with recent Firebase versions.

An alternative, but not recommended workaround, could be to lock the Firebase version to something less than 5.5.

UPDATE: June 2021: There is a Crashlytics podspec bug that can also cause this issue. The workaround is to explicitly add GoogleUtilities/Environment to the Podfile or move use_frameworks! to the top of the Podfile. Details in https://github.com/firebase/firebase-ios-sdk/issues/8137. The issue will be fixed in the upcoming Firebase 8.3.0 release.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
14

Problem fixed for me by following steps:

  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
  6. Open “.xcworkspace” and Run
Ashvin
  • 8,227
  • 3
  • 36
  • 53
9

Running pod update fixed this for me

Xander
  • 1,606
  • 15
  • 30
3

Deleting Pods folder and reinstalling the pods again will fix the issue.

Milan Agarwal
  • 427
  • 2
  • 15
3

Try This:

  1. Delete the pod files related to Google and Firebase
  2. Install pods via "pod install" command

If pod file contains below pods, update those pods

Google/Analytics to GoogleAnalytics
Google/SignIn to GoogleSignIn

Google/Analytics and Google/SignIn are deprecated.

Lijith Vipin
  • 1,870
  • 21
  • 29
1

try to add this plugin :

cordova plugin add cordova-plugin-cocoapod-support --save

After go to platform/ios and run : pod update

halfelf
  • 9,737
  • 13
  • 54
  • 63
Amene Obey
  • 39
  • 4
-1
  • In the podfile, install all pods after uncomment use_frameworks!.
  • If you already installed pods then remove pods, and install again after uncomment use_frameworks
Mahesh Cheliya
  • 1,334
  • 1
  • 16
  • 21
-1

As simple as that

  • comment the pod
  • pod install
  • uncomment the pod (Make sure there is not version added to pod)
  • pod install

There you go.

-1

None of the answers listed here worked for me.

The solution that worked for me is:

  1. Clean the project and close the Xcode
  2. Clean the pod using command pod clean
  3. Install the pod again using pod install
  4. Open the project and build that one, it worked
Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81