StatusBar not working no matter what I do


#1

I’ve read through all of the previous posts about statusbar issues but nothing seems to work. I have installed, removed and reinstalled it multiple times. I have also run cordova prepare and build.

ios 8
org.apache.cordova.statusbar 0.1.8 "StatusBar"
ionic: 1.2.8
ionic lib: v1.0.0-beta.13
cordova: 4.0.0
ngCordova: 0.1.5-alpha

I’ve tried defining it in my config.xml like this:

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

<preference name="StatusBarBackgroundColor" value="#000000"/>

I’ve tried defining it in my app.js run with in all of these different ways and still nothing and no errors:

app.run(function($cordovaStatusbar) {
	$cordovaStatusBar.style(2);
});

app.run(function($cordovaStatusbar) {
	$cordovaStatusbar.styleColor('black');
});

app.run(function($cordovaStatusbar) {
	$cordovaStatusbar.styleHex('#FF0000');
});

app.run(function($cordovaStatusbar) {
	$ionicPlatform.ready(function() {
		$cordovaStatusBar.style(2);
	});
});

app.run(function($cordovaStatusbar) {
	$ionicPlatform.ready(function() {
		$cordovaStatusbar.styleColor('black');
	});
});

app.run(function($cordovaStatusbar) {
	$ionicPlatform.ready(function() {
		$cordovaStatusbar.styleHex('#FF0000');
	});
});

app.run(function($cordovaStatusbar) {
	if(window.StatusBar) {
		StatusBar.backgroundColorByHexString("#000000");
	}
});

app.run(function($cordovaStatusbar) {
	$ionicPlatform.ready(function() {
		if(window.StatusBar) {
			StatusBar.backgroundColorByHexString("#000000");
		}
	});
});

app.run(function($cordovaStatusbar) {
	if(window.StatusBar) {
		StatusBar.backgroundColorByName("black");
	}
});

app.run(function($cordovaStatusbar) {
	$ionicPlatform.ready(function() {
		if(window.StatusBar) {
			StatusBar.backgroundColorByName("black");
		}
	});
});

app.run(function($cordovaStatusbar) {
	if(window.StatusBar) {
		StatusBar.styleBlackOpaque();
	}
});

app.run(function($cordovaStatusbar) {
	$ionicPlatform.ready(function() {
		if(window.StatusBar) {
			StatusBar.styleBlackOpaque();
		}
	});
});

#2

Have you removed the ios.json and android.json in the plugins folder and removed the platforms. Then ran ionic add platform and ionic build again?


#3

Yep, unfortunately I have and that didn’t help either. It even shows that its loading

serve  /plugins/org.apache.cordova.statusbar/www/statusbar.js  (platforms/ios/www)  iOS

:frowning:


#4

Did you get it working? I think you need to set overlaysWebView to false.


#5

yes that worked -> set overlaysWebView to fals solved it. But you must then change the hight of the header bar (smaller)


#6

$cordovaStatusBar should be $cordovaStatusbar should it not?