How to hide the status bar?
-
I’m trying to hide the top status bar on iOS on my first app.
I followed the instructions here: https://docs.monaca.io/en/reference/cordova_6.2/statusbar/
-enabled the plugin in the IDE
-added the Info.plist file with the parameters to hide at app startupYet when I view my app in the Monaca app, the status bar is still there unchanged.
Any pointers please? Would this even work when viewing within the Monaca app?
-
@snakeyak You have to do a debug build which includes the plugins or a production build.
-
Thank you for your quick answer. I did a debug build on iOS, unfortunately the status bar is still there - although for some reason it’s just blank (grey without signal, time etc icons). Any ideas?
Thank you
-
@snakeyak Have you tried:
ons.ready(function(){ StatusBar.hide; });
-
@munsterlander yes I have tried that. Been fiddling with this for hours, still no luck. Would kill for a working example
-
@snakeyak I don’t have iOS but I can do one real quick and confirm it is good on Android if that would help.
Edit: Another option which I know works, is to enable Full Screen with Monaca. That hides everything.
-
Hi,
How did you add the configuration in “config.xml” file? You need add the following snippet within
<platform name="ios">
tag and test it in the custom debugger or built app:<config-file parent="UIStatusBarHidden" platform="ios" target="*-Info.plist"> <true/> </config-file> <config-file parent="UIViewControllerBasedStatusBarAppearance" platform="ios" target="*-Info.plist"> <false/> </config-file>
-
@khemry That did the trick, thank you so much!