project-template-ios/sources/project/AppDelegate.swift

33 lines
806 B
Swift
Executable File

import UIKit
@UIApplicationMain
final class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
private(set) lazy var appWindow: UIWindow = {
let window = UIWindow(frame: UIScreen.main.bounds)
self.window = window
return window
}()
static var shared: AppDelegate {
let delegate = UIApplication.shared.delegate
guard let appDelegate = delegate as? AppDelegate else {
fatalError("Cannot cast \(type(of: delegate)) to AppDelegate")
}
return appDelegate
}
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseConfigurator.configure()
return true
}
}