Hi everyone,
I’m experiencing a strange safe-area issue in my Ionic Angular + Cordova iOS application after testing on iOS 27.2.
I’m hoping someone has encountered something similar or can help me understand whether this is related to Cordova, UIKit, or WebKit.
Environment
- Ionic Angular
- Cordova iOS 6.2.0
- Landscape-only application
- Testing on physical iOS devices
- Xcode 27
- I would prefer not to upgrade Cordova iOS at this point.
The problem
The app works correctly on iOS 27.1, but on iOS 27.2, the landscape safe-area behavior appears to be different.
I’m seeing two main issues:
- The black safe-area spaces on the left and right sides are missing.
- The status bar area sometimes appears at the top and pushes the app content down. For example, the profile picture in my UI gets shifted downward.
I also tested on an iPhone 15, where the left and right black areas are missing, although the status bar appears normal.
This seems to happen on physical devices. I haven’t been able to reproduce the same behavior in the simulator.
Native debugging results
On the affected physical device, I logged the following:
- Interface Orientation: Landscape Right
- Physical Device Orientation: Portrait
- Native view size: 926 × 428 pt
- View controller safe-area insets:
- Left: 0
- Right: 0
- Top: 47
- Bottom: 34
- Window safe-area insets:
- Left: 0
- Right: 0
- Top: 47
- Bottom: 34
The WebView initially fills the entire native view.
What I find strange is that, in landscape orientation, I would expect the safe-area insets to be applied to the left and right sides, rather than the top and bottom.
What I’ve tried
-
Added black native UIView overlays on the left and right sides using the safe-area inset values. However, the horizontal inset values are zero, so this does not solve the issue.
-
Tried manually applying 80pt left and right margins to the WebView. This gives an expected WebView frame of:
- X: 80
- Width: 766
- Height: 428
However, the app content still overlaps the intended safe-area region. I’m not sure whether Cordova is resetting the WebView frame or whether the web content is still using the full viewport dimensions.
-
Added a custom native JavaScript event to report the WebView dimensions to the web application.
-
Experimented with
additionalSafeAreaInsetsto compensate for the top and bottom insets, but I haven’t confirmed that this correctly affects the WebView or CSS safe-area values.
Meta viewport configuration
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
I also have this Cordova preference:
<preference name="StatusBarOverlaysWebView" value="false" />
My questions
- Has anyone experienced changes in landscape safe-area behavior on iOS 27.2?
- Why would UIKit report top and bottom safe-area insets of 47pt and 34pt when the app is in landscape orientation?
- Is there a known issue with Cordova iOS 6.2.0 and the way
CDVViewControllerlays out its WKWebView on newer iOS versions? - Is there a reliable way to force the WebView to respect the correct left and right safe areas in landscape?
- Could this be a WebKit viewport issue rather than a native UIKit safe-area issue?
I’m trying to find a reliable fix without upgrading Cordova iOS, if possible.
Any suggestions, insights, or similar experiences would be greatly appreciated.
Thanks!