iOS面试集

iOS创建cocoapods私有索引库

2022-06-07  本文已影响0人  落寞绅士

1.创建私有索引库

1.1.在码云或github(自己公司搭建的git也行)上创建一个私有索引仓库,例如"JJBRepo"

1.2.将远程私有索引库添加到本地的cocoapods索引库中

格式:pod repo add [索引仓库名称] [仓库的地址]

pod repo add JJBRepo https://gitee.com/huangchangweng/jjbrepo.git

1.3.查看本地有哪些索引库,~/.cocoapods/repos目录下查看,或

pod repo list

2.创建cocoapos私有库,可参照创建自己的CocoaPods私有库

注意这里创建好以后,不要pod trunk push

3.将私有库放到索引库里面

3.1.cd 到本地pod工程根目录,执行 pod repo push 索引库 xxxx.podspec

格式:pod repo push [索引库名] [私有库名].podspec --allow-warnings

pod repo push JJBRepo JJBHttpManager.podspec --allow-warnings

4.使用

4.1.在Podfile添加source

source 'https://gitee.com/huangchangweng/jjbrepo.git'

4.2.在Podfile添加pod,跟第三方库使用方式一样

pod 'JJBHttpManager', '3.7.1'
上一篇 下一篇

猜你喜欢

热点阅读