I am having some difficulties getting the statusbar plugin to style correctly in my V1 project. The statusbar continually turns to a grey background with white text no matter which approach I take.
This my current Ionic setup:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 6.5.0
local packages:
Cordova Platforms : ios 4.3.1
Ionic Framework : ionic1 1.3.2
System:
ios-deploy : 1.9.0
ios-sim : 5.0.8
Node : v9.4.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
These are the plugins for my project:
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
onesignal-cordova-plugin 2.2.5 "OneSignal Push Notifications"
I have attempted to edit the config.xml file for the project to include these preferences and parameters:
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarBackgroundColor" value="#166a34" />
<preference name="StatusBarStyle" value="lightcontent" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
Along with this code in my app.js:
.run(function($ionicPlatform, $cordovaStatusbar) {
$ionicPlatform.ready(function() {
StatusBar.overlaysWebView(true);
StatusBar.styleLightContent();
StatusBar.backgroundColorByHexString("#166a34");
});
})
Any thoughts on why my status bar keeps reverting to a non-stylized version with all of these preferences and code for the app?
Thanks in advance.