swift - CocoaPods 找不到 pod“FirebaseCore”的兼容版本:在快照中 (Podfile.lock)
问题描述
我正在尝试添加我在 GitHub 上找到的Geofirestore pod,这样我就可以在社交媒体应用程序中的帖子中添加地理位置经度和纬度。我的 pod 文件看起来像这样
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage', '~> 4.0'
pod 'Geofirestore'
我在终端中运行了 pod repo update 和 pod install 但它不起作用,我将其视为错误。
[!] 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
解决方案
您'Geofirestore'
在 Podfile 中有:如错误消息所示,它需要FirebaseCore (~> 5.0.3)
.
你有'Firebase/Storage', '~> 4.0'
你的 Podfile,它会让你坚持到FirebaseCore (~> 4.0)
.
要同时使用两者,您需要从 Firebase 4 升级到 Firebase 5。即您需要:
pod 'Firebase/Storage', '~> 5.0'
推荐阅读
- java - 如何使用从一个 Android 应用程序生成的 .so 文件,并在另一个应用程序中使用它?
- android - com.google.android.material.card.MaterialCardView 未在 android studio 3.5.3 中显示
- azure-devops - Azure 工件中的早期版本的工件
- tcp - 通过以太网、IP 进行简单的 Arduino 客户端服务器通信
- mongodb - MongoDB $text 搜索只有否定词
- java - 如何在基于 Spring 的项目中嵌入 Power BI?
- c# - 删除动态创建的文本框
- javascript - 我想知道使用javascript functon打开数据保存同一页面后?
- javascript - 获取日期数组的时间戳值
- angular - 有没有办法根据Angular中的高度动态生成子组件?