我们的应用程序在 Carplay 集成后一启动就崩溃了。如果我直接安装(从 ipa)它就可以了。但如果我从 testflight 安装它就会崩溃。如果删除
<key>UIApplicationSceneManifest</key>
<dict>
<key>UISceneConfigurations</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>__ABC_DEFAULT_SCENE_CONFIGURATION__</string>
<key>UISceneDelegateClassName</key>
<string>DeviceSceneDelegate</string>
</dict>
</array>
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>CPTemplateApplicationScene</string>
<key>UISceneConfigurationName</key>
<string>ABC-Car</string>
<key>UISceneDelegateClassName</key>
<string>CarPlaySceneDelegateABC</string>
</dict>
</array>
</dict>
</dict>
<key>CFBundleName</key>
<string>ABC</string>
Info.plist 问题已解决,但 carplay 被禁用。
我尝试删除下面的代码,问题解决了,但 carplay 被禁用。
您的 Info.plist 中似乎有问题。 官方文档中关于iPadOS和macOS配置的示例代码为:
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>__MAUI_DEFAULT_SCENE_CONFIGURATION__</string>
<key>UISceneDelegateClassName</key>
<string>SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
您将
UIApplicationSupportsMultipleScenes
放错了位置。应该是在 UISceneConfigurations
键之外。