forem / DEV-ios

DEV Community iOS App
GNU General Public License v3.0
357 stars 97 forks source link

App crashes when DarkTheme enabled on iOS 13 #180

Closed MichalRogowski closed 4 years ago

MichalRogowski commented 4 years ago

Describe the bug App crashes when DarkTheme enabled on iOS 13, *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.' To Reproduce Steps to reproduce the behavior:

  1. Install app from Xcode 11.0+
  2. Go to Sign in screen
  3. Sign in to account with dark theme enabled
  4. App crashes

Expected behavior App should not crash

Smartphone (please complete the following information):

Additional context Crash is caused by this line guard let statusBarView = UIApplication.shared.value(forKeyPath: "statusBarWindow.statusBar") as? UIView else {

maestromac commented 4 years ago

Resolved with https://github.com/thepracticaldev/DEV-ios/pull/181