启动文字提示,h5调试加入
This commit is contained in:
@@ -359,6 +359,12 @@ public final class WebContainerViewController: UIViewController {
|
||||
throw BootError.ipaUpgradeRequired(downloadURL: dl)
|
||||
}
|
||||
|
||||
// 过渡文案:config 已拉到、进入 zip 升级前的"建连等首字节"静默阶段。
|
||||
// 不补这一步,用户会看到"拉取配置中..."一直显示到 zip CDN 冷 DNS+TLS 握完
|
||||
// 才跳到"下载更新中 1%",慢网络下感知像卡死。这里把 UI 状态机补齐到与
|
||||
// 实际工作阶段对应。
|
||||
splash.update(text: "校验版本中...", progress: nil)
|
||||
|
||||
// H5 zip 升级失败仍致命(用户体验 ≠ 静默用旧 zip)—— 抛出由外层 splash.showError
|
||||
// LobbyZipUpgrader.onProgress 由 URLSession delegate 后台队列调度,
|
||||
// 必须显式 hop 到 MainActor 才能动 splash UI。
|
||||
@@ -450,12 +456,15 @@ public final class WebContainerViewController: UIViewController {
|
||||
bridge.call("getnetwork", data: .string("\(code)"), callback: nil)
|
||||
}
|
||||
|
||||
// §3.2 [4] appservice — App 前后台切换(命名错位沿用历史)
|
||||
// §3.2 [4] appservice — App 前后台切换(值错位沿用历史 msext WKWebView 路径)
|
||||
// 真·进入后台 → "2",真·回到前台 → "1"。参 daoqi/msext NewRootVC.m:1773/1782、
|
||||
// gameController.m:1323/1332(AppDelegate post 的 NSNotification 名也是错位的,
|
||||
// 净结果是 H5 收到的桥值与"自然语义"相反,必须照抄)。
|
||||
AppLifecycleObserver.shared.onBackground = {
|
||||
bridge.call("appservice", data: .string("1"), callback: nil)
|
||||
bridge.call("appservice", data: .string("2"), callback: nil)
|
||||
}
|
||||
AppLifecycleObserver.shared.onForeground = {
|
||||
bridge.call("appservice", data: .string("2"), callback: nil)
|
||||
bridge.call("appservice", data: .string("1"), callback: nil)
|
||||
}
|
||||
|
||||
// §3.2 [12] getWebdata — 反向把 backgameData / 弹层 data 入参透传给大厅 H5。
|
||||
|
||||
Reference in New Issue
Block a user