Skip to content

feat(ios): choose remote session orientation - #153

Open
Dlouxgit wants to merge 1 commit into
sqlpxc:mainfrom
Dlouxgit:feature/ios-session-orientation
Open

Dlouxgit wants to merge 1 commit into
sqlpxc:mainfrom
Dlouxgit:feature/ios-session-orientation

Conversation

@Dlouxgit

@Dlouxgit Dlouxgit commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

English

Why

The iPhone currently switches to landscape when a remote desktop session opens. When holding the phone upright, this forces a rotation every time. Let users choose the orientation used when a session opens.

Changes

  • Add an iPhone-only Screen orientation after connecting setting with Portrait and Landscape. Landscape remains the default for desktop sessions.
  • Apply the saved choice when the session view opens. The existing Rotate action still overrides it for the current session.
  • Keep iPad rotation unchanged and load existing settings with the new default.

Verification

  • Swift syntax check and git diff --check pass.
  • XcodeGen project generation passes.
  • A full simulator build on Xcode 16.2 is blocked by existing code: allowBluetoothHFP is unavailable in that SDK; after a temporary local substitution, VideoDecoder.swift hits a compiler type-check timeout. The temporary simulator edit was restored and is not part of this PR. A locally signed test build was installed on an iPhone 15 Pro, and the user confirmed the orientation choice works. The test build used local Xcode 16.2 compatibility changes that are not included in this PR.

中文

为什么需要

现在 iPhone 连接电脑后会自动切成横屏。竖着拿手机时,每次都要手动旋转。增加一个默认方向设置,让用户按自己的使用习惯选择连接后显示横屏还是竖屏。

改动

  • 仅在 iPhone 的“设置 → 远程控制”中增加“连接后的屏幕方向”,可选“竖屏”或“横屏”;默认横屏。
  • 打开远控会话时应用设置;原有“旋转画面”仍可临时覆盖当前会话。
  • iPad 的旋转行为不变,旧设置文件可以正常读取。改动集中在设置和现有的方向控制逻辑,范围很小。

验证

  • Swift 语法检查、git diff --check 和 XcodeGen 工程生成均通过。
  • 本机 Xcode 16.2 的完整模拟器构建受现有代码阻塞:SDK 中没有 allowBluetoothHFP;临时替换该调用后,VideoDecoder.swift 又出现编译器类型检查超时。模拟器临时替换已还原,不在本 PR 中。已在 iPhone 15 Pro 安装本地签名测试版,用户确认方向选择效果正常。测试版为适配本机 Xcode 16.2 使用了仅限本地的编译兼容改动,均不在本 PR 中。

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