情景, 执行pod lib lint 命令行
pod lib lint /Users/liubo/Desktop/LiuboLib/commonComponent/commonComponent.podspec --allow-warnings
结果报如下错误
-> commonComponent (0.1.4)
- WARN | summary: The summary is not meaningful.
- WARN | url: There was a problem validating the URL https://github.com/anxiong/commonComponent.
- ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification forPaperComponent
depended upon bycommonComponent
You have either: * out-of-date source repos which you can update withpod repo update
or withpod install --repo-update
.* mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile.
) during validation.
[!] commonComponent did not pass validation, due to 1 error.
You can use the--no-clean
option to inspect any issue.
原因,是找不到souce
修复方法 校验的时候加上源地址
即添加–sources 参数,注意,既要添加我们私有库的源地址,也要添加官方的源地址,中间用逗号分隔开
pod lib lint /Users/liubo/Desktop/LiuboLib/commonComponent/commonComponent.podspec --allow-warnings --sources='https://github.com/CocoaPods/Specs.git,http://gitlab.thepaper.cn/.../app/..._spec.git'