错误1
image.png export XCODE_VERSION_MINOR\=1200
export XPCSERVICES_FOLDER_PATH\=Runner.app/XPCServices
export YACC\=yacc
export arch\=undefined_arch
export variant\=normal
/bin/sh -c /Users/mac/Library/Developer/Xcode/DerivedData/Runner-bwpjexfpncinyjcgpeafidlfwcdo/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh
/bin/sh: /packages/flutter_tools/bin/xcode_backend.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
PhaseScriptExecution 异常 找不到目录.
在build setting 找到FLUTTER_ROOT 添加项目路径.
/Users/mac/android/project/wyx
错误2
image.png需要执行下
pod update
pod install 然后清理下
错误3
image.pnginvalid reuse after initialization failure
用android studio运行没问题
xcode release 版本 使用flutter run --release运行
关键点:flutter 编译配置要显式指定 release。
flutter clean
flutter build ios
# 然后 XCode 打开项目,找到 Flutter/Generated.xcconfig 文件
# 在文件最后加上
FLUTTER_BUILD_MODE=release
# 然后 archive
# 最后导出时,选择 Development 而不是 App Store,否则只能选 dis 证书而不能选 dev 证书
open -a Simulator 命令打开模拟器
网友评论