首页 > 解决方案 > 找到满足“Firebase/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

结尾

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

pod repo update
pod update
pod install

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

标签: iosfirebasedeploymentgoogle-cloud-functionscocoapods

解决方案


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

[!] 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'并运行:

pod update
pod install

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

日期:21 年 4 月 21 日


推荐阅读