How can i Force white text for clock/battery on IOS?


#1

how can i Force white text for clock/battery on IOS ?


#2

You have to use the cordova status bar plugin.


Add it and then in the app.js:

  if(window.StatusBar) {
  // org.apache.cordova.statusbar required
   StatusBar.styleLightContent(); // this should set it white
}

More ways of styling are described in the github plugin docs.


#3

thank’s i’m going to try this now…


#4

I tried this by running the following.

ionic plugin add org.apache.cordova.statusbar

and modifying my app.js to use styleLightContent(), but then when I went to build on ios the build failed.

Here’s a gist with the full error message.


#5

Do you have this in config.xml?

<feature name="StatusBar">
     <param name="ios-package" value="CDVStatusBar" onload="true"/>
 </feature>

And check if /plugins/com.phonegap.plugin.statusbar/src/ios contains CDVStatusBar class files.


#6

I have the following files in the directory.

CDVStatusBar.h
CDVStatusBar.m

Still not building :confused: