Check and clear old configs on app start and app foreground.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts
2018-10-01 15:36:11 +02:00
parent 0c1520d6f8
commit 86646448ac
2 changed files with 44 additions and 2 deletions
+8 -2
View File
@@ -14,8 +14,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.window = UIWindow(frame: UIScreen.main.bounds)
self.appCoordinator = AppCoordinator(window: self.window!)
self.appCoordinator.start()
appCoordinator = AppCoordinator(window: self.window!)
appCoordinator.start()
appCoordinator.checkAndCleanConfigs()
return true
}
@@ -48,4 +50,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return false
}
func applicationWillEnterForeground(_ application: UIApplication) {
appCoordinator.checkAndCleanConfigs()
}
}