ios – 为什么我的CocoaPod没有从指定的URL下载源代码?

前端之家收集整理的这篇文章主要介绍了ios – 为什么我的CocoaPod没有从指定的URL下载源代码?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个压缩的iOS框架,我试图通过 CocoaPods在测试应用程序中使用.我在发行版的github中添加了它.我的podspec目前看起来像:

Pod::Spec.new do |spec|
  spec.name             = "TestPod"
  spec.version          = "0.1"
  spec.license          = { :type => "MIT",:file => "LICENSE" }
  spec.homepage         = 'http://www.test.com'
  spec.author           = "test"
  spec.summary          = "test."
  spec.source           = { :http => "https://github.com/username/TestPod/releases/download/0.1/TestPod-0.1.zip"}
  spec.vendored_framework     = "TestPod-0.1/TestPod.framework"
  spec.ios.deployment_target = '8.0'
end

我在我的Podfile中直接使用它 –

target 'TestApp' do
  pod 'TestPod',:git => 'https://github.com/username/TestPod/'
end

但是,在进行pod安装时,我发现Zipped文件TestPod-0.1.zip既没有下载也没有将框架添加到我的项目中.有人可以告诉我如何让Pod下载我的框架吗?

解决方法

您必须指定一个git repo而不仅仅是一些任意目录.因此,不应使用:https://github.com/username/TestPod/(目录),您应该提取用于克隆存储库的URL(HTTPS路径不是SSH).在您的情况下,这可能是https://github.com/username/TestPod.git.

在Github上,通常可以在您要使用的repo顶部找到它.如果您仍有问题,请指明您尝试使用的实际回购.

猜你在找的iOS相关文章