CocoaPods pod update 报错"[!] Invalid `xxxx.podspec` file: undefined method ..." 修复

[!] Invalid xxxx.podspec file: undefined local variable or method ...
[!] Invalid `xxxx.podspec` file: undefined method ...
[!] Invalid `<pod_name>.podspec` file: undefined method ...

1.cocoapods版本导致

cocoapods官网
cocoapods github发布页面
CocoaPods pod update 报错

检查发现本地mac系统上cocoapods版本是最新的1.4.0(2018年1月24日)

//删除1.4.0包
sudo gem uninstall cocoapods -v 1.4.0

//然后安装指定版本的Cocoapods
sudo gem install cocoapods -v 1.3.1

//检查版本
pod --version

然后重新拉代码,pod update
编译运行OK!

你可能感兴趣的:(iOS开发)