【问题标题】:Could not add private pod as a dependency in other pod?无法在其他 pod 中添加私有 pod 作为依赖项?
【发布时间】:2015-01-07 20:51:32
【问题描述】:

我正在开发一个私有 pod,当我尝试将其作为依赖项添加到另一个私有 pod 时,我在运行“Pod 更新”时遇到此错误:

[!] Error installing EEMyPod
[!] Attempt to read non existent folder `/Volumes/Development/Work/Projects/Pods/eagle-eye-ios-pod/Example/Pods/EEMyPod`.

我不知道为什么会这样!

但是,在运行时:

pod spec lint

我得到了这个:

Attempt to read non existent folder `/private/tmp/CocoaPods/Lint/Pods/EEMyPod`

我认为这可能是一个线索。

这是我的 Podfile:

Pod::Spec.new do |s|
  s.name             = "EEMypod"
  s.version          = "0.1.0"
  s.summary          = "A short description of EEMypod."
  s.description      = <<-DESC
                       An optional longer description of EEMyPod

                       * Markdown format.
                       * Don't worry about the indent, we strip it!
                       DESC
  s.homepage         = "https://github.com/Codigami/EEMyPod"
  # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
  s.license          = 'MIT'
  s.author           = { "Siddarth Chaturvedi" => "Email ID" }
  s.source           = { :git => "git@github.com:Codigami/EEMyPod.git", :tag => "0.1.0" }
  # s.social_media_url = 'https://twitter.com/kidsid49'

  s.platform     = :ios, '7.0'
  s.requires_arc = true

  s.source_files = 'Pod/Classes/*.{h,m}'
  s.resource_bundles = {
    'AAFNetworking' => ['Pod/Assets/*.png']
  }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'

end

【问题讨论】:

  • 是的!这都是关于可可豆荚的。我没找到你?
  • 好的,还有什么选择?
  • 你可能想发布你的 podfile。
  • @Jeff 问题已使用 podfile 更新。
  • 我认为您现在指向 podfile 中的主 pod 存储库,而您的私有 pod 不存在。请按照本指南了解如何创建自己的 pod 规范 repo。 guides.cocoapods.org/making/private-cocoapods.html 仅供参考,您发布的是您的 podspec,而不是您的 podfile。

标签: ios objective-c iphone cocoapods podspec


【解决方案1】:

这听起来很可能是 CocoaPods 在 linting 规范时未能下载依赖项。如果您使用--verbose 再次运行该命令,它将在克隆存储库时暴露来自 git 的潜在错误。可能是依赖项缺少标签。

CocoaPods 0.35.0.rc2 已更改以提供更好的错误消息 (https://github.com/CocoaPods/CocoaPods/issues/2667)。

【讨论】:

  • 我用过,我得到了详细的一个,比如 -> $ /usr/bin/git clone git@github.com:Codigami/EEMyPod.git /private/tmp/CocoaPods/Lint/Pods/EEMyPod --single-branch --depth 1 --branch 0.1.0 克隆到 '/private/tmp/CocoaPods/Lint/Pods/EEMyPod'... 警告:找不到要克隆的远程分支 0.1.0。致命:在上游源中找不到远程分支 0.1.0
  • 为什么将版本号视为分支?
  • 这是 git 的内部术语,提交、标签和分支之间没有区别。你可能还没有把你的标签向上推。
猜你喜欢
  • 2017-04-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-07-31
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多