pod 組件驗證常見錯誤

第一、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.

解決方法:
升級CocoaPodssudo 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 //查看
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章