安装FirebaseInstanceID时出错

时间:2016-11-07 15:09:11

标签: ios firebase cocoapods

我想使用Swift和Firebase创建一个简单的消息传递应用。 但是当我尝试安装我需要的pod时,我总是得到关于“FirebaseInstanceID”的相同错误 我试图卸载,重新安装和更新cocoapods,但有相同的错误 (我在Windows 10上使用VMware Workstation):

Dimensionss-Mac:messagingapp dimensionssolutions$ pod install
Analyzing dependencies
Downloading dependencies
Installing Firebase (3.9.0)
Installing FirebaseAnalytics (3.5.1)
Installing FirebaseAuth (3.0.6)
Installing FirebaseCore (3.4.4)
Installing FirebaseDatabase (3.1.0)
Installing FirebaseInstanceID (1.0.8)

[!] Error installing FirebaseInstanceID
[!] /usr/bin/curl -f -L -o /var/folders/4x/vybryg713852s0_hg7_bxzrm0000gn/T/d20161107-18506-2i097m/file.tgz https://www.gstatic.com/cpdc/18da95d517c54d0f/FirebaseInstanceID-1.0.8.tar.gz --create-dirs --netrc-optional

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Dimensionss-Mac:messagingapp dimensionssolutions$

那是我的podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '8.0'

target 'messagingapp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for messagingapp

    pod 'Firebase/Database'
    pod 'Firebase/Auth'
    pod 'Firebase/Storage'

  target 'messagingappTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'messagingappUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

3 个答案:

答案 0 :(得分:3)

当我想使用AdMob时,我也遇到了类似的问题。

我通过这种方法解决了这个问题:用' pod update' 替换' pod install'

你可以尝试一下!

{{1}}

Problem screenshots

Resolve the problem

答案 1 :(得分:1)

问题出在VMWare设置中。这些步骤解决了我的问题:

  • 1选择虚拟机,然后选择 VM > 设置即可。
  • 2关于 硬件标签,选择网络适配器
  • 3选择桥接:已连接 直接到物理网络
  • 4如果您使用虚拟机 在笔记本电脑或其他移动设备上,选择复制物理网络 连接状态。此设置会更新IP地址 当您从一个有线或无线网络移动到另一个网络时。
  • 5点击 确定以保存更改。

https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-826323AD-D014-475D-8909-DFA73B5A3A57.html

答案 2 :(得分:0)

你的podfile看起来很奇怪,试着用这段代码让它更简单:

use_frameworks!

target 'messagingapp' do

pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'

end

这应该对你有用