gpt4 book ai didi

ios - 使用 CocoaPods 添加 GeoFire 依赖项

转载 作者:行者123 更新时间:2023-12-01 20:12:18 25 4
gpt4 key购买 nike

我在 iOS 上使用 Firebase,我想添加 GeoFire。我按照这里的说明进行操作:https://github.com/firebase/geofire-objc , 但是在添加 pod 之后
'地火', '>=1.1'
到我的 podfile 并更新我得到错误

$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
[!] Unable to satisfy the following requirements:

- `Firebase (~> 2.1)` required by `GeoFire (1.1.0)`

Specs satisfying the `Firebase (~> 2.1)` dependency were found, but they required a higher minimum deployment target.

我的 podfile 看起来像
use_frameworks!
platform :ios, '8.1'

pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/AdMob'
pod 'Firebase/Auth'
pod 'Firebase/Crash'
pod 'Firebase/Database'
pod 'Firebase/RemoteConfig'

pod 'GeoFire', '>=1.1'

target 'FriendlyChatSwift' do
end

我不确定这里发生了什么。

最佳答案

请按顺序执行以下步骤,因为其中一个应该可以解决问题:

  • 将 Cocoapods 更新到最新版本 (1.0.1)。
  • 在您的项目 podfile 中删除 pod 'GeoFire', '>=1.1' 行。
  • 在终端中转到您的项目所在的文件夹并运行:

    pods 更新
  • 现在回到 Podfile 并以这种方式添加 GeoFire:

    pod 'GeoFire', :git => ' https://github.com/firebase/geofire-objc.git '
  • 在终端中转到您的项目所在的文件夹并运行:

    pods 安装
  • 为了以防万一(黑魔法?)
  • ,我在安装后再次运行 pod 更新。
  • 通常你会完成并且很好,但是目前有一个重大错误,但幸运的是,社区在几个小时后找到了一个修复 - 在 XCode 项目导航器中导航到:Pods -> Pods -> Firebase Database -> Frameworks -> SELECT/亮点 FirebaseDatabase.framework
  • 选择/突出显示 FirebaseDatabase.framework 后,查看 File Inspector(最右侧,纸张图标)并在 Target Membership 下选择/选中 GeoFire。

  • 以下是步骤 7/8 的屏幕截图链接: https://cloud.githubusercontent.com/assets/1798166/16071528/6e625fd8-330e-11e6-97ca-655bea333fbb.png

    最后确保您在 GitHub 上查看项目的“问题”部分 - 这是一个很好的资源,您将来可能会在那里找到解决方案。

    关于ios - 使用 CocoaPods 添加 GeoFire 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37490001/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com