//
//  AppDelegate.swift
//  LivenessSDKSwiftDemo
//
//  Created by advance on 2021/7/21.
//

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        if #available(iOS 13.0, *) {
            // iOS 13+: window is created in SceneDelegate
        } else {
            let window = UIWindow(frame: UIScreen.main.bounds)
            window.backgroundColor = .white
            let navc = UINavigationController(rootViewController: ViewController())
            navc.isNavigationBarHidden = true
            window.rootViewController = navc
            window.makeKeyAndVisible()
            self.window = window
        }
        return true
    }

    // MARK: UISceneSession Lifecycle

    @available(iOS 13.0, *)
    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
        let config = UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
        config.delegateClass = SceneDelegate.self
        return config
    }
}

