记录一个校验Podspec文件时候的报错

情景, 执行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 for PaperComponent depended upon by commonComponent
You have either: * out-of-date source repos which you can update with pod repo update or with pod 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.

记录一个校验Podspec文件时候的报错_第1张图片
原因,是找不到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'

你可能感兴趣的:(git,github,cocoapods)