CocoaPods找不到Pod“ FirebaseCore”的兼容版本:在快照中(Podfile.lock)

时间:2018-08-27 05:48:36

标签: swift xcode firebase google-cloud-firestore podfile

我正在尝试添加在GitHub上找到的Geofirestore吊舱,以便可以向社交媒体应用中的帖子添加地理位置经度和纬度。我的pod文件看起来像这样

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

我在终端中运行了pod repo更新并安装了pod,但是它不起作用,这是一个错误。

[!] 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

1 个答案:

答案 0 :(得分:4)

您的Podfile中有'Geofirestore':如错误消息所示,它需要FirebaseCore (~> 5.0.3)

您的Podfile中有'Firebase/Storage', '~> 4.0',使您进入FirebaseCore (~> 4.0)

要同时使用两者,您需要从Firebase 4升级到Firebase 5。您需要:

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