发现问题
最近更新flutter运行flutter doctor 发现提示
Xcode - develop for iOS and macOS (Xcode 15.3)
! CocoaPods 1.11.3 out of date (1.13.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods for instructions.
根据提示跳转到文档,执行 sudo gem install cocoapods 一顿授权操作,下载虽然成功了,但是运行
pod --version
版本号还是旧的,并未更新成功。
解决方法
最终使用brew安装cocoapods,最终安装成功。
brew install cocoapods
再次运行 pod --version 版本得到更新 运行flutter doctor 也正常了