Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Statusbar in Cordova-ios stays translucent

I am using the cordova status bar plugin and the statusbar is translucent and white. I am developing for iOS 11 witht he newest Version of macOS and xCode.

I researched the errors but none of the fixes proposed helped me.

Adding viewport-fit=cover to the meta tag at the index.html did not work.

Adding the feature tag with ios-package, as mentioned in the docs, to www/config.xml as a child to widget.

Adding the preference tag with StatusBarBackgroundColor and Overlay to the config.xml (as a child to widget and to ios) and www/config.xml did not works.

Using it in Code with the StatusBar global var inside a cordova.platformId = 'ios', has no effect.

In the end the app starts with a black bottom, the black bottom is gone and then there is the translucent status bar.

like image 602
Rikku Porta Avatar asked Oct 24 '25 04:10

Rikku Porta


1 Answers

Adding this to my config.xml solved the problem for me:

  <gap:plugin name="cordova-plugin-statusbar" source="npm"/>
  <preference name="StatusBarOverlaysWebView" value="false" />
  <preference name="StatusBarBackgroundColor" value="#ffffff" />
  <preference name="StatusBarStyle" value="default" />
like image 98
ESA Avatar answered Oct 26 '25 18:10

ESA