Invalid `Podfile` file: undefined method `pod' for main:Object.
如果你是在iOS中引用flutter的时候,报的这个错。建议移步 https://www.cnblogs.com/jukaiit/p/12181184.html
其他:
先 "pod setup" 再 "pod install".
还不行的话,
rm -rf ~/.cocoapods 后 "pod setup" 再 "pod install"
或者
sudo gem install cocoapods
或者
sudo rm -fr ~/.cocoapods/repos/master
pod setup