Xamarin更新后缺少Info.plist值(CFBundleIconName).我该如何解决?

Vit*_*ali 9 xcode app-store info-plist xamarin ios11

在我的Mac上更新我的Xamarin,xCode并尝试上传到App Store之后,我收到了来自Apple的这种电子邮件:

缺少Info.plist值 - 捆绑包'com.xxxx.yyyy'中缺少Info.plist键'CFBundleIconName'的值.使用iOS 11或更高版本SDK构建的应用必须在资产目录中提供应用图标,并且还必须为此Info.plist密钥提供值.有关详细信息,请参阅http://help.apple.com/xcode/mac/current/#/dev10510b1f7.一旦纠正了这些问题,您就可以重新更新已更正的二进制文件.

据我所知,我需要将我的图标转换为资产目录,但我不知道如何在Visual Studio 2015(Windows)中执行此操作?这是我的info.plist的一部分:

<key>CFBundleDisplayName</key>
<string>Name - Online</string>
<key>CFBundleIdentifier</key>
<string>com.xxxxx.xxxxxx</string>
<key>CFBundleVersion</key>
<string>3.4</string>
<key>CFBundleIconFiles</key>
<array>
    <string>Icon-72@2x.png</string>
    <string>Icon-72.png</string>
    <string>Icon@2x.png</string>
    <string>Icon.png</string>
    <string>Icon-60@2x.png</string>
    <string>Icon-76.png</string>
    <string>Icon-76@2x.png</string>
    <string>Default.png</string>
    <string>Default@2x.png</string>
    <string>Default-568h@2x.png</string>
    <string>Default-Landscape.png</string>
    <string>Default-Landscape@2x.png</string>
    <string>Default-Portrait.png</string>
    <string>Default-Portrait@2x.png</string>
    <string>Icon-Small-50@2x.png</string>
    <string>Icon-Small-50.png</string>
    <string>Icon-Small-40.png</string>
    <string>Icon-Small-40@2x.png</string>
    <string>Icon-Small.png</string>
</array>
<key>CFBundleShortVersionString</key>
<string>4.4</string>
Run Code Online (Sandbox Code Playgroud)

Mic*_* B. 10

我有完全相同的问题.基本上这有助于我解决问题:https://github.com/MobiVM/robovm/issues/210

  1. 右键单击info.plist,选择"打开方式..."并选择"iOS Manifest Editor".
  2. 转到Visual Assets选项卡,然后选择"使用资产目录"
  3. 保存后,转到解决方案资源管理器中的项目,您应该看到资产目录文件夹.打开它,然后双击Media.
  4. 转到AppIcons并为您正在构建的平台提供所有必需的图标.确保您还包含1024x1024像素的App Store图标.如果您遗漏任何所需内容,则会在将.ipa文件上传到iTunes Connect 时收到提醒.

  5. 再次编辑info.plist,但现在在XML编辑器中打开它.添加以下内容:

    <key>CFBundleIconName</key>

    <string>AppIcons</string>

  6. 注释掉CFBundleIconFiles数组.在我的情况下它是:

    <!--key>CFBundleIconFiles</key> <array> <string>Icon@2x.png</string> <string>Icon.png</string> <string>Icon-60@2x.png</string> <string>Icon-Small@2x.png</string> <string>Icon-Small.png</string> <string>Icon-Small-40@2x.png</string> </array-->

之后,您应该能够上传到Apple商店.

  • 此外,Media.xcassets文件夹必须位于Resources文件夹中.如果没有,请打开资源管理器并移动它.然后编辑.csproj文件并更新引用Media.xcassets的所有路径.每次在Media.xcassets中添加另一个目录时,都必须手动将其移动到Resources. (3认同)

小智 5

如果有人在升级到 16.10 Visual Studio 后在这里,资产目录发布在某些项目上会被选择性地破坏。如果您使用的是苹果商店,请不要执行上述修复,因为您必须提交资产目录。我卸载了 Visual Studio 2019 并返回到旧版本(随机选择的 16.8.6),一切都开始完美运行,并显示有意义的警告消息,我在浪费的沮丧日子里没有看到过。如果您使用的是 adhoc,那么上述方法可以工作,但我建议降级版本并等待,直到他们暂停 Maui 足够长的时间,以使 Xamarin 再次成为可行的产品。距离我可以通过 Visual Studio 发布似乎已经过去了 6 个月……现在,在降级之前我什至无法从我的 Mac 上推送 IPA。