Bug
On the iPhone Duo, unfolded, with Vault locked, the vault door on the lock screen isn't centred on the display. The unfolded screen's safe area is wider on one side than the other, and the door is centred in the safe area, not on the screen, so it sits off to one side. The lock screen is a full-screen moment, so the door should sit in the true horizontal centre of the display, whatever the safe areas.
Cause
AppLockBackdrop (Vault/Sources/VaultiOS/Views/AppLock/AppLockBackdrop.swift) lays the door out in a GeometryReader that respects the safe area. The door and the details are in a VStack with .frame(maxWidth: .infinity), so they centre in the safe area's width. Only the background ignores the safe area.
The same backdrop is used by:
- the lock screen (
AppLockView);
- the privacy cover (
AppPrivacyCoverView);
- the screen-capture cover (
AppScreenCaptureCoverView).
So all three are off-centre in the same way. That at least means they still swap without the door moving.
Change
- The door: centre it horizontally on the full display, ignoring the leading and trailing safe-area insets. Do it in
AppLockBackdrop, so the lock screen and both covers stay in the same place and still swap without the door moving.
- Its height is unchanged: the door's centre stays a third of the way down the safe area. Every iPhone's top and bottom insets differ (the Dynamic Island against the home indicator), so measuring from the full screen would move the door on every device. That's a separate design choice, if it's ever wanted.
- The details and action: "Vault Locked", the message, and the password field and Unlock button stay readable and tappable. They're centred under the door where that fits, but never under a camera housing or rounded corner. Keep them inside the safe area, or inset them from the unsafe edge, whichever looks right on the unfolded screen.
- Other devices are unchanged: any device whose safe area is symmetric left to right, which is every current iPhone in portrait and landscape, and the iPad, should look exactly as it does now.
Done when
- On the iPhone Duo, unfolded, the door's centre is the screen's horizontal centre, on the lock screen and both covers.
- A snapshot or layout test with unequal leading and trailing safe-area insets shows the door centred on the full width. Existing snapshots of symmetric devices don't change.
- The text and controls never sit under the camera housing.