import UIKit import React_RCTAppDelegate // The iOS 27 SDK traps at launch unless the app adopts the scene lifecycle, so the window is built here. class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene( _ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions ) { guard let windowScene = scene as? UIWindowScene, let appDelegate = UIApplication.shared.delegate as? AppDelegate, let factory = appDelegate.reactNativeFactory else { return } let window = UIWindow(windowScene: windowScene) factory.startReactNative( withModuleName: "main", in: window, launchOptions: appDelegate.launchOptions ) self.window = window } }