使用私有Cocoapods仓库遇到的问题

1. pod lib lint (检查本地pod)

[!] DemoPodSpecs did not pass validation, due to 2 warnings (but you can use --allow-warnings to ignore them).
You can use the --no-clean option to inspect any issue.

解决办法:用 pod lib lint --allow-warnings 命令

2. pod spec lint (检查远程pod)

Encountered an unknown error (Simulator is not available.) during validation.

解决办法:升级cocoapods “sudo gem install -n /usr/local/bin cocoapods --pre”

3. pod spec lint (检查远程pod)

[iOS] unknown: Encountered an unknown error (Must be in the root of the repo (/Users/*.cocoapods/repos/master), instead in ....

解决办法:可能是因为更新完Xcode以后Xcode路径更改了,Xcodebuild找不到路径。 执行命令 “sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer ”

4. pod repo push DemoPodSpecs DemoPodSpecs.podspec

The DemoPodSpecs.podspec specification does not validate.

解决办法:pod repo push DemoPodSpecs DemoPodSpecs.podspec --verbose --use-libraries --allow-warnings

5. pod repo push DemoPodSpecs DemoPodSpecs.podspec --verbose --use-libraries --allow-warnings

/usr/bin/git -C /Users/.cocoapods/repos/DemoPodSpecs -C
/Users/.cocoapods/repos/DemoPodSpecs push origin master
fatal: repository '' not found

解决办法:到 /Users/.cocoapods/目录下查看私有pod库是否存在

6. pod lib lint

[!] The validator for Swift projects uses Swift 3.0 by default, if you are using a different version of swift you can use a .swift-version file to set the version for your Pod. For example to use Swift 2.3, run: echo "2.3" > .swift-version.

解决办法:运行 echo 3.0 > .swift-version






pod私有库更新流程:

1. 替换 DemoPod.framework
2. 修改 DemoPod.podspec文件,修改version即可
3. 打tag,并将tag上传 (git push origin [tagname] / git push origin --tags)
4. pod lib lint —allow-warnings
5. pod repo push DemoPod DemoPod.podspec

你可能感兴趣的:(使用私有Cocoapods仓库遇到的问题)