把自己的插件上传到Cocoapods的步骤
LPCTools是我的仓库名称 用来举例 实际请自行替换
- 把代码先提交到git上
git add .
git commit -m 'Godlike'
git push
- 验证spec文件合法性
pod lib lint LPCTools.podspec
- 打好tag准备发布新版本的插件(注意tag版本要和spec中的版本一致)
git tag 0.3.1
git push --tag
- 发布
pod trunk push LPCTools.podspec
- QA
pod trunk register "GodlikeLPC"
pod trunk add-owner LPCTools
error: include of non-modular header inside framework module 'LPCTools.LPCModel':
原因:在框架模块中包含非模块化头文件;
解决方案:验证和发布时加上配置”--use-libraries“
验证:pod lib lint LPCTools.podspec --use-libraries
发布:pod trunk push LPCTools.podspec --use-libraries