ios - 无效图像路径 - 在键 'CFBundleIcons' 下引用的路径中找不到图像 :'AppIcon20x20'

标签 ios swift xcode

<分区>

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

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

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

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

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

我的 Plist 中甚至没有提到 20x20 Assets ,正如此处的源代码版本所示:

    <?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 个 View Controller 和一些图标 [this latest build]。

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

如有任何帮助,我们将不胜感激。这些是面向客户的应用程序,由于这个问题,我目前延迟交付。谢谢。

最佳答案

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

另请引用以下内容:-

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

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

关于ios - 无效图像路径 - 在键 'CFBundleIcons' 下引用的路径中找不到图像 :'AppIcon20x20',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43584157/

相关文章:

iphone - 在现有屏幕上显示小 View /对话框的最佳方式?

ios - 将 UIImage 切割成圆形

iphone - iOS6 iPhone 5 屏幕底部没有可点击的内容

IOS/objective-C/Xcode : implicit conversion loses integer precision error with int

ios - 在 iPad 中以模式方式呈现不正确

ios - 如何从 UITextField 向 UITableView 添加多个数据? ( swift 4)

ios - 为什么我的手机说无法确定位置?

ios - 如何判断这款iPhone是否支持Game Center挑战?

swift - 访问多个类中的一个函数

json - 如何更改 JSON POST 请求以处理 HTTPS