1

I'm developing iOS app with PhoneGap (Cordova) and my problem is that status bar is overlaying my webview/application:

enter image description here

I've added preferences in my config.xml file but these are not working:

<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#0ff000" />
<preference name="StatusBarStyle" value="default" />

How can i solve that?

slash89mf
  • 1,057
  • 2
  • 13
  • 35

3 Answers3

3

Installation Command for Status bar Plugin

cordova plugin add cordova-plugin-statusbar 

StatusBarOverlaysWebView (boolean, defaults to true). On iOS 7, make the statusbar overlay or not overlay the WebView at startup. Add this line in your config.xml

<preference name="StatusBarOverlaysWebView" value="false" />

Please read official documentation for better understanding

Hassan ALi
  • 1,313
  • 1
  • 23
  • 51
1

Solved this way: With cordova-plugin-statusbar installed, added this line to config.xml:

<gap:plugin name="com.phonegap.plugin.statusbar" />

and then in index.html:

<script type="text/javascript">
        document.addEventListener("deviceready", onDeviceReady, false);

        function onDeviceReady(){
            StatusBar.overlaysWebView(false);
        }
</script>
slash89mf
  • 1,057
  • 2
  • 13
  • 35
0

Check out Step 3: at the bottom of the page at this link...

https://ccoenraets.github.io/cordova-tutorial/handlebars-templates.html

It actually looks pretty identical to what you did, but also involves a node plugin for the status bar issue.

cordova plugin add cordova-plugin-statusbar 

Hopefully it helps.

mfkogan
  • 60
  • 1
  • 7