问题1:运行没有权限
../../../Soft/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:9:8: Error: Error when reading '../../../.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/vector_math_64.dart': Permission denied
解决方法
找到对应的文件,把权限修改为可读可写可执行
sudo chmod -R 777 *
问题2:CocoaPods报错
[!] Automatically assigning platform `iOS` with version `12.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile.
解决方法
修改Podfile文件
添加platform :ios, '12.0'
问题3:CocoaPods报错,找不到测试target
[!] Unable to find a target named `RunnerTests` in project `Runner.xcodeproj`, did find `Runner`.
解决方法
修改Podfile文件
把RunnerTests删掉
问题4
[ERROR:flutter/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm(203)]
解决方法
修改info.plist文件,添加下列代码
<key>FLTEnableImpeller</key>
<false/>
问题5:Flutter 运行IOS真机,提示无法打开“iproxy”,因为无法验证开发者
[ERROR:flutter/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm(203)]
解决方法
在终端输入一下命令行 + flutter SDK路径(/Users/xxx/flutter/bin/cache/artifacts/usbmuxd/iproxy)
sudo xattr -d com.apple.quarantine
如:
sudo xattr -d com.apple.quarantine /Users/xiaoqiang/flutter/bin/cache/artifacts/usbmuxd/iproxy
原本:Flutter 运行IOS真机,提示无法打开“iproxy”,因为无法验证开发者