找到了满足“Firebase/Functions”依赖性的规范,但它们需要更高的最低部署目标

Vis*_*mbo 8 deployment ios cocoapods firebase google-cloud-functions

我试图安装pod 'Firebase/Functions'但失败并出现以下错误:

`[!] CocoaPods 找不到 pod“Firebase/Functions”的兼容版本:在 Podfile 中:Firebase/Functions

Firebase/Functions找到了满足依赖性的规范,但它们需要更高的最低部署目标。`

这是我的 pod 文件

# Uncomment the next line to define a global platform for your project
# platform :ios, '11.0'

target 'MyApp' do
  # Comment the next line if you're not using Swift and don't want to 
  use dynamic frameworks
  use_frameworks!

 # Pods for MyApp

 pod 'Firebase/Core'
 pod 'Firebase/Firestore'
 pod 'Firebase/Database'
 pod 'Firebase/Auth'
 pod 'Firebase/Messaging' ,'~> 4.6.0'
 pod 'Firebase/Storage'
 pod 'Firebase/Functions'
 pod 'GoogleMaps'
 pod 'FirebaseUI/Auth'
 pod 'FirebaseUI/Phone'
 pod 'ImageSlideshow', '~> 1.6'
 pod 'DZNEmptyDataSet'
 pod 'SDWebImage'
 pod 'SDWebImage/WebP'

target 'MyAppTests' do
   inherit! :search_paths
   # Pods for testing
end

 target 'MyAppUITests' do
  inherit! :search_paths
 # Pods for testing
end
Run Code Online (Sandbox Code Playgroud)

结尾

我搜索了一些资源,让我做 3 个步骤:

pod repo update
pod update
pod install
Run Code Online (Sandbox Code Playgroud)

我已经完成了这 3 个步骤,但仍然无法正常工作。

luc*_*ler 16

pod update我只是想在我的 flutter 项目的 ios 文件夹中运行


Pau*_*ien 9

去除'~> 4.6.0'

FirebaseFunctions是在 Firebase 4.6.0 之后引入的,因此不兼容版本限制pod 'Firebase/Messaging' ,'~> 4.6.0'


Bra*_*ady 9

如果这个解决方案对你不起作用(它对我不起作用哈哈),我找到了另一个选择 - 这是我得到的初始错误:

[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
  In snapshot (Podfile.lock):
    Firebase/Firestore (= 6.34.0, ~> 6.0)

  In Podfile:
    Firebase/Firestore

    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 1.0.6, which depends on
      Firebase/Firestore (= 7.3.0)

Specs satisfying the `Firebase/Firestore, Firebase/Firestore (= 6.34.0, ~> 6.0), Firebase/Firestore (= 7.3.0)` dependency were found, but they required a higher minimum deployment target.
Run Code Online (Sandbox Code Playgroud)

我的解决方案是将我的 ios/Podile 的第一行切换到platform :ios, '10.0'并运行:

pod update
pod install
Run Code Online (Sandbox Code Playgroud)

Pod Update 更新 Cocoa Pods,对我来说它也安装了软件包

日期:4/21/21

  • pod update 在我的 Flutter 项目中对我有用。谢谢!!! (4认同)

ala*_*vaa 6

您需要提高部署目标。转到项目导航器 (Cmd + 1),选择应用程序的目标并将其增加到iOS Deployment TargetFirebase 所需的最小值 (iOS >= 8)。最后,重新运行 pod install:

pod install
Run Code Online (Sandbox Code Playgroud)

  • 我的部署目标是版本 11.0 为什么它仍然无法工作? (14认同)
  • 我将其增加到 11,并且它对 Flutter 2 有效。 (2认同)