iOS组件化之创建私有库

1.提交到远程
git init

git add .

git commit -m '1'

git remote add origin https:www.baidu.com

git remote

git push origin master 
2.创建仓库的描述文件
pod spec create testLib
3.编辑testLib.podspec配置文件
4.添加 tag
git tag

git tag '0.0.1'

git push --tags
5.注册trunk(归类到垃圾邮件了)
pod trunk register 643215594@qq.com 'iFeng' --verbose

pod trunk push testLib.podspec   
pod trunk push testLIb.podspec   --allow-warnings  
添加私有索引库
pod repo

pod repo add FFQBase git@git.coding.et/FFQBase.git

pod lib create FFQBase

git status

git add .

git commit - 'xxxx'

pod lib lint  //本地验证podspec 是否配置正确

pod spec lint //远程验证

pod repo push FFQBase FFQBase.podspec
引用私有库需要加souce源(需要同时带cocoapod官方源)
source 'www.baidu.com.git'

source 'https://github.com/CocoaPods/Specs.git'

子索引
s.subspec 'Base' do |b|
    b.source_file = 'FFQBase/Classes/Base/**/*'
    b.dependency 'AFNetworking'
end

使用:
pod 'FFQBase/Base'
pod 'FFQBase', :subspecs => ['Base','Category','Tool']
git删除远程tag
git tag -d 0.0.1
git tag
git push origin :0.0.1
pod清除本地缓存
pod cache clean --all
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。