How can you go fullscreen on iOS in Meteor 1.2 / Cordova 5?

565 views Asked by At

I was on Cordova 3.7, and did not have the statusbar plugin. My iOS WebView extended to the top of the screen. (0,0) in JS was the absolute top-left of the screen, and when I set the body bg green, the whole screen is green, with black status bar text (carrier, time, battery etc) on top of the green.

I upgraded to Cordova 5.2 (Meteor 1.2), and my iOS WebView was pushed down to below the status bar. (0,0) in JS is now the screen's (0,20), and the background of the status bar is white.

1

There are 1 answers

0
Loren On

Cordova's "fullscreen" setting is not what you want. You want to add the cordova-plugin-statusbar:

meteor add cordova:[email protected]

and do <preference name="StatusBarOverlaysWebView" value="true" /> by adding the line

App.setPreference('StatusBarOverlaysWebView', true);

to mobile-config.js.