Initial project

This commit is contained in:
Cody
2026-03-06 14:56:17 +08:00
parent 977b627b15
commit bf9e099747
1180 changed files with 50973 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import UIKit
import Flutter
@objc class SceneDelegate: FlutterSceneDelegate {
var flutterViewController: FlutterViewController?
override func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = scene as? UIWindowScene else { return }
window = UIWindow(windowScene: windowScene)
let flutterVC = FlutterViewController()
flutterViewController = flutterVC
window?.rootViewController = flutterVC
window?.makeKeyAndVisible()
registerSceneLifeCycle(with: flutterVC.engine)
super.scene(scene, willConnectTo: session, options: connectionOptions)
}
override func sceneDidDisconnect(_ scene: UIScene) {
if let flutterVC = flutterViewController {
self.unregisterSceneLifeCycle(with: flutterVC.engine)
}
super.sceneDidDisconnect(scene)
}
}