#背景#在老的IOS项目如,需要引入Flutter的页面
实现步骤
1:使用flutter创建moduel,并生成离线的frame提供iso使用
flutter create -t module flutter_module #创建module
flutter build ios-framework --output=framework/ #生成frame
如图所示

2把frame加入到ios中
选择 target->Build Phrases-> Link Binary With Libraries 生成的frame
如图



注意:
1:必须选中Flutter.xcframework, 否则在import Flutter的时候会提示找不到module
2:App.xcramework是Dart语言编写的 应用,需要加入到ios中,否则出现白屏
3:可同时选择Debug中Release文件夹中的App.scframework,Flutter.scframework 体四个文件夹
并配置路径,区分发布环境还是调试环境(模拟器上运行),由于App.scframework,Flutter.scframework同名了需要配置,否则Xcode没发确定选择的是Debug,还是Release

解决方法