Phase 1.16:SceneDelegate 接 WebContainer + 退役 RootViewController

- SceneDelegate.scene(_:willConnectTo:options:) 中 rootViewController
  从 M0 占位 RootViewController() 改为 WebContainerViewController()
- 删除 ylgamehall/RootViewController.swift(M0 + Phase 1.2–1.13 烟雾测试
  整体退役);所有 print 验证记录在 git log,留着是死代码
- File System Synchronized Group 自动适应文件删除,无需改 pbxproj
- BuildProject 通过

至此 Phase 1.16 完成;启动链路:
  SceneDelegate → WebContainerViewController.viewDidLoad
    → setupBridgedWebView + setupSplash + registerBridgeHandlers
    → runBootPipeline (ensureReady → fetch → resolve → upgrade → loadFileURL)
    → didFinish 淡出 splash

Plan 进度已勾选(§5 Phase 1.16 + §8)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
joywayer
2026-06-22 04:23:52 +08:00
co-authored by Claude Opus 4.7
parent 6c943e2924
commit c95e80df9c
3 changed files with 6 additions and 206 deletions
+5 -3
View File
@@ -312,8 +312,10 @@ Contract Design Plan(本文档)
- 入参忽略(参考 msext `RootVC.m:1816-1818``time` 参数实际不读取)
- 副作用:`AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)`responseCallback`.string("vibrator")`
- `WebContainerViewController.viewDidLoad` 新增 `registerBridgeHandlers()` 单一聚合点,Phase 2+ 在此追加。BuildProject 通过
- [ ] **1.16** `SceneDelegate``WebContainerViewController` 作 rootViewController
- 替换 M0 占位 `RootViewController`
- [x] **1.16** `SceneDelegate``WebContainerViewController` 作 rootViewController
- 替换 M0 占位 `RootViewController` + 删除 `ylgamehall/RootViewController.swift`(M0 烟雾测试堆栈整体退役,所有 1.2–1.13 print 验证记录在 git log,留着是死代码)
- File System Synchronized Group 自动适应文件删除,无需改 pbxproj
- BuildProject 通过
- [ ] **1.17** 把渠道目录里临时填入的 demo 值 + 一个 demo H5 跑通 / 真机验证完整 1.10-1.16 链路
#### 验收
@@ -808,7 +810,7 @@ H5 调 `OpenurlTitleData` 打开弹层 WebView,弹层内 H5 用 `window.settin
- [x] 1.14.d WebContainerViewControllerSplashOverlay + 16:9 letterbox + 启动流水线 + 三种 alert
- [x] 1.14.e WebView didFinish 后 0.3s 淡出 splash + removeFromSuperview
- [x] 1.15 VibratorHandler(单次振动,AudioServicesPlaySystemSound + responseCallback "vibrator"
- [ ] 1.16 SceneDelegate → WebContainerViewController
- [x] 1.16 SceneDelegate → WebContainerViewController(删除 M0 占位 RootViewController.swift
- [ ] 1.17 Demo H5 联调 + 真机验证升级路径
### Phase 2 大厅简单 handler + 反向 callback