CocoaPods 找不到 pod "FirebaseFirestore" 的兼容版本:



我有一个问题,我似乎无法解决。我已经尝试了前面列出的所有解决方案,但没有解决错误。我正在使用Flutterflow构建一个应用程序。Io,这是一个低代码平台。到目前为止,使用android Studio的本地iOS构建(android构建仍在工作)一切都很好,但现在CocoasPods和Firebase无法连接。任何帮助将非常感激!

[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":

在Podfile:FirebaseFirestore (fromhttps://github.com/invertase/firestore-ios-sdk-frameworks.git, tag8.6.0)

cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 2.5.0, which depends on
Firebase/Firestore (= 8.5.0) was resolved to 8.5.0, which depends on
FirebaseFirestore (~> 8.5.0)

我也从运行模式收到这个消息。

"*过时的源代码仓库,你可以用pod repo updatepod install --repo-update更新。*改变了依赖Firebase/Auth在你的开发podfirebase_auth的约束。您应该运行pod update Firebase/Auth来应用您所做的更改。">

我已经尝试更新pod, repo,运行pod update Firebase/Auth,并删除podfile。锁定文件夹,但无济于事。一切似乎都指向同一个问题,Pods和Firestore没有沟通。我很抱歉我缺乏专业知识,因为我对任何类型的计算机编程都是新手。

这个修复为我工作:

  1. 进入项目的/ios文件夹

  2. 删除Podfile.lock(YourProject/ios/Podfile.lock)。

  3. 打开Podfile文件夹,也打开ios/文件夹。

  4. 定位此位:

target 'Runner' do
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.6.0'
  1. tag => '8.6.0'更改为tag => '8.5.0'
  2. 重新运行pod install。确保你在ios/文件夹内。(cd ios)

然后在ios文件夹外再次尝试flutter run,应该可以运行。

希望这对解决Firestore问题有帮助。

2022

in <project folder>/ios/Podfile Change tag to 8.15.0

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'

我的答案是在https://stackoverflow.com/a/70029467/3120387

我更喜欢这个答案,因为不需要在podfile中插入或手动更改任何内容。

  1. 进入项目的/ios文件夹
  2. 删除Podfile。锁(YourPoject/ios/Podfile.lock)
  3. 删除项目。工作区文件。
  4. 运行pod install——repo-update(确保你的cd进入了flutter应用的iOS目录)
  5. 运行扑动清理
  6. 一旦完成,重新构建您的Flutter应用程序:Flutter run

2023

在/ios/Podfile中将标签更改为10.12.0,具体取决于您看到此内容时的最新版本。

最新版本可以在这里找到。

https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.12.0'

Then - pod install

在flutter的ios文件夹中的pod文件中应用相同的代码

target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.9.1'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

最新更新