FireBase可可豆荚安装不工作 [英] FireBase Cocoa Pods Installation Not Working

查看:262
本文介绍了FireBase可可豆荚安装不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过Cocoa Pods为我的Objective-C iOS应用程序安装Firebase。我的Podfile如下:

pre $ lt; code> target'RandomName'do

pod'Firebase / Core'
pod'Firebase / AdMob'

end

当我运行 pod install ,出现以下错误:

  [!以满足以下要求:

- `Podfile`所需的Firebase / Core

没有一个规范来源包含符合依赖关系的规范:Firebase / Core 。

您可以:
*过期的源代码库,您可以使用`pod repo update`进行更新。
*输错了名字或版本。
*未添加将Podspec托管到您的Podfile的源回购。

注意:从CocoaPods 1.0开始,默认情况下`pod repo update`不会在`pod install`上发生。

安装了最新版本的Cocoa Pods,并试过运行pod repo更新。有一个以下的Podfile工作正常,但是当我尝试在我的AppDelegate.m文件中 @import Firebase; ,Xcode找不到该模块。

  target'RandomName'do 
$ b $ pod'Firebase'

end

但是,以下组合不会安装:

  target'RandomName'do 

pod'Firebase'
pod'Firebase / AdMob'

end

任何帮助将不胜感激!

解决方案

<我有同样的问题。使用podFirebase时,请检查Firebase的安装版本。对我来说,它安装了2.4.3这是一个旧版本。该文档说,该吊舱应该安装3.2。使用该吊舱。它解释了为什么其他Pod无法正常工作,因为它们是Firebase 3的一部分。Pod更新不会将Firebase更新为最新版本。即使强制版本不起作用。它似乎无法找到新的Firebase版本,即使它们在相同的podspec中。



以下是我如何解决它:




  • 请确保您安装了最新版本的git

  • 确保您安装了cocoapods> = 1.0.0

  • 删除你的豆荚回购(运行 pod repo remove master )并使用 pod setup 一个新的

  • 在您的pod文件中使用以下内容:

    pod'Firebase / Auth '



    pod'Firebase / Database'



    pod'Firebase / Core'




  • (使用任何你想要的,只是不要使用'Firebase')
    $ b $ ul

  • pod install

    code>

  • 所有东西都应该正确安装


I'm trying to install Firebase via Cocoa Pods for my Objective-C iOS Application. My Podfile is as follows:

target 'RandomName' do

pod 'Firebase/Core'
pod 'Firebase/AdMob'

end

When I run pod install, I get the following error:

[!] Unable to satisfy the following requirements:

- `Firebase/Core` required by `Podfile`

None of your spec sources contain a spec satisfying the dependency: `Firebase/Core`.

You have either:
 * out-of-date source repos which you can update with `pod repo update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

The latest version of Cocoa Pods is installed, and I have tried running pod repo update. Having a Podfile of the following works fine, but when I try to @import Firebase; in my AppDelegate.m file, Xcode cannot find the module.

target 'RandomName' do

pod 'Firebase'

end

However, the following combination does not install:

target 'RandomName' do

pod 'Firebase'
pod 'Firebase/AdMob'

end

Any help would be appreciated!

解决方案

I am having the same problem. Check what version of Firebase is installed when you use pod 'Firebase'. For me it installs 2.4.3 which is an old version. The docs say that the pod should install 3.2. using that pod. It explains why the other pods don't work as they are part of Firebase 3. Pod update doesn't update Firebase to the latest version either. Even forcing a version doesn't work. It can't seem to find the new Firebase versions even though they are in the same podspec.

Here is how I solved it:

  • make sure you have the latest version of git installed
  • make sure you have cocoapods >= 1.0.0 installed
  • delete your pods repo (run pod repo remove master) and use pod setup to make a new one
  • use the following in your pod file

    pod 'Firebase/Auth'

    pod 'Firebase/Database'

    pod 'Firebase/Core'

(use whatever you want, just don't use 'Firebase')

  • pod install
  • everything should install properly

这篇关于FireBase可可豆荚安装不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆