美文网首页
让你的框架支持cocoapods

让你的框架支持cocoapods

作者: boundlessocean | 来源:发表于2016-11-28 17:20 被阅读16次
cocoapods.jpg

第一步 设置邮箱

pod trunk register boundlessocean@icloud.com 'boundless'  --verbose

boundlessocean@icloud.com 你的邮箱
'boundless' 名称
之后你的邮箱会收到一个验证的链接,点击进入验证

第二步 设置信任

pod trunk me

第三步 配置自己的podspec文件

下面是我的BLPickerView.podspec文件

Pod::Spec.new do |s|
s.name = 'BLPickerView'
s.version = '1.0.0'
s.license = { :type => "MIT", :file => "LICENSE"}
s.summary = 'A PickerView on iOS.'
s.homepage = 'https://github.com/boundlessocean/pickView'
s.authors = { 'ocean' => 'boundlessocean@icloud.com' }
s.source = { :git => 'https://github.com/boundlessocean/pickView.git',  :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
s.source_files = 'PickViewDemo/BLPickView/*.{h,m}'
end

如果包含资源文件

s.resources = '文件目录/images/*.{png,xib}'

第四步 上传代码

cd 文件目录
git tag '1.0.0'
git push --tags

第五步 提交自己的podspec文件

cd 到BLPickerView.podspec目录
pod trunk push BLPickerView.podspec

时间会很长
如果失败会列出失败原因,根据提示去解决问题

相关文章

网友评论

      本文标题:让你的框架支持cocoapods

      本文链接:https://www.haomeiwen.com/subject/ksvopttx.html