Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Ios status bar overlays the webview

  • I am having a hard time getting the iOS status bar to be solid and not overlay my app content. I tried the status bar plugin but get the error: “StatusBar.overlaysWebView is not a function”

  • Monaca

    @Matt-Harbaugh Where did you call the function? You might call this function before the StatusBar plugin (Cordova) is ready. Make sure to call it within ondeviceready function.

  • Whats odd is the StatusBar object is there even without adding the plugin. The console show this:
    hideStatusBar: function () {
    showStatusBar: function () {
    statusBarStyleBlackOpaque: function () {
    statusBarStyleBlackTranslucent: function () {
    statusBarStyleDefault: function () {
    statusBarStyleLightContent: function () {
    proto: —

    But none of those functions do anything.

    This can be reproduced by creating a new blank project. adding the plugin does not seem to do anything.

  • Monaca

    @swordfishweb I tested a new blank project with the Status bar plugin and found that all of its functions are only working in debug build but not in the Debugger. Similar to how splashscreen settings are not reflected in debugger, only in the built app (debug/release). For this reason, you need to build the debug build in order to test those functions.

    Unlink iOS, all the functions are working as expected in Monaca Debugger in Android.

    Please note that StatusBar.overlaysWebView(true) is only for iOS 7. It may not work as expected for other version. Please refer to StatusBar plugin documentation.

  • I did an apple build and was able to see the Status Bar.hide(), does work. But now the debugger fails to run the app.
    The way I see to fix that is to check to make sure the function exists.

  • Monaca

    @swordfishweb Please submit your project to our Support team. We’ll help checking what is wrong with your project.

  • On iOS 11.2.1:
    I tried StatusBar.styleBlackOpaque(); — but it did nothing


    StatusBar.overlaysWebView(false); – worked but made solid white status bar
    then did
    StatusBar.styleDefault(); brings back black text and icons

  • Monaca

    @swordfishweb So just to confirm. You don’t have any more issue with the StatusBar for iOS, right? Let me know if you need further help. :)