Skip to content

feat: support Interface Layout switcher and iPhone Duo foldable geometry - #259

Open
Rengwang wants to merge 1 commit into
PlayCover:masterfrom
Rengwang:pr/feat-interface-layout-and-duo
Open

Rengwang wants to merge 1 commit into
PlayCover:masterfrom
Rengwang:pr/feat-interface-layout-and-duo

Conversation

@Rengwang

Copy link
Copy Markdown

Summary

  • Add layoutIdiom (0 = System Default, 1 = iPhone, 2 = iPad, 3 = iPhone Duo) in PlaySettings (defaulting to 0 for full backward compatibility), with backward-compatible AppSettingsData decoding and automatic phone/pad model mapping (effectiveDeviceModel / appSupportsPhone).
  • Override UIDevice / UITraitCollection userInterfaceIdiom and UIDevice.model / localizedModel based on layoutIdiom.
  • Add foldable wide-screen iPhone Duo (iPhone19,4) runtime geometry hooks in Resizable mode:
    • Resolve UIWindowScene.interfaceOrientation, UIApplication.statusBarOrientation, and UIWindowSceneGeometry.interfaceOrientation dynamically from window/scene aspect ratio.
    • Normalize _UIScreenFixedCoordinateSpace.bounds when a single Duo scene is active so fullscreen occupancy checks evaluate cleanly to 1.0.
    • Reflect right-edge safe area inset in unfolded Duo landscape (width > height, >= 600pt) and notify safeAreaInsetsDidChange().
    • Coalesce forced phone/Duo adaptive layout passes at end of live host window drag to avoid resize stutter.

Verification

  • Verified with swiftlint lint --strict --quiet (0 warnings/errors).
  • Built AKInterface (macosx) and PlayTools (iphoneos) in Release configuration via xcodebuild.

@Rengwang

Copy link
Copy Markdown
Author

Companion PlayCover UI/settings PR: PlayCover/PlayCover#2291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant