Cocoapods Private Pods
创建
创建私有源 git 仓库,可以创建 GitHub 仓库或者其它,然后将私有源添加至本地,下以 git@github.com:Coder-ZJQ/Specs.git
为例:
# pod repo add NAME URL [BRANCH]
pod repo add zjq-specs git@github.com:Coder-ZJQ/Specs.git
可以执行下列命令查看已添加的私有源:
# 查看本地的私有源列表
pod repo list
校验私有源中的 spec 是否合法
cd ~/.cocoapods/zjq-specs
pod repo lint .

添加
添加 podspec 至私有源,以 JQCollectionViewAlignLayout.podspec
为例:
# pod repo push REPO_NAME SPEC_NAME.podspec
pod repo push zjq-specs JQCollectionViewAlignLayout.podspec
使用
编辑 Podfile
文件,添加需要使用的私有源及其中的框架,如下所示:
Podfilesource 'git@github.com:Coder-ZJQ/Specs.git' target 'your-target' do pod 'JQCollectionViewAlignLayout' end
删除
删除本地添加的私有源(即 .cocoapods/repos
目录下)
pod repo remove zjq-specs
参考资料
Private Pods: https://guides.cocoapods.org/making/private-cocoapods.html