Browse Source

test

pull/1/head
james 6 years ago
parent
commit
f462d33269
  1. 19
      GMERemittance/AppDelegate.swift

19
GMERemittance/AppDelegate.swift

@ -46,7 +46,7 @@ import IQKeyboardManagerSwift
import LGSideMenuController
import Localize_Swift
let server: Server = .stagging
let server: Server = .uat
var overlayView: UIView?
@UIApplicationMain
@ -133,11 +133,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
} else {
// go to splashscreen
KeyChain.shared.remove(key: .password)
let splashWireframe = SplashScreenWireframe()
let nav = UINavigationController.init(rootViewController: splashWireframe.getMainView())
self.window?.rootViewController = nav
self.goSplashScreen()
}
}
@ -275,13 +271,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
}) { (error) in
if error.localizedDescription == "The username/password do not match." {
KeyChain.shared.remove(key: .password)
UserDefaults.standard.set(false, forKey: UserKeys.isUseBiometricAuth)
self.goSplashScreen()
}
self.window?.rootViewController?.alert(message: error.localizedDescription)
}
}
private func goSplashScreen() {
KeyChain.shared.remove(key: .password)
let splashWireframe = SplashScreenWireframe()
let nav = UINavigationController.init(rootViewController: splashWireframe.getMainView())
self.window?.rootViewController = nav
}
}

Loading…
Cancel
Save