iOS 13: threading violation: expected the main thread
The app is being crashed when trying to hide the navigation bar for a viewcontroller only for iOS 13 users. I got the crash on Crashlytics of Fabric which titled as below, Fatal Exception: NSInternalInconsistencyException threading violation: expected the main thread The app is being crashed on this line of viewWillAppear method, self.navigationController?.isNavigationBarHidden = true To hide the navigation bar on the viewWillAppear method of UIViewController, I am using below code, override func viewWillAppear(_ animated: Bool) { self.navigationController?.isNavigationBarHidden = true super