我似乎无法理解如何将静态库和公共标头作为 cocoapod 上传。我想要实现的是,通过安装这个 pod,它会拉取 .a 文件和一些标题并将其与我的 .xcodeproj 链接。
- 我为所有架构构建了一个 protobuf,并用 lipo 制作了一个通用库。
- 我将标题和 .a 文件放入文件夹,将其压缩并上传到存储中,并通过公共链接访问。
Pod::Spec.new do |s|
s.name = "Protobuf"
s.version = "0.2.4"
s.license = { :type => "MIT" }
s.homepage = "https://github.com/Rostyk/Protobuf"
s.author = { "Ross" => "ros.aphex@gmail.com" }
s.summary = "Protobuf binary"
s.source = { :http =>
'https://www.dropbox.com/s/gon6x99xjp6hh9g/protobuf.zip?dl=1', :tag => "v0.2.4" }
end
当我这样做pod lib lint Protobuf.podspec --verbose
时输出:
Protobuf did not pass validation, due to 2 errors and 1 warning.
[!] The validator for Swift projects uses Swift 3.0 by default, if you
are using a different version of swift you can use a
`.swift-version` file to set the version for your Pod. For example to use Swift 2.3,
run: `echo "2.3" > .swift-version`.
You can use the `--no-clean` option to inspect any issue.
不幸的是,我对 pod 没有任何经验。也许有人会指出我正确的方向?