You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
Swift
42 lines
1.1 KiB
Swift
import UIKit
|
|
import Flutter
|
|
import Firebase
|
|
|
|
@main
|
|
@objc class AppDelegate: FlutterAppDelegate {
|
|
|
|
// Expose the Flutter engine for SceneDelegate to use
|
|
lazy var flutterEngine = FlutterEngine(name: "my flutter engine")
|
|
|
|
override func application(
|
|
_ application: UIApplication,
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
) -> Bool {
|
|
// Initialize Firebase
|
|
FirebaseApp.configure()
|
|
|
|
// Start running the Flutter engine
|
|
flutterEngine.run()
|
|
|
|
// Register plugins with the engine
|
|
GeneratedPluginRegistrant.register(with: self.flutterEngine)
|
|
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
}
|
|
|
|
// UIScene lifecycle support
|
|
override func application(
|
|
_ application: UIApplication,
|
|
configurationForConnecting connectingSceneSession: UISceneSession,
|
|
options: UIScene.ConnectionOptions
|
|
) -> UISceneConfiguration {
|
|
let sceneConfiguration = UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
|
sceneConfiguration.delegateClass = SceneDelegate.self
|
|
return sceneConfiguration
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|