启动文字提示,h5调试加入

This commit is contained in:
joywayer
2026-06-24 21:20:05 +08:00
parent 1d231a52ef
commit 06b7686e17
12 changed files with 70 additions and 29 deletions
@@ -53,6 +53,11 @@ public final class BridgedWebView: UIView {
// WKWebView + BridgeBus
let webView = WKWebView(frame: .zero, configuration: configuration)
#if DEBUG
if #available(iOS 16.4, *) {
webView.isInspectable = true
}
#endif
let bridge = BridgeBus(webView: webView,
controller: configuration.userContentController)
@@ -108,6 +108,11 @@ public final class OverlayViewController: UIViewController {
}
webView = WKWebView(frame: .zero, configuration: config)
#if DEBUG
if #available(iOS 16.4, *) {
webView.isInspectable = true
}
#endif
webView.scrollView.bounces = false
webView.scrollView.contentInsetAdjustmentBehavior = .never
webView.translatesAutoresizingMaskIntoConstraints = false
@@ -43,7 +43,8 @@ final class SplashOverlay: UIView {
imageView.translatesAutoresizingMaskIntoConstraints = false
addSubview(imageView)
label.textColor = .white
// SplashImage
label.textColor = .black
label.font = .systemFont(ofSize: 14, weight: .medium)
label.textAlignment = .center
label.numberOfLines = 1
@@ -336,11 +336,13 @@ public final class SubGameViewController: UIViewController {
bridge.call("getnetwork", data: .string("\(code)"), callback: nil)
}
// §3.2 4 appservice 沿 msext WKWebView
// · "2"· "1" WebContainerViewController
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.1 14 "2" / "0"
@@ -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/1332AppDelegate 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