Status Bar via ng-cordova


#1

I am attempting to change the styling status bar (note: not the nav-bar). I have looked at the following posts and tried the methods there described with no success:

after my main app module, I have tried most variations on this:

    .run(function($ionicPlatform, $cordovaStatusbar) {
      $ionicPlatform.ready(function() {
        // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
        // for form inputs)
        if(window.cordova && window.cordova.plugins.Keyboard) {
          cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        }
        if(window.StatusBar) {
          // org.apache.cordova.statusbar required
          StatusBar.styleDefault();
        }
        $cordovaStatusbar.style(1);
      });
    })

I have tried updating StatusBar.styleLightContent(); and $cordovaStatusbar.style(1);

I’m not sure which I should be updating and why it is not working on the simulator for iOS.


#2

What is do you need to change?

The color of the font?
The background color of the status bar?

Please provide this data to be more accurate on the answer.


How to change iOS StatusBar font color?
#3

@Norwill thanks for your reply. Specifically, I am trying to update the font color. Nothing fancy, just make the time, etc white. Thanks!


#4

You can’t do this on JS.

Instead you need to modify on xCode some things.

See here


#5

@Norwill thanks! I’ll try that. If it is not possible to do via JS, should Ionic change the documentation?


#6

Maybe clarify a little more what you can do and what not


#7

Nothing to add, unfortunately, except that I too have tried various combinations of the code from those sources and simply cannot get the status bar to respond to the provided methods. Would be interested to know if you’ve solved the problem.