alibaba / alibaba/flutter_boost

[Bug]: iOS 集成问题

Open
#1,886 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

### 请描述遇到的问题,以及您所期望的正确的结果

项目为纯 flutter 项目,看给的 demo 也是。
项目原本在AppDelegate didFinishLaunchingWithOptions中调用 [GeneratedPluginRegistrant registerWithRegistry:self]; ,但是看源码,源码内部有registerWithRegistry 传递了self.engine ,这样就导致注册两次,然后项目能正常跑起来。但是跳转时候,发现无法跳转,FlutterBoostPlugin 是一个新的,delegate 为 nil.
如果不手动调用 [GeneratedPluginRegistrant registerWithRegistry:self]; 只使用源码中的注册,那么其他插件报错。

### 请说明如何操作会遇到上述问题

_No response_

### 在下面填入关键复现代码

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
#0 PathProviderApi.getDirectoryPath (package:path_provider_foundation/messages.g.dart:40:7)

#1 getApplicationDocumentsDirectory (package:path_provider/path_provider.dart:121:24)

### 复现的平台

iOS

### Flutter SDK版本

3.10.5

### FlutterBoost版本

4.3.0

### 是否延迟初始化FlutterBoost

No

### 解决方案

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with AppDelegate's didFinishLaunchingWithOptions and the two registration paths: GeneratedPluginRegistrant.registerWithRegistry:self and FlutterBoostPlugin's registration using self.engine. Then inspect the reported path_provider_foundation/messages.g.dart channel error on iOS. Done means identifying a single correct registration flow that preserves FlutterBoost navigation and other plugin channels.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter, ios
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.