iOS cocoapods 创建私有库过程
2019-11-28 本文已影响0人
Q14
前言因为 我们已经有 pod repo 所以就省略pod repo过程
1. pod lib create GMRouter

2. 修改 GMRouter.podspec
s.homepage = 'http://git.*****.com/****/GMRouter.git'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'jz' => '***@***i.com' }
s.source = { :git => 'git@git.*****.com:****/GMRouter.git', :tag => s.version.to_s }
3. 添加图片 或者plist
修改 podspec
中
然后新建文件到 Assets 目录下
s.resource_bundles = {
'GMRouter' => ['GMRouter/Assets/*']
}

4. 在gitlab上创建项目并推到gitlab *****上
git push --set-upstream git@git.*****.com:*****/$(git rev-parse --show-toplevel | xargs basename).git $(git rev-parse --abbrev-ref HEAD)
5. pod lib lint 验证通过后
pod lib lint --verbose --no-clean --allow-warnings --sources='[https://github.com/CocoaPods/Specs,git@git.wanmeizhensuo.com:gengmeiios/GMSpecs.git](https://github.com/CocoaPods/Specs,git@git.wanmeizhensuo.com:gengmeiios/GMSpecs.git)' --fail-fast