我有一个压缩的iOS框架,我正试图通过CocoaPods在测试应用程序中使用它。我已经把它添加到我的github的releases下了。我的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 install时,我发现压缩文件TestPod-0.1.zip既没有下载,也没有将框架添加到我的项目中。有人能建议我如何让Pod下载我的框架吗?
发布于 2016-02-09 22:55:54
您必须指定一个git代码库,而不仅仅是某个任意目录。因此,您应该提取用于克隆存储库的https://github.com/username/TestPod/ ( HTTPS路径而不是SSH),而不是使用: URL (一个目录)。在您的情况下,这可能是https://github.com/username/TestPod.git。
在Github上,这通常可以在你想要使用的repo的顶部找到。如果您仍然有问题,请指定您正在尝试使用的实际repo。
发布于 2016-02-20 02:55:49
你的podfile应该指向repo。因此,您的podfile (使用您为TTNew指定的测试代码库)应该如下所示:
pod 'TTNew', :git => 'https://github.com/aditya-tirodkar/TTNew.git'发布于 2017-12-19 19:12:50
对于同样的问题,我找到了一个解决方案:将podspec添加到存储库中,并且不使用:git => 'https://github.com/username/TestPod/'部件。因此,它看起来就像普通的pod 'TestPod'。
一些信息是here。
它为什么会起作用--谜团:)
https://stackoverflow.com/questions/35290311
复制相似问题