gra*_*aci 5 dependency-management ios ios-frameworks cocoapods
我有一个压缩的 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
Run Code Online (Sandbox Code Playgroud)
我直接在我的 Podfile 中使用它 -
target 'TestApp' do
pod 'TestPod', :git => 'https://github.com/username/TestPod/'
end
Run Code Online (Sandbox Code Playgroud)
但是,在执行 a 时pod install,我发现TestPod-0.1.zip既没有下载压缩文件,也没有将框架添加到我的项目中。有人可以告诉我如何让 Pod 下载我的框架吗?
您必须指定一个 git 存储库,而不仅仅是某个任意目录。因此,https://github.com/username/TestPod/您不应使用:(目录),而应提取用于克隆存储库的 URL(路径HTTPS不是SSH)。这可能https://github.com/username/TestPod.git就是你的情况。
在 Github 上,通常可以在您要使用的存储库的顶部找到它。如果您仍然遇到问题,请指定您尝试使用的实际存储库。
| 归档时间: |
|
| 查看次数: |
1719 次 |
| 最近记录: |