// // SceneDelegate.swift // ylgamehall // import UIKit final class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = scene as? UIWindowScene else { return } let window = UIWindow(windowScene: windowScene) // 用 UINavigationController 承载大厅,便于 Phase 6 push 子游戏 / Phase 7 push 弹层。 // 栈深约束 ≤ 3(Design §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() } /// 第三方 SDK 回调入口(微信授权 / 微信分享回包等)。 /// 顺序硬约束:QQ → 微信(msext AppDelegate.m 同款);QQ 走 URL Scheme 不依赖 SDK, /// 这里直接调微信 handler — 未来若 QQ 升级为 SDK 路径则在前面插一条。 func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { for ctx in URLContexts { // Phase 4.E 微信回调(canImport 守卫:未链接时 no-op) if WeChatSDK.handleOpenURL(ctx.url) { continue } // 未来:抖音 / 其它 SDK 回调依次判 } } }