首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用CocoaPods添加GeoFire依赖

使用CocoaPods添加GeoFire依赖
EN

Stack Overflow用户
提问于 2016-05-28 02:19:08
回答 2查看 785关注 0票数 1

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

代码语言:javascript
复制
$ 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看起来像这样

代码语言:javascript
复制
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

我不知道这是怎么回事。

EN

回答 2

Stack Overflow用户

发布于 2016-07-23 05:47:31

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

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

pod update

  • 现在返回Podfile并以如下方式添加GeoFire:

pod 'GeoFire',:git => 'https://github.com/firebase/geofire-objc.git

  • In terminal转到您的项目所在的文件夹并运行:

pod安装pod

  • 为了更好,我在安装后再次运行pod更新,以防万一(黑色pod您已经完成了,可以继续运行了,但目前有一个主要的错误,但幸运的是,经过几个小时后,社区已经找到了一个修复程序-在XCode项目导航器中导航到:pod -> pod -> Firebase数据库->框架->选择/高亮显示pod选择/高亮显示FirebaseDatabase.framework查看文件检查器(最右侧,纸质图标),然后选择/选中目标成员身份下的GeoFire。

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

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

票数 2
EN

Stack Overflow用户

发布于 2016-05-28 04:14:02

您使用的是什么版本的cocoapods?他们最近刚刚发布了1.0。你可能想试一试。

此外,以下是最新的geofire podspec文件:

代码语言:javascript
复制
Pod::Spec.new do |s|
  s.name         = "GeoFire"
  s.version      = "1.1.2"
  s.summary      = "Realtime location queries with Firebase."
  s.homepage     = "https://github.com/firebase/geofire-objc"
  s.license      = { :type => 'MIT', :file => 'LICENSE' }
  s.author       = { "Firebase" => "support@firebase.com" }
  s.source       = { :git => "https://github.com/firebase/geofire-objc.git", :tag => 'v1.1.2' }
  s.source_files = "GeoFire/**/*.{h,m}"
  s.docset_url   = "https://geofire-ios.firebaseapp.com/docs/"
  s.ios.deployment_target = '7.0'
  s.osx.deployment_target = '10.10'
  s.ios.dependency  'Firebase', '~> 2.2'
  s.osx.dependency  'FirebaseOSX', '~> 2.4'
  s.framework = 'CoreLocation'
  s.requires_arc = true
end

尝试在您的podfile中拉入geofire 1.1.x。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37490001

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档