apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

IOS not using display-mode: standalone #1085

Closed nesbtesh closed 3 years ago

nesbtesh commented 3 years ago

Describe the bug When i generated my iOS app I noticed that is not using the display-mode: standalone feature in iOS

It works perfect in android but not in iOS

URL to app https://www.noritex.com/es/

Expected behavior I expect the layout to change using the standalone display-mode

Screenshots Result:

Screen Shot 2021-02-24 at 5 56 39 PM

Expected:

Screen Shot 2021-02-24 at 5 57 36 PM

Additional info (please complete the following information):

nesbtesh commented 3 years ago

Is there any to force webskit to use display-mode: stadalone?

breautek commented 3 years ago

I'm not really sure if I'm understanding your issue correctly. You don't need to force the webview to do anything, you just simply need to use the CSS.

Cordova doesn't force specific settings that is controllable by CSS because obviously that will take away control from the app developer.

So how are you setting the display-mode css rule?

I'm not sure what the pixel resolution value of iOS devices on top of my head, but is it possible that it doesn't fit the media query @media (max-width: 550px) and (display-mode:standalone)?

dpogue commented 3 years ago

As far as I know, there's no way for an app (or Cordova for that matter) to force WebKit to set the display-mode for CSS media queries 😞

nesbtesh commented 3 years ago

Is there a way at least to remove the empty space below and above the app

Screen Shot 2021-02-25 at 10 02 52 AM
nesbtesh commented 3 years ago

@breautek @dpogue let me know what you think

breautek commented 3 years ago

The spacing is safe area insets. Apple has a webkit blog that explains how to manipulate your content around safe areas:

https://webkit.org/blog/7929/designing-websites-for-iphone-x/