Scene delegate migration#755
Merged
Merged
Conversation
JarvanMo
pushed a commit
that referenced
this pull request
Jul 20, 2026
## 问题说明 iOS App 使用 `FlutterSceneDelegate` 时,通过微信开放标签 `wx-open-launch-app` 冷启动 App,自定义微信 URL Scheme 会通过 `UISceneConnectionOptions.urlContexts` 传入。 fluwx 当前处理了 `UIApplicationDelegate.application:openURL:options:`,但没有处理 UIScene 对应的冷启动入口,导致: - 微信可以成功冷启动 App; - `registerApi()` 正常返回 `true`; - Dart subscriber 无法收到 `WeChatLaunchFromWXRequest`; - 无法获取开放标签传入的 `extMsg`。 ## 修改内容 - 将现有 URL Scheme 处理和缓存逻辑抽取为 `handleOrCacheOpenURL:`; - 新增 `scene:openURLContexts:`,处理 App 运行期间收到的自定义 URL Scheme; - 新增 `scene:willConnectToSession:options:`,处理冷启动时 `connectionOptions.URLContexts` 中的 URL; - 复用现有 `_cachedOpenUrlRequest` 和 `attemptToResumeMsgFromWx()` 流程; - 不修改现有 Dart API 和 Android 行为。 ## 测试结果 已在 iOS 真机 Profile 模式下测试: 1. 完全结束 App; 2. 通过微信开放标签冷启动; 3. `registerApi()` 返回 `true`; 4. Dart subscriber 收到 `WeChatLaunchFromWXRequest`; 5. 成功获取 `extMsg`; 6. App 成功跳转到指定业务页面。 ## 关联问题 Fixes #769 Related to #733 Follow-up to #755
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.