线程1:在Xcode 11.2.1上运行的信号SIGABRT错误

时间:2019-12-10 09:01:12

标签: ios react-native react-native-ios xcode11 xcode11.2.1

该项目(react-native)在Xcode 10.2上运行良好,并且要在iOS 13上进行测试,我尝试使用Xcode 11.2.1打开该项目,该应用程序在启动时崩溃,并出现Xcode 11.2.1的错误控制台在下面:

Assertion failure in -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3900.12.16/UIApplication.m:5316
2019-12-10 14:26:37.206842+0530 workish[73259:574909] *** 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.'
*** First throw call stack:

1 个答案:

答案 0 :(得分:2)

您正尝试访问自iOS 13起已弃用的代码中的statusBar。下面是示例代码,用于获取iOS 13+及更低版本的statusBar

const s = Symbol()