flutter doctor 出现以下问题,原因是cocoapods没安装。
[!] Xcode - develop for iOS and macOS (Xcode 14.3)
✗ CocoaPods not installed.
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 install:
brew install cocoapods
pod setup
! Brew can be used to install CocoaPods.
Download brew at https://brew.sh/.
试过了网上的很多方法,没有一个能用的,安装一个cocoapods,出现一大堆步骤,方法多倒是真的,但是就是没用。有的说是ruby版本太低,什么.zshrc
文件乱七八糟一堆,搞得我火气上来了。结果在书上找到了答案。
brew update
brew install --HEAD libimobiledevice
brew install ideviceinstaller iOS-deploy cocoapods
brew setup
其中安装cocoapods的命令为
brew install ideviceinstaller iOS-deploy cocoapods
书名为 Flutter技术入门与实战 亢少军
如果解决了问题的话,点点关注,么么哒