私有pod

来源:互联网 发布:led显示屏输入软件 编辑:程序博客网 时间:2024/06/07 19:29

接下来就是要把项目提交到gitHub,做私有pod了

gitHub新建一个project名为CRProtocolManager终端cd至CRProtocolManager项目目录下执行命令git remote add origin https://github.com/sun6boys/CRProtocolManager.git因cocoaPods强制添加开源许可文件执行命令echo MIT>FILE_LICENSE创建名为FILE_LICENSE的文件终端cd至CRProtocolManager目录下执行命令pod spec create CRProtocolManager执行命令vim .CRProtocolManager.podspec编辑podspec文件,具体如何编辑可参看Demo中的podspec文件或者google退出编辑执行命令git add .`git commit -m 'log'git tag 0.0.1 tag一定要和podspec中的version一致git push origin master --tags --tags为了把刚才添加的tag提交上去执行命令pod repo push CRRepositories CRProtocolManager.podspec --verbose --allow-warnings 

报以下错误时

pod spec lint LPPushService.podspec --verbose --use-libraries

这种情况下使用 –use-libraries 虽然不会出现错误(error),但是有时候会带来一些警告(waring),警告同样是无法通过验证的。这时可以用 –allow-warnings 来允许警告。

pod repo push VXPrivateRepositories  ImageDownloadder.podspec --verbose --use-libraries  --allow-warnings

注:CRRepositories即为准备工作中的私有源仓库
成功后pod search CRProtocolManager应该就能搜索到了

万里长征终于走完第一步,基础设施已经构建完毕

0 0