用
pod trunk push --verbose 添加一个 pod 的时候,经常出现如下的错误
[!] The podspec does not validate.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-trunk-0.6.4/lib/pod/command/trunk/push.rb:114:in `validate_podspec'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-trunk-0.6.4/lib/pod/command/trunk/push.rb:59:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
这种错误的原因有可能以下的几个原因:
1. podspec 文件,那个 "和' 出现错误了
2. 代码中有太多的warning了
可以用如下的找到具体的原因:
pod spec lint --no-clean
如果出错就会出现为什么出错
[!] The spec did not pass validation, due to 17 warnings (but you can use `--allow-warnings` to ignore them).
如果是因为2的原因, warning无法改(例如你引用了其他pod 了)
可以用
pod trunk push --verbose --allow-warnings
就表示可以忽略所有的warnings的.
我是在pod push:
https://github.com/xzjxylophone/RXQRCode.git
遇到上述的问题的!