CocoaPods 仓库制作
可参考 https://www.jianshu.com/p/e191ea44d1ea
创建自己的Pod库的索引库
第一步:GitHub 或者 coding Giteen 上创建私有仓库 (空仓库)
1 https://gitee.com/kaelinda/KLRepos.git
pod repo add [私有Pod源仓库名字] [私有Pod源的repo地址]
pod repo add LCRepos https://gitee.com/kaelinda/KLRepos.git
- repos文件是cocoapods的第三方库的索引
- master是主分支索引
- KLRepos是我们自己创建的索引仓库
第二步:创建本地仓库项目
pod lib create KLAModule
.
.
经历过一堆的问号????, 根据自己项目情况选择
.
.
cd KLAModule
pod setup
第三步:关联本地仓库 和 远程仓库
- Git全局配置:
git config --global user.name "你的用户名"
git config --global user.email "你的个人邮箱"
- 创建 & 推送仓库
// * 创建 git 仓库:
mkdir KLMiddleware
cd KLMiddleware
git init
git commit -m "first commit"
git remote add origin https://gitee.com/kaelinda/KLMiddleware.git
git push -u origin master
// * 已有仓库?
cd existing_git_repo
git remote add origin https://gitee.com/kaelinda/KLMiddleware.git
git push -u origin master
- 把创建好的第三方库 push 到私有Pod索引库:
pod repo push LXRepos LXBaseCategory.podspec --allow-warnings --verbose