终端输入flutter doctor
[!] Xcode - develop for iOS and macOS ✗ Xcode installation is incomplete; a full installation is necessary for iOS development. Download at: https://developer.apple.com/xcode/download/ Or install Xcode via the App Store. Once installed, run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -runFirstLaunch [!] Android Studio (not installed) [✓] VS Code (version 1.52.1) [!] Connected device ! No devices available
输出发现xcode安装不完整,按照完xcode后再次输flutter doctor
提示要运行
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
允许后,再次执行flutter doctor,看到有设备连接成功,重启vscode,右下角看到设备了。
[✓] Xcode - develop for iOS and macOS (Xcode 12.3) [!] Android Studio (not installed) [✓] VS Code (version 1.52.1) [✓] Connected device (1 available)