ios - 无论我做什么,pod update 都不会更新到最新版本的 pod

标签 ios cocoapods

我查看了相关的 Stack Overflow 问题并尝试了其中的建议,以及 cocoapods 的 github 问题,但均无济于事。

我管理 TensorIOTensorFlow Pod,最近发布了该 Pod 的两个更新:1.15 和 1.15.1。这两个版本都在 GitHub 上进行了标记,并在使用项目根目录中的 pod trunk Push TensorIOTensorFlow.podspec 进行 linting 后推送到主干。

参见https://github.com/doc-ai/tensorio-tensorflow-ios

距离我发布 1.15.1 更新已经过去了十二个多小时,无论我做什么,我都无法让 pod update 将本地项目从 1.15 版本更新到 1.15。 1 版本或 pod install 来安装 1.15 版本以外的任何版本。

我尝试清除cocoapods缓存:

$ rm -rf "${HOME}/Library/Caches/CocoaPods"
$ rm -rf ~/.cocoapods/repos
$ pod cache clean --all

我尝试更新我的本地规范存储库:

$ pod install --repo-update
$ pod update --repo-update
$ pod repo update

在删除项目的 Pods 目录和 Podfile.lock 后,我尝试了 pod updatepod install。我已经在现有项目和新项目以及首次安装 cocoapods 的单独机器上尝试了这两种方法。

我尝试过专门针对 pod 文件中的版本:

pod 'TensorIOTensorFlow', '1.15.1'

仅得到以下错误:

[!] CocoaPods could not find compatible versions for pod "TensorIOTensorFlow":
  In Podfile:
    TensorIOTensorFlow (= 1.15.1)

None of your spec sources contain a spec satisfying the dependency: `TensorIOTensorFlow (= 1.15.1)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

尽管出现了这个错误,而且特别令人沮丧,但 trunk 似乎知道 1.15.1 版本:

$ pod trunk info TensorIOTensorFlow

TensorIOTensorFlow
    - Versions:
      - 0.1.0 (2019-04-09 19:29:30 UTC)
      - 0.1.1 (2019-05-09 17:43:06 UTC)
      - 0.3.0 (2019-12-18 18:44:18 UTC)
      - 0.3.1 (2020-01-23 23:36:35 UTC)
      - 1.13.4 (2020-05-01 21:16:32 UTC)
      - 1.13.5 (2020-05-08 21:13:09 UTC)
      - 1.13.6 (2020-05-26 20:05:09 UTC)
      - 1.15 (2020-05-27 17:06:58 UTC)
      - 1.15.1 (2020-05-27 23:44:11 UTC)

但是 pod search 没有看到它:

$ pod search TensorIOTensorFlow

-> TensorIOTensorFlow (1.15)
   The TensorFlow (unofficial) build used by TensorIO for iOS.
   pod 'TensorIOTensorFlow', '~> 1.15'
   - Homepage: https://github.com/doc-ai/tensorio-tensorflow-ios
   - Source:   https://storage.googleapis.com/tensorio-build/r1.15/TensorIO-TensorFlow-1.15_0.tar.gz
   - Versions: 1.15, 1.13.6, 1.13.5, 1.13.4, 0.3.1, 0.3.0, 0.1.1, 0.1.0 [trunk repo]

可以肯定的是,这是在我使用 pod delete 删除 1.15 和 1.15.1 版本并尝试再次将它们推送到主干之后。在此之前,pod search 确实显示了 1.15.1 版本,但我仍然无法获得升级到该版本的项目。

最后,我尝试卸载并重新安装 cocoapods,正如我提到的,我也在一台新机器上尝试了所有这些,第一次安装了最新版本的 cocoapods,但我仍然无法获得 1.15 .1 版本的 Pod。

最佳答案

更新 CDN 可能会很滞后。要解决此问题并直接从 GitHub 存储库加载,请将源代码“https://github.com/CocoaPods/Specs.git” 添加到 Podfile。

请注意,它会慢得多。

更新:根本原因现在看起来已得到解决。请参阅https://github.com/CocoaPods/CocoaPods/issues/9826

关于ios - 无论我做什么,pod update 都不会更新到最新版本的 pod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62071323/

相关文章:

ios - Spritekit - 使用手势同时用多个手指绘制多条线

android - 我们可以判断应用程序是使用 phonegap 或类似的跨平台解决方案制作的吗?

ios - 在 xcode 6 中排序文档大纲

cocoa - 让 CocoaPods 将资源复制到特定文件夹

iOS Catalyst Cocoapod 框架错误 - 签名需要开发团队

swift - UrbanAirship Cocoapods 无法与 use_frameworks 一起使用

ios - 无法使用类型为 '^' 的参数列表调用 '($T27, IntegerLiteralConvertible)'

ios - 我怎样才能像在谷歌地图中那样缩放

ios - Objective-C 类无法导入在顶层定义的 swift pod

xcode - 通过 SVN 与团队共享支持 CocoaPods 的 Xcode 项目