1、[!] There was an error registering with trunk: getaddrinfo: nodename nor servname provided, or not known
- 解决方案:开启了ShadowSocks,把ShadowSocks关闭再重试就好了,根本原因是DNS不对
- 附上解决方案链接:https://link.jianshu.com/?t=https://github.com/CocoaPods/CocoaPods/issues/2174
2、- WARN | [iOS] license: Unable to find a license file
- 原因:没有找到License文件,根据规则也可以直接把文本写在podspec文件里
- 解决方案:podspec文件里面添加
- s.license = "Copyright (c) 2018 yangkejun"
3、- WARN | source: The version should be included in the Git tag.
- 原因:podspec里的version要跟git上的tag相匹配
- 解决方案:
- 查看当前tag: git tag
- 推到远端: git push --tags
4、[!] Unable to accept duplicate entry for: KJEmitterDemo (1.0.0)
- 原因:重复
- 解决方案:
- 4.1.重新给git库添加tag git tag -a 1.0.1 -m'release 1.0.1'
- 4.2.上传到远端 git push origin --tags
- 4.3.重新修改podspec文件 s.version = "1.0.1"
- 4.4.再次校验 pod spec lint KJEmitterDemo.podspec --allow-warnings
- 4.5.最后上传到trunk pod trunk push KJEmitterDemo.podspec
5、[!] Unable to find a pod with name, author, summary, or description matching KJEmitterDemo
- 原因:审核过程是要两三天
- 解决方案:
- 执行
pod setup
命令进行本地依赖库更新,然后再搜索 - 如果还是不行删除~/Library/Caches/CocoaPods目录下的search_index.json文件
- 执行
rm ~/Library/Caches/CocoaPods/search_index.json
- 然后再执行搜索
pod search KJEmitterDemo
- 成功如下: