Firebase pod安装 - pod'Firebase / Database' - 需要更高的最低部署目标

时间:2016-05-21 16:07:27

标签: ios firebase cocoapods firebase-realtime-database

我正在尝试像Firebase doc https://firebase.google.com/docs/ios/setup#available_pods一样安装Firebase /数据库,但是当我尝试时遇到了问题。

[!] Unable to satisfy the following requirements:
    Firebase/Database

    要求
  • Podfile

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

需要更高的最低部署目标,我该怎么做?

由于

Screenshot

8 个答案:

答案 0 :(得分:26)

这是我修复它的方式。

第1步

安装常规Firebase - pod 'Firebase', '>= 2.5.1'

第2步

更新 - pod update

*此时需要几分钟才能更新。你应该看到这样的东西。

Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing Firebase 3.2.0 (was 3.2.0)
Using FirebaseAnalytics (3.2.0)
Installing FirebaseAuth (3.0.2)
Using FirebaseDatabase (3.0.1)
Using FirebaseInstanceID (1.0.6)
Using GoogleInterchangeUtilities (1.2.1)
Installing GoogleNetworkingUtilities (1.2.1)
Using GoogleSymbolUtilities (1.1.1)
Using GoogleUtilities (1.3.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 4 dependencies from the Podfile and 10
total pods installed.

第3步

现在你应该有Firebase 3.所以你可以在你的pod文件中添加这样的框架然后pod update

# Uncomment this line to define a global platform for your project
 platform :ios, '8.0'
# Uncomment this line if you're using Swift
 use_frameworks!

target 'xMarket' do

end

target 'xMarketTests' do

end

target 'xMarketUITests' do

end

pod 'Firebase', '>= 2.5.1'
pod ‘Firebase/Core’
pod ‘Firebase/Database’
pod ‘Firebase/Auth’
祝你好运!

答案 1 :(得分:4)

$scope.shout();中,将行Podfile更改为pod 'Firebase'并在项目文件夹中运行pod Firebase/Core

使用新的Firebase,不需要第一行。

来自迁移指南:

migration

参考:Firebase.google migration guide

答案 2 :(得分:1)

首先运行pod repo update,然后再次运行pod install,使它正常工作。

答案 3 :(得分:0)

请按照以下步骤操作:

  1. pod repo remove master
  2. pod setup
  3. pod install

答案 4 :(得分:0)

我遇到了同样的问题。我的错误如下

[!] Unable to satisfy the following requirements:

- `Firebase/AdMob` required by `Podfile`

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

enter image description here Targets->general->deployment target Changed to 8.0  enter image description here

我的项目部署目标从ios 6开始,因为它是在较旧的xcode版本中开发的。对于xcode 8中的新更新,我创建了deployment target from ios 8它对我有用。

修好工作后

Installing Firebase (4.0.2) Installing FirebaseAnalytics (4.0.1) Installing FirebaseCore (4.0.2) Installing FirebaseInstanceID (2.0.0) Installing Google-Mobile-Ads-SDK (7.20.0) Installing GoogleToolboxForMac (2.1.1)

最新的Firebase将从ios 8支持。

答案 5 :(得分:0)

或者您可以更新Podfile

平台:ios,' 9.0'

运行' pod update'

那个

答案 6 :(得分:0)

在我的情况下,我有一个类似的错误,从jenkins运行。当我删除违规工作区并重新开始时,一切都很顺利。

答案 7 :(得分:0)

您可以尝试删除Podfile.lock