Phase 6 commit A:AppCoordinator + SubGameViewController 框架 + SwitchOverGameData push

- AppCoordinator:2s 节流 + 栈深 < 2 守门 + .subGameDidReturn 通知名(Design §2.4.3)
- SubGameViewController:复用 BridgedWebView/Splash/16:9 letterbox/ExternalSubscriptions,
  AppDataWriter(.subGame) 写 4 个 app_*.js;H5 未安装时抛错(待 commit B 接入下载)
- SwitchOverGameHandler:解 Gamedirectory/gamedownloadurl/data → AppCoordinator.showSubGame
  (msext NewRootVC.m:541-566 等价,节流与栈深由 Coordinator 守门,cb 字面始终回)
- SceneDelegate:UINavigationController 承载大厅,nav 引用交给 AppCoordinator
- Plan 进度已勾选 §5 / §8(commit B/C 留待 SubGameDownloader 与 backgameData/getWebdata 链路)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
joywayer
2026-06-22 20:59:00 +08:00
co-authored by Claude Opus 4.7
parent 68cf7140d7
commit 7a5644053d
5 changed files with 471 additions and 15 deletions
+11 -1
View File
@@ -14,7 +14,17 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = scene as? UIWindowScene else { return }
let window = UIWindow(windowScene: windowScene)
window.rootViewController = WebContainerViewController()
// UINavigationController 便 Phase 6 push / Phase 7 push
// 3Design §2.4.3 AppCoordinator push
let lobby = WebContainerViewController()
let nav = UINavigationController(rootViewController: lobby)
nav.setNavigationBarHidden(true, animated: false)
nav.interactivePopGestureRecognizer?.isEnabled = false
AppCoordinator.shared.navigationController = nav
window.rootViewController = nav
self.window = window
window.makeKeyAndVisible()
}