一个podspec不完整导致pod update的错误解决
因为需要引用一个库的源码,所以Podfile修改为本地路径的源码形式依赖。
pod 'PhotoKit', :path=>'/Users/xxx/Work/PhotoKit'
然后执行:
pod update
结果得到下面的错误:
update repo
Updating local specs repositories
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Analyzing dependencies
Fetching podspec for PhotoKit
from /Users/xxx/Work/PhotoKit
[!] The PhotoKit
pod failed to validate due to 2 errors.
[!] 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
:
- ERROR | attributes: Missing required attribute homepage
.
- ERROR | attributes: Missing required attribute summary
.
关于swift的提s.summary = ""
s.homepage = ""示搞得很晕。但是错误也比较明显。
打开PhotoKit里面的podspec
s.summary = ""
s.homepage = ""
补充完整的homepage和summary
s.summary = "PhotoKit"
s.homepage = "http://xxx/xxxx"
重新pod update,问题解决。