美文网首页iOS
iOS - 上传Cocoapods插件Shell命令

iOS - 上传Cocoapods插件Shell命令

作者: 神灬渐入嘉靜 | 来源:发表于2018-11-30 16:40 被阅读24次

把自己的插件上传到Cocoapods的步骤

LPCTools是我的仓库名称 用来举例 实际请自行替换

  1. 把代码先提交到git上
git add . 
git commit -m 'Godlike'
git push
  1. 验证spec文件合法性
pod lib lint LPCTools.podspec
  1. 打好tag准备发布新版本的插件(注意tag版本要和spec中的版本一致)
git tag 0.3.1
git push --tag
  1. 发布
pod trunk push LPCTools.podspec
  • QA

[!] godlikelpc@gmail.com are not allowed to push new versions for this pod.
The owners of this pod are godlikelpc@126.com.

原因:邮箱地址变更导致。第一次push所使用的邮箱(godlikelpc@gmail.com)跟现在的邮箱(godlikelpc@126.com)不一致,但是笔者已经弃用了之前的邮箱。
解决方案:重新绑定邮箱,会给当前邮箱发信息 确认绑定就好了

pod trunk register godlikelpc@126.com "GodlikeLPC"
pod trunk add-owner LPCTools godlikelpc@126.com

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

相关文章

网友评论

    本文标题:iOS - 上传Cocoapods插件Shell命令

    本文链接:https://www.haomeiwen.com/subject/sobhcqtx.html