1

这里有限的 CocoaPod 经验......所以,我有 2 个项目包含 Firestore CocoaPod,除了应用程序名称外,它们具有相同的 pod 文件。其中之一,无论我安装/更新、清除缓存等多少次,它都会成功安装我需要的所有 pod 并创建 Pods/Pods.xcodeproj 文件和 Podfile.lock 文件。


工作吊舱文件

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

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

  # Pods for Exercise DB
  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
end

另一个项目(全新,在 pod 安装之前构建干净)尝试安装相同的 pod,但总是失败,并且不会创建 Pods/Pods.xcodeproj 文件或 Podfile.lock 文件。实际上,我创建了一些具有相同结果的新项目。


失败的 POD 文件

# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
platform :ios, '9.0'

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

  # Pods for CocoaPodsnanotest
  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
end

错误信息

[!] Error installing nanopb
[!] /usr/local/bin/curl -f -L -o /var/folders/__/0c2ry6ss1wn6wrk65f_lgmyh0000gn/T/d20180808-9545-g29rhf/file.tgz https://github.com/nanopb/nanopb/archive/0.3.8.tar.gz --create-dirs --netrc-optional --retry 2

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

可以工作的 pod 文件有旧版本的 pod 文件,因为我有一段时间没有接触过代码,所以我升级了版本,它仍然可以工作。

我不明白所有这些 pod 文件副本存储和提取的位置,但我看不出它们如何提取不同的源文件或类似的东西。我认为,如果一个 pod 适用于一个项目,那么它也适用于同一 Mac 上的另一个项目。

不久前,我完全放弃了 Firestore/Firebase,因为我被同样的问题难住了。我认为这个 nanopb pod 是我在其他地方也需要的东西,并且需要学习如何克服这种障碍,无论是 nanopb 问题还是 CocoaPods 问题。我希望这是 CocoaPods 安装的常见问题,而不是太独特。当我搜索 nanopb 安装问题时,找不到太多东西。搜索 CocoaPods 安装问题是指 CocoaPods 本身,而不是特定模块。

谢谢您的帮助。

4

1 回答 1

0

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (35) 错误:1407742E:SSL 例程:SSL23_GET_SERVER_HELLO:tlsv1 警报协议版本

这听起来像您/usr/local/bin/curl太旧了,无法支持 Github 使用的较新的加密协议。

Github在 2018 年 2 月更改了他们的 SSL 设置。从那时起,许多老客户已经停止工作。我不确定为什么您的旧项目仍然有效,但是尽管您尝试清除缓存,但它可能以某种方式缓存了包。

使用 .检查您的版本/usr/local/bin/curl --version。7.47.0 版似乎对我有用。

于 2018-08-08T07:01:57.387 回答