You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode存储数据报错:Info.plist无UIScene配置字典且找不到该文件

解决SceneConfiguration Info.plist错误的方案

定位Info.plist文件

  • Xcode项目中:在项目导航栏(View > Navigators > Show Project Navigator)的搜索框输入Info.plist,通常位于项目根目录或Supporting Files文件夹下。若仍找不到,查看项目Build Settings中的Info.plist File项,获取文件路径。
  • CocoaPods管理的项目:检查Pods/[目标名称]/Supporting Files目录,或通过Build Settings定位路径。

添加SceneConfiguration配置

找到文件后,添加对应配置:

  • 源码编辑模式:右键Info.plist选择Open As > Source Code,插入以下代码:
<key>UIApplicationSceneManifest</key>
<dict>
    <key>UISceneConfigurations</key>
    <dict>
        <key>UIWindowSceneSessionRoleApplication</key>
        <array>
            <dict>
                <key>UISceneConfigurationName</key>
                <string>(no name)</string>
                <key>UISceneDelegateClassName</key>
                <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
            </dict>
        </array>
    </dict>
</dict>
  • 可视化编辑模式:点击+添加Application Scene Manifest键,依次创建Scene Configurations、Application Session Role项,新增配置并设置Configuration Name为(no name),Delegate Class Name为项目的SceneDelegate类名(默认是SceneDelegate)。

替代方案(无SceneDelegate场景)

若项目未启用SceneDelegate(如旧版iOS项目),可在Build Settings中搜索UIApplicationSceneManifest,将其值设为NO,或移除SceneDelegate相关代码,改用AppDelegate管理窗口。

执行上述操作后重新编译运行,检查控制台是否仍输出该错误。

内容的提问来源于stack exchange,提问作者Dox

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 13:41:25