Post not yet marked as solved
Post marked as unsolved with 2 replies, 2,312 views
Application runs fine on iOS 12. But crashed on iOS 13.1. I think the issue is in the setting root view controller.let storyboard = UIStoryboard(name: storyBoard, bundle: nil)let desiredViewController = storyboard.instantiateViewController(withIdentifier: identifier);self.window?.switchRootViewController(desiredViewController,animated: animate,options:options)and the extension is:extension UIWindow {func switchRootViewController(_ viewController: UIViewController, animated: Bool = true, duration: TimeInterval = 0.3, options: UIView.AnimationOptions = .transitionFlipFromRight, completion: (() -> Void)? = nil) { guard animated else { rootViewController = viewController return } UIView.transition(with: self, duration: duration, options: options, animations: { let oldState = UIView.areAnimationsEnabled UIView.setAnimationsEnabled(false) self.rootViewController = viewController UIView.setAnimationsEnabled(oldState) }) { _ in completion?() } }}