创建私有索引库
pod repo
pod repo add remspecs <地址:ssh>
如果失败,则生成 公钥私钥生成
ssh -keygem
在执行
pod repo add remspecs <地址:ssh>
创建私有pod库
基础组件代码上传git
(remote_lib , JBBCategory)
1. 创建索引库
cd remote_lib
pod lib create JBBCategory
yuezishenyou@163.com
Objc
Yes
None
No
2.把组件代码 放到Classes 目录下
3.案例项目 安装私有库
cd Example
pod install
4.在码市或者码云上创建私有库
5.运行没有问题后,打开JBBCategory.podspec 修改说明文件
s.summary = 'JBBCategory.'
s.description = <<-DESC
JBBCategory. 组件之分类
DESC
s.homepage = 'https://coding.net/u/yueshendada/p/JBBCategory'
s.source = { :git => 'https://git.coding.net/yueshendada/JBBCategory.git', :tag => s.version.to_s }
//引用三方库
s.dependency 'AFNetworking'
6.验证
cd JBBCategory
pod lib lint 本地验证
pod spec lint 远程验证
pod lib lint --allow-warnings
7.验证成功后 上传代码到远程git仓库
cd JBBCategory
git status
git add .
git commit -m “xxxxx”
git remote add origin <url:htttps:abdfdad.git>
git push -u origin master
8.打标签
git tag
git tag ‘0.1.0’ 要和.spec文件里的version一致
git push —tags
pod spec lint
pod repo
pod repo push remspecs JBBCategory.podspec
9.安装 Podfile 文件
source 'git@git.coding.net:yueshendada/remspecs.git'
# platform :ios, '9.0'
target 'JBOther' do
use_frameworks!
pod 'JBBConst'
end
完毕
网友评论