问题一
XXX did not pass valibation,due to 1 error
这种情况是组件验证常见错误,一般有 - ERROR 提示;根据错误提示修改即可;但有时会遇到没有任何- ERROR的情况,这时首先在验证选项中添加 --verbose 在次验证; 可以搜索 fail 和 error看看有没有信息;已然没有时建议使用远程验证的方式在此验证;这时可能就能拿到错误信息了,修改直至验证通过就可以提交podspec文件
注意:远程验证必需先提交代码到远程仓库的
问题二
[!] The XXPhotoKit.podspec specification does not validate.
1.本地版本和远程不同步造成
2.或者是项目支持最低版本不一致造成
3.是本地索引库的问题,可以重新建一个索引库提交试试;前提是spec文件验证没有问题
问题三 主工程集成报错
[!] Unable to find a specification for `ZLPhotoBrowser` depended upon by `XXPhotoKit`
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
主工程集成时需要添加一下source到podfile文件:
source ‘https://github.com/CocoaPods/Specs.git’
问题四 索引库报错
[!] Unable to add a source with url https://github.com/CocoaPods/Specs.git named cocoapods.
You can try adding it manually in /Users/mac/.cocoapods/repos or via pod repo add.
[!无法添加url ’ https://github.com/CocoaPods/Specs.git ’ named ’ cocoapods ‘的源文件。
你可以尝试在’ /Users/mac/中手动添加。cocoapods/repos ‘或通过’ pod repo add '。
问题五
Unable to find a specification for XXXXX
[!] Unable to find a specification for `PTBLogInModel`
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
解决方法:
更新本地索引库:pod repo update
pod install 报错 An unexpected version directory
问题六
这个错误,请查看:
podspec 是否未上传到服务器
Podfile的source地址是否是Spec Repo的地址,而不是具体某一个Pod的地址。
请注意:只需要配置索引库的源即可
platform :ios, '9.0'
source 'https://gitee.com/xxx/PTBSpecs.git'
target 'MainUIKit' do
pod 'XXXUIKit'
end
问题七 没有分支权限
[!] /usr/bin/git -C /Users/mac/.cocoapods/repos/PTBPods push origin HEAD
remote: GitLab: You are not allowed to push code to protected branches on this project.
To code.aliyun.com:pintuibao-ios/PTBPods.git
! [remote rejected] HEAD -> master (pre