forked from kudoleh/iOS-Clean-Architecture-MVVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppDelegate.swift
executable file
·34 lines (26 loc) · 997 Bytes
/
AppDelegate.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
let appDIContainer = AppDIContainer()
var appFlowCoordinator: AppFlowCoordinator?
var window: UIWindow?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
AppAppearance.setupAppearance()
window = UIWindow(frame: UIScreen.main.bounds)
let navigationController = UINavigationController()
window?.rootViewController = navigationController
appFlowCoordinator = AppFlowCoordinator(
navigationController: navigationController,
appDIContainer: appDIContainer
)
appFlowCoordinator?.start()
window?.makeKeyAndVisible()
return true
}
func applicationDidEnterBackground(_ application: UIApplication) {
CoreDataStorage.shared.saveContext()
}
}