Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
iphone X not using the whole screen (not sure about other apple devices) — Gideros Forum

iphone X not using the whole screen (not sure about other apple devices)

Hi, I am finally trying to publish on apple devices, but I noticed that on the iphoneX I have available as test device the app is not filling the whole screen.
It seems like a common issue, but I have no clue on how to fix it: it looks like this
https://user-images.githubusercontent.com/750551/41187367-4b2ec3fc-6b75-11e8-9001-d2784b9df811.png

thank you :)

Comments

  • hgy29hgy29 Maintainer
    You need to enable full screen by including “require” plugin and ticking ‘notch ready’ support

    Likes: MoKaLux, talis

    +1 -1 (+2 / -0 )Share on Facebook
  • piepie Member
    edited January 18
    Thank you, this would indeed use the whole screen but with this setting the notch gets in the way of my app top menu and the app covers the phone notification bar.
    I can easily move down my top menu to make it usable, but if it's possible I'd like to keep the phone notification bar (with the clock and battery indicator) visible.
    On android devices the "standard" view (without require> notch ready) begins just below the notification bar (which I'd say usually includes the notch) and goes down to the bottom of the screen (I had to calculate the size of the navigation bar to avoid content overlapping there).
    On this iphone instead there is a black band between the notification bar and the app, and the same happens below (as it happens on the linked image in the first post: it's like watching a 16/9 movie on a 4/3 screen with black bands above and below).
    Is there a native way to use the whole screen up to the bottom end of the notch/notification bar while keeping the notification bar visible? (As it happens with android standard view).

    Thank you again :smiley:
  • hgy29hgy29 Maintainer
    You can use Application:getDeviceSafeArea to retrieve the size of the notch, or more precisely the margins in which you musn't draw any UI.
    You can also use Application:set("statusBar",true) to re-enable the status bar on iOS and android.

    Likes: pie

    +1 -1 (+1 / -0 )Share on Facebook
  • piepie Member
    Thank you, I missed those! :)
    However on android there is some "issue": I will soon try on the iphone again with these settings and update here.

    Android:
    There is no difference if I set getDeviceSafeArea(logical) with logical true or false: I always get these values

    logical bounds -0 -0 1080 2400 getLogicalBounds()

    safe aerea 0 78 1080 2400 getDeviceSafeArea()

    While the notification bar area is calculated correctly (78px) the android navigation bar is not taken into account: I can tell empirically that its area is somewhere around application:getScreenDensity()/2 so I can live without it and calculate it with this workaround.

    application:set("statusBar",1) - not true for the records- works, but unfortunately only to a certain extent: the notification bar is still hidden under the app, it appears when the navigation bar appears (swiping up from bottom, or swiping down from top) only as an overlay: it's not always there as I was hoping. :smile:

    I don't know if that is how it was meant to be, but it makes sense against the dont-use-notch setting.



  • piepie Member
    Iphone X:
    I built the project instead of using the player but I think it should work the same:

    logical bounds -0 -0 1125 2436 getLogicalBounds()
    safe aerea 0 0 1125 2436 getDeviceSafeArea(false)

    on this device the safe area is equal to logical bounds, and the notification bar is not taken into account, therefore since my top menu is placed at the minimum y of the safe area it is cut in half by the notch.

    However, opposed as it happens on android, application:set("statusBar",1) makes the info from the notification bar always visible (and since my top menu is there it overlaps too, but that is an easy fix).

    I think I can work around this issue like this:
    Android: publish without require>notch ready

    Apple:
    after finding how many pixels are 5,5 mm (https://512pixels.net/2021/01/on-iphone-notch-sizes/) on a retina display I could hardcode my top menu distance from there, then publish the app with require>notch

    However if you think that there is a chance to have a consistent behaviour between the two systems and avoid having to keep two slightly different projects it would be much easier to maintain. :smiley:

    Thank you a lot!

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    pie said:

    Iphone X:
    I built the project instead of using the player but I think it should work the same:

    logical bounds -0 -0 1125 2436 getLogicalBounds()
    safe aerea 0 0 1125 2436 getDeviceSafeArea(false)

    on this device the safe area is equal to logical bounds, and the notification bar is not taken into account, therefore since my top menu is placed at the minimum y of the safe area it is cut in half by the notch.

    There must be some wrong setting somewhere, since I developped and tested getDeviceSafeArea specifically for iPhone X, and I use this for my own apps successfully (well there are some issues with some android phones, but fine for iOS).
    In my projects, in enable retina display and tick the 'notch' option in require plugin.

  • piepie Member
    hgy29 said:


    There must be some wrong setting somewhere, since I developped and tested getDeviceSafeArea specifically for iPhone X, and I use this for my own apps successfully (well there are some issues with some android phones, but fine for iOS).
    In my projects, in enable retina display and tick the 'notch' option in require plugin.

    Found it! Support aspect ratios of 2:1 or higher must be unflagged.
    What should its purpose be?
    Thank you
Sign In or Register to comment.