Xamarin carplay 支持的 ios 应用程序在启动时崩溃

问题描述 投票:0回答:1

我们的应用程序在 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 被禁用。

xamarin xamarin.forms xamarin.ios carplay
1个回答
0
投票

您的 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
键之外。

© www.soinside.com 2019 - 2024. All rights reserved.