CocoaPods could not find compatible versions for pod "FirebaseCore": In snapshot (Podfile.lock)

Robert Harrison picture Robert Harrison · Aug 27, 2018 · Viewed 8.5k times · Source

I'm trying to add the Geofirestore pod I found on GitHub So I can add geo locations longitude and latitude to posts in a social media app. My pod file looks like this

pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage', '~> 4.0'
pod 'Geofirestore'

I ran the pod repo update and pod install in my terminal but its not working and I'm getting this as an error.

[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
  In snapshot (Podfile.lock):
    FirebaseCore (= 4.0.20, ~> 4.0)

  In Podfile:
    Firebase/Core was resolved to 4.13.0, which depends on
      FirebaseAnalytics (= 4.2.0) was resolved to 4.2.0, which depends on
        FirebaseCore (~> 4.0)

    Firebase/Core was resolved to 4.13.0, which depends on
      FirebaseCore (= 4.0.20)

    Geofirestore was resolved to 0.1.0, which depends on
      FirebaseCore (~> 5.0.3)

[!] Automatically assigning platform `ios` with version `11.4` on target `My App` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform

Answer

Cœur picture Cœur · Aug 27, 2018

You have 'Geofirestore' in your Podfile: as seen by the error message, it requires FirebaseCore (~> 5.0.3).

You have 'Firebase/Storage', '~> 4.0' in your Podfile, which sticks you to FirebaseCore (~> 4.0).

To use both, you'll need to upgrade from Firebase 4 to Firebase 5. I.e. you need to have:

pod 'Firebase/Storage', '~> 5.0'