第一步
需要创建远程的的git账号 具体来源自己喜欢用什么就用什么。
把远程的git仓库clone的本地
pod repo add REPO_NAME SOURCE_URL
创建私有仓库 spec
pod spec create 类名
修改一些参数
本地验证 pod lib int
出现错误 用 pod lib lnt --verbose 会打印哪里出错
验证通过之后
git tag "0.0.1"
git push --tags
git push origin master
把项目 push 到git 地址
远程验证 pod spec lnt
验证通过之后
push 到CocosPod
pod repo push class class.podspec
这样就可以搜到这个
pod search class
再次创建一个测试项目 项目名 Test
在Podfile 文件

pod install --verbose --no-repo-udpate
安装之后 会报错 需要把Test 工程的 info Debug Base on Configration File 设置为None
这样就可以使用 pod 的模块项目。
2 更新
更新就是在 class.podspec 把tag 改成 '0.0.2' 重复上面的工作。
网友评论