Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6381] App crashes when trying to set statusBarBackgroundColor on iOS

GitHub Issuen/a
Resolution Date2019-12-02T10:38:13.000+0000
Affected Version/sn/a
Fix Version/sn/a
ReporterDavid Illichmann
AssigneeShak Hossain


When I try to set the statusbarColor on iOS the App crashes. I think it is not allowed to set the Statusbarcolor with the iOS 13 SDK globally. I try to run this code in my alloy.js:
Ti.UI.iOS.statusBarBackgroundColor = "#013487";
Here is the error:
message = "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.";
nativeStack = "3   Foundation 0x000000010c182de9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191\n4   UIKitCore  0x000000011964729f -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:] + 255\n5   UIKitCore  0x0000000119647770 -[UIApplication statusBarWindow] + 24\n6   Foundation 0x000000010c1abe07 -[NSObject(NSKeyValueCoding) valueForKey:] + 317\n7   eRef  0x0000000109f52e88 -[TiUIiOSProxy setStatusBarBackgroundColor:] + 712\n8   TitaniumKit0x000000010eeb0490 -[KrollObject setValue:forKey:] + 410\n9   TitaniumKit0x000000010eeae5b8 KrollSetProperty + 360\n10  JavaScriptCore  0x000000010a506195 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE3putEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameENS_7JSValueERNS_15PutPropertySlotE + 277\n11  JavaScriptCore  0x000000010a9d0de1 llint_slow_path_put_by_id + 3201\n12  JavaScriptCore  0x000000010a4c6979 llint_entry + 39824\n13  JavaScriptCore  0x000000010a4d3a13 llint_entry + 93226\n14  JavaScriptCore  0x000000010a4d3a13 llint_entry + 93226\n15  JavaScriptCore  0x000000010a4bcc3f vmEntryToJavaScript + 200\n16  JavaScriptCore  0x000000010a8d1571 _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEPNS_9ExecStateEPNS_8JSObjectE + 11361\n17  JavaScriptCore  0x000000010ab52b6b _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 299\n18  JavaScriptCore  0x000000010a5050b3 JSEvaluateScript + 675\n19  TitaniumKit0x000000010eeeb030 -[KrollEval jsInvokeInContext:exception:] + 175\n20  TitaniumKit0x000000010eeb4ca9 -[KrollBridge loadCommonJSModule:withSourceURL:] + 309\n21  TitaniumKit0x000000010eeb564e -[KrollBridge loadJavascriptText:fromFile:withContext:] + 68\n22  TitaniumKit0x000000010eeb6a37 -[KrollBridge require:path:] + 377";    
I think it is connected to TIMOB-27384


  1. Brian Knorr 2019-10-29

    What is the workaround? Our app is crashing because of this.
  2. David Illichmann 2019-10-30

    Hi @Brian Knorr ! Unfortunately there is no workaround. We just don't use a custom color for the status bar anymore. @Shak Hossain Are there any plans to fix this issue?
  3. Sharif AbuDarda 2019-11-03

    Hello, You can only use the property for coloring the status bar in here. http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.StatusBar
  4. Motiur Rahman 2019-12-02

    Here is the PR - https://github.com/appcelerator/titanium_mobile/pull/11370 This issue will be fixed in our upcoming release version 9.0.0 Thanks!

JSON Source