1.Flutter.framework: Permission denied
打包时提示的错误
原因:Flutter在集成到现有iOS工程中,Flutter在编译时默认对Flutter.framework做了签名操作,导致在我们自己的原生工程运行时,对动态库Flutter做签名时冲突
解决办法
1.Flutter1.9版本造成的,升级到master分支1.10就可以了
2.不升级Flutter的情况下,可以改Flutter SDK 的一个文件,flutter/packages/flutter_tools/bin/xcode_backend.sh
在144行修改为
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -iname '.h' -exec chmod a-w "{}" ;
2.无法Hot Reload
提示:Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:1024/cCE07wniaDY=/ws
解决办法:
1.打开 Xcode - Window - Devices and Simulators,找到用来调试的设备
2.取消勾选 Connect via network,如果之前就未打钩,先选择再取消勾选