【问题标题】:Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons':'AppIcon20x20' [duplicate]无效的图像路径 - 在键“CFBundleIcons”下引用的路径中找不到图像:“AppIcon20x20”[重复]
【发布时间】:2017-04-24 09:17:39
【问题描述】:

重新发布,因为我没有得到任何答案。

我已经为这个问题苦苦挣扎了一个多星期。每当我最近尝试验证构建或使用应用程序加载器时,我都会收到此错误:

iTunes Store operation failed. 
Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons':'AppIcon20x20'

现在,问题是我的 plist 中没有 AppIcon20x20 键。

这是我的 AppIcon 资产和属性设置: AppIcon, Attributes

我的 Plist 中甚至都没有提到 20x20 的资源,从这里的源代码版本可以看出:

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>icon603x.png</string>
                <string>icon602x.png</string>
                <string>icon403x.png</string>
                <string>icon402x.png</string>
                <string>icon293x.png</string>
                <string>icon292x.png</string>
                <string>icon203x.png</string>
                <string>icon203x.png</string>
            </array>
        </dict>
    </dict>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>https://millsfitnessapparel.myshopify.com/</key>
            <string></string>
        </dict>
    </dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
</dict>
</plist>

最后,我用谷歌搜索了这个话题,他们都说只需将 CFBundleIcons 添加到您的 plist 中,我这样做了,但它仍然抛出错误。我也在这个项目的版本中做到了这一点,其中有 pod,没有 pod,工作区,常规 xcproj。文件,甚至有 1 个视图控制器和一些图标 [这个最新版本]。

我还尝试在 xcode 版本 8.1、8.2 和 8.3 中实现此构建,都收到相同的错误。

这里的任何帮助将不胜感激。这些是为客户提供的应用程序,由于这个问题,我目前延迟交付。谢谢。

【问题讨论】:

  • 我知道你已经得到了答案,但它是为了其他人来这里。如果您的应用图标名称不正确,您可能会遇到此问题。我使用的是 appicon.co,它生成了错误的名称,这就是我收到此错误的原因。然后我使用“Icon Set Creator”iMac 应用程序生成图标,使用后一切正常。

标签: ios swift xcode


【解决方案1】:

您可以使用https://makeappicon.com/ 简单地创建您的应用图标资产。您必须提供 1536x1536px 的图像以获得最佳效果。它会自动为您的项目创建所有应用程序图标

另外请参考以下内容:-

  • 检查图标文件的名称是否与 info.plist 中的名称完全相同。虽然在运行调试模式时很好,但在您上传/验证构建时它不起作用。

  • 请检查您应用的捆绑包标识符是否正确。

【讨论】:

  • 仍然无法解决这个问题。请发布您的应用图标的资产文件夹和 content.json 的屏幕截图
  • 我已经发布了截图,它在主信息中。
  • 这里是contents.json:{ "info" : { "version" : 1, "author" : "xcode" } }
  • 制作应用程序图标就是答案,它现在正在上传。谢谢!
  • 这实际上对我有用,使用 AppIcon.co 并没有真正帮助,感谢您的帮助
猜你喜欢
  • 1970-01-01
  • 2015-03-25
  • 2013-10-31
  • 1970-01-01
  • 2016-08-11
  • 2013-10-10
  • 2013-10-19
  • 2023-03-23
相关资源
最近更新 更多