Skip to main content

Xcode error: libc++abi.dylib: terminating with uncaught exception of type NSException

While compile up from iOS 13 this fatal error may occur:
libc++abi.dylib: terminating with uncaught exception of type NSException

It's probably due to Selector(("statusBar")) in ViewController.swift as this is not allowed in iOS13 anymore.

So try comment:

if responds(to: Selector(("statusBar"))) {
    return value(forKey: "statusBar") as? UIView
}

Read stackoverflow.com/questions/56651245/how-to-change-the-status-bar-background-color-and-text-color-on-ios-13 for more information.