ios - 安装 FirebaseInstanceID 时出错

标签 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$

这是我的播客文件:

# 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

最佳答案

我在想用AdMob的时候也遇到了类似的问题。

我用这个方法解决了:用'pod update'替换'pod install'

你可以试试看!

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '7.0'

target 'NativeAdvancedExample' do
    pod 'Firebase/Core'
    pod 'Firebase/AdMob'
end

Problem screenshots

Resolve the problem

关于ios - 安装 FirebaseInstanceID 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40468434/

相关文章:

node.js - Firebase 验证 ID token

javascript - 如何通过 Angular 中的路由在 Cloud Functions 中执行对 Cloud Firestore 的添加?

ios - 无法在 iOS 项目中更新 Google AdMob

ios - Swift NSURLConnection 立即返回 1005 错误

ios - 移动 Safari 中的 mp4 无法播放,但在 UIWebView 中加载的同一网页可以播放

ios - Firebase 两次使用 queryEqualTo()

ios - 如何添加 pod 0.3.3

iOS 模拟器崩溃而真实设备没有

iphone - 尝试从 iOS 6 应用程序中启动引导式访问?

ios - 如何关闭自己的 View Controller 并在点击按钮时显示另一个 View Controller ?