关于ios:找到满足Firebase / Functions依赖关系的规范,但它们需要更高的最低部署目标

Specs satisfying the `Firebase/Functions` dependency were found, but they required a higher minimum deployment target

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

`[!] CocoaPods找不到Pod" Firebase / Functions"的兼容版本:
在Podfile中:
Firebase /功能

找到

满足Firebase/Functions依赖关系的规范,但它们需要更高的最低部署目标。

这是我的pod文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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

end

我已经搜索了一些资源,并让我执行3个步骤:

1
2
3
pod repo update
pod update
pod install

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


将pod'Firebase / Messaging','?> 4.6.0'更改为pod'Firebase / Messaging'

并运行pod install


删除'~> 4.6.0'

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


您需要增加部署目标。转到Project Navigator(Cmd 1),选择应用程序的目标,然后将iOS Deployment Target增大到Firebase所需的最小值(iOS> = 8)。最后,重新运行pod install:

1
pod install


如果该解决方案对您不起作用(对我而言不起作用,哈哈),我发现了另一个选择-这是我得到的初始错误:

1
2
3
4
5
6
7
8
9
10
11
[!] 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.

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

1
2
pod update
pod install

Pod Update更新可可豆荚,对我来说,它还安装了软件包

日期:4/21/21