Swift项目cocoapods安装使用Pod install命令失败
错误提示:
[!] Invalid `Podfile` file: syntax error, unexpected ':'
: Uncomment the next line to de
^
/Users/XXX/XXX/SwiftTest/Podfile:1: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('.
这时候需要打开podfile文件---使用vim Podfile命令
查看podfile文件是否是初始状态
: Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
初始状态下platform被注释了,将platform注释取消,将上面一句提示注释掉即可
#: Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
然后关闭Podfile文件之后再使用pod install命令时就不会报错。