第一、Encountered an unknown error (Could not find a ios
simulator…)
执行pod lib lint --allow-warnings 报错:
- ERROR | [iOS] unknown: Encountered an unknown error (Could not find a `ios` simulator (valid values: com.apple.coresimulator.simruntime.ios-12-2, com.apple.coresimulator.simruntime.tvos-12-2, com.apple.coresimulator.simruntime.watchos-5-2). Ensure that Xcode -> Window -> Devices has at least one `ios` simulator listed or otherwise add one.) during validation.
解决方法:
升级CocoaPods:sudo gem install cocoapods
升级之后再执行:pod lib lint --allow-warnings 就成功啦
brucedeMacBook-Pro:YExtentions bruceyao$ pod lib lint --allow-warnings
-> YExtentions (0.1.0)
- WARN | [iOS] swift: The validator used Swift `4.0` by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_versions` attribute in your podspec. Note that usage of a `.swift-version` file is now deprecated.
- NOTE | xcodebuild: note: Using new build system
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Constructing build description
YExtentions passed validation.//验证通过
第二、[!] XXX did not pass validation, due to 2 warnings (but you can use --allow-warnings
to ignore them).
有两个警告,其实这行警告可以不用管所以执行命令用:
pod lib lint --allow-warnings //允许有警告
第三、- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use --verbose
for more information.
这个错误有可能是你配置:s.frameworks = ‘UIKit’, ‘MapKit’
框架写的有问题:去掉错误的框架
第四、[!] Unable to accept duplicate entry for: 工程名 (0.1.0)
版本号问题,我们更改版本号,例如更改 YYExtensions.podspec 修改为版本号 0.1.1,然后终端中重新提交版本信息
第五、There was an error pushing a new version to trunk: getaddrinfo: nodename nor servname provided, or not known
原因是你没有执行提交版本号的方法,直接推送到 git,
方法重新提交git
git add .
git commit -am 'XXX'
//第一次提交用:
git remote add origin https://github.com/xxxx/XXX.git
git push -u origin master
//打标签
git tag '0.1.0'
git push origin --tags
git tag //查看