Statusbar Color Problem with Beta.10

Hi,

I know there are some topics about statusbar but my problem is it worked normale before
I moved to v1.0.0-beta.10 “hafnium-heron” · 2014-07-24. Now my statusbar text color doesn’t change to white anymore. I have a ionic dark background and with beta 9 the color was white but now its black!

I tried the statusbar tutorial on http://learn.ionicframework.com but it doesn’t work. I can’t change anything with this code. I tried to change the background color to red or something else but nothing is working.

Does anyone have the same issues.

1 Like

Hmm, I know for apps I’ve tested, using this in a .run function sets the color to white.

   if(window.StatusBar) {
      // Set the statusbar to use the default style, tweak this to
      // remove the status bar on iOS or change it to use white instead of dark colors.
      StatusBar.styleLightContent();
    }
1 Like

I tried it but it doesn’t work

Thats my plugins? are there missing something?

com.danielcwilson.plugins.googleanalytics 0.6.0 "Google Universal Analytics Plugin" com.phonegap.plugins.PushPlugin 2.2.1 "PushPlugin" org.apache.cordova.console 0.2.7 "Console" org.apache.cordova.device 0.2.9 "Device" org.apache.cordova.dialogs 0.2.8 "Notification" org.apache.cordova.network-information 0.2.8 "Network Information" org.apache.cordova.splashscreen 0.3.1 "Splashscreen" org.apache.cordova.statusbar 0.1.6 "StatusBar"

I placed in in run in document ready and out site of it but both aren’t working. Which one would be the right one?

Hello,

Same problem here, window.StatusBar is undefined.

Hi,

i tried it again to test it. In my case window.StatusBar is not undefined. I connected with Safari to my iPhone and could work with the StatusBar Object. I could see all his functions like hide and show but nothing has any effect on my app.

I tried the same for Android. There I can hide and show the StatusBar when I debug it with DevTools. But this line StatusBar.backgroundColorByHexString("fff") or something like that didn’t have any effect.

@mhartington do you have any ideas? I tried exactly your code snippets. I tried also the tut on learn.ionicframework.com but it didn’t work for me.

@jeba do you have the plugin installed? Maybe thats the reason why your StatusBar Object is undefined

@roland Ok, I found my problem.

Files .h and .m were found in /plugins but not in /platforms/ios/app-name/Plugins.

I must to copy they manually.
After this operation, all is ok for me.

You must run “cordova prepare” command after making any changes. This will copy all required files to added platforms. :smile:

Thx, noob inside :stuck_out_tongue: :smiley:

ok and the statusbar is now working for you? the text is changing to a readable color if you change the background?

Yes, all is working well.

My header is dark and I have screenshots where the statusbar text (clock and this stuff) were white and so I recognized it. And now its black and so it don’t looks pretty well. I tried everything. All the statusbar stuff from @mhartington and I removed the statusbar plugin and added it again but nothing changed.

Hello, I have the problem with the StatusBar as well, I have tried EVERYTHING came into my mind, so please help, I know that there are two ways of doing it:

$cordovaStatusbar.show();
$cordovaStatusBar.style(1);

And:

if(window.StatusBar) {
  StatusBar.styleLightContent();
}

But nothing helps. In my config.xml I have:

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

I have removed the ios platform and added it again several times, I have deleted ios.json several times as well, but still. Any help or advice are welcome!

PS: Also I have removed and added the plugin several times

1 Like

@roland did you get it to work?
I’m also having the same issue

same issue with RC0 (removed plugins, removed platform android…)

and StatusBar.styleLightContent(); does not work (no js error)