Cordova app not displaying correctly on iPhone X (Simulator)
I tested my Cordova-based app yesterday on the iPhone X Simulator in Xcode 9.0 (9A235) and it didn't look good. Firstly, instead of filling the full screen area, there was a black area above and below the app content. And worse, between the app content and the black was two white bars.
Adding cordova-plugin-wkwebview-engine
so Cordova renders using WKWebView (not UIWebView) fixes the white bars.
By my app is not migrated from UIWebView to WKWebView due to performance and memory leak issues when using cordova-plugin-wkwebview-engine
which occur when loading images downloaded from Inapp Purchase hosted content into an HTML5 canvas (direct file://
access by the Webview is not possible due to security restrictions in WKWebView so the image data must be loaded via cordova-plugin-file
).
These screenshots show a test app with a blue background set on the <body
>.
Above and below UIWebView, you can see the white bars, but not with WKWebView:
(source: pbrd.co)
(source: pbrd.co)
Both Cordova Webviews exhibit the black areas when compared to a native app which fills the full screen area: