support cache cold launch uri data#162
Open
yummyChina wants to merge 2 commits intoRxReader:masterfrom
Open
Conversation
added 2 commits
February 6, 2026 13:50
添加 pendingOpenURL、pendingUserActivity 等状态变量,用于在微信 SDK 未初始化时暂存启动请求。注册成功后通过 handlePendingWXOpenIfNeeded 处理暂存请求。同时添加 cachedLaunchReqType 和 cachedLaunchReqData 缓存启动请求数据,供 getLaunchReq 方法调用,确保在 Flutter 端可以获取到启动参数。修改 application:openURL:options: 和 application:continueUserActivity:restorationHandler: 等方法,在微信 SDK 处理失败且插件已运行时,主动触发 onLaunchFromWXReq 事件并缓存数据。
实现 WechatKitPlatform 接口的 getLaunchReq 方法,该方法通过 MethodChannel 调用原生端获取启动时传递的微信请求数据,并反序列化为对应的 WechatReq 对象(目前支持 launch 和 showMessage 类型)。这允许应用在冷启动时处理来自微信的请求。
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.
如果初始化时机较晚,可以通过getLaunchReq 获取冷启动分享数据