From a6433d9e95bfcdef0e4823df06fcb9a07aff2ae6 Mon Sep 17 00:00:00 2001 From: joywayer Date: Mon, 22 Jun 2026 03:59:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8=E5=9B=BE?= =?UTF-8?q?=E6=96=B9=E5=90=91=EF=BC=9AInfo.plist=20=E8=A1=A5=E9=A1=B6?= =?UTF-8?q?=E5=B1=82=20UISupportedInterfaceOrientations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xcode 26 General → Deployment Info UI 只把 orientation 写入带后缀的 INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone / _iPad,**没有** 顶层无后缀的 UISupportedInterfaceOrientations。LaunchScreen 阶段 iOS 处于 device idiom 尚未识别的早期窗口,只看顶层无后缀 key —— 缺失时 fallback 到 portrait 渲染再被旋转 90° 适配横屏设备,视觉表现是 splash 内容横躺 在中间一个竖向矩形里。 修复:在 Info.plist 显式补一份无后缀 UISupportedInterfaceOrientations = landscape。Build 后 .app 内 Info.plist 三个 key(无后缀 + ~iphone + ~ipad)齐全,LaunchScreen 正确按 landscape 渲染。 参考:原 daoqi/msext 用的也是顶层无后缀 key(iOS 9 时代写法)+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME 自动旋转 portrait 资源;新项目 LaunchScreen.storyboard 没有自动旋转魔法,必须显式补 key。 注:开发期间改 Info.plist orientation 后 Xcode 覆盖安装不会刷 iOS launch snapshot 缓存,需长按删除 app 重装才能看到新效果;终端用户 不受影响(IPA 首次安装即按当前 Info.plist 渲染)。 Co-Authored-By: Claude Opus 4.7 --- ylgamehall/Info.plist | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ylgamehall/Info.plist b/ylgamehall/Info.plist index 57ae4e7..2d45cf7 100644 --- a/ylgamehall/Info.plist +++ b/ylgamehall/Info.plist @@ -34,5 +34,18 @@ UIViewControllerBasedStatusBarAppearance + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight +