alibaba / alibaba/flutter_boost
flutter module 使用flutter boost框架,导出framework集成到iOS工程中,路由跳转无反应
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
## Steps to Reproduce
**[flutter demo 传送门](https://github.com/MQTwist/flutter_use_boost)**
**[iOS demo 传送门](https://github.com/MQTwist/FlutterBoostFrameworkApp)**
1. 创建flutter module,使用flutter boost;
2. 按照说明文档,在flutter module 和 iOS工程做相应的配置;
3. flutter项目和iOS项目按照上面链接下载,保证项目文件夹在同一级;
4. 如果使用cocoapods方式集成,路由跳转、页面显示正常,Podfile配置如下图:

5. 项目使用framework集成就出现问题,步骤如下:
6. flutter项目使用`flutter build ios-framework --output='output path'`导出framework,然后用`'output path'/debug`文件中的frameworks集成到iOS工程,上面提供的demo是集成framework的;
7. 运行之后有以下log:
```
2022-04-16 15:02:23.239711+0800 FlutterFrameworkBoostApp[28382:344327] flutter: Observatory listening on http://127.0.0.1:61821/bUpCrxjBoSk=/
2022-04-16 15:02:23.336295+0800 FlutterFrameworkBoostApp[28382:344310] flutter: FlutterBoost#boost_flutter_binding: handleAppLifecycleStateChanged AppLifecycleState.resumed
2022-04-16 15:02:23.682502+0800 FlutterFrameworkBoostApp[28382:344310] [VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
#0 NativeRouterApi.getStackFromHost (package:flutter_boost/src/messages.dart:297:7)
#1 FlutterBoostAppState._restoreStackForHotRestart (package:flutter_boost/src/flutter_boost_app.dart:208:19)
```
结果是路由跳转失败
**Flutter Boost Version: 3.0 null safety**
**Target Platform: iOS**
**Target OS version/browser: iOS 10.0**
**Devices:模拟器 iOS 13 pro**
## Logs
add your crash log or something else.
```
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the framework integration with the linked Flutter and iOS demos, using `flutter build ios-framework --output='output path'` and the debug frameworks, then compare it with the working CocoaPods setup. Read `flutter_boost/src/messages.dart` around `NativeRouterApi.getStackFromHost` and `flutter_boost/src/flutter_boost_app.dart` around `_restoreStackForHotRestart`. Done means iOS framework integration establishes the channel and routing works without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, ios
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100