ios 缺少必需的图标文件。该捆绑包不包含精确“57x57”像素的 iPhone/iPod Touch 应用程序图标

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21173439/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:08:49  来源:igfitidea点击:

Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '57x57' pixels

iosuploadiconsapp-storepackage

提问by Endre Olah

I was trying to update my app in Appstore and I have started to receive this failure message. I checked over the internet for any solution, but none of them work. I have not changed my icons so this failure should not appear at all.

我试图在 Appstore 中更新我的应用程序,但我开始收到此失败消息。我在互联网上检查了任何解决方案,但没有一个有效。我没有更改我的图标,因此根本不应该出现此故障。

I have checked the plist file, but always the same issue. The bundle is theoretically missing two icons 57x57 and 72x72 sizes.

我已经检查了 plist 文件,但总是同样的问题。该捆绑包理论上缺少两个 57x57 和 72x72 尺寸的图标。

Renamed icons and setup the whole icons package in the project, still the same issue.

重命名图标并在项目中设置整个图标包,仍然是同样的问题。

回答by Mischinab

I ran into this same problem using xCode 5 - all the icons are there and appear correctly on the corresponding devices, but the validation fails. After some experimentation, I found that the following steps will resolve the common causes:

我使用 xCode 5 遇到了同样的问题 - 所有图标都在那里并且在相应的设备上正确显示,但验证失败。经过一些实验,我发现以下步骤将解决常见原因:

1) Ensure the correct filenames are used

1) 确保使用正确的文件名

The legacy icons need to follow a specific naming scheme (for apps supporting iOS 6.x and lower):

旧图标需要遵循特定的命名方案(适用于支持 iOS 6.x 及更低版本的应用程序):

 57 x  57 --> Icon.png        (iPhone)
114 x 114 --> [email protected]     (iPhone Retina)
 72 x  72 --> Icon-72.png     (iPad)
144 x 144 --> [email protected]  (iPad Retina)

Note that iPad icons are called Icon-72. Icon~iPad, which worked in the past, doesn't work any more (at least, not for me - it generates the same error that you reported).

请注意,iPad 图标称为Icon-72Icon~iPad,在过去有效,不再有效(至少,对我来说不是 - 它会产生与您报告的相同的错误)。

The naming scheme for icons needed in iOS 7 and later is:

iOS 7 及更高版本所需的图标命名方案是:

120 x 120 --> [email protected]  (iPhone Retina)
 76 x  76 --> Icon-76.png     (iPad)
152 x 152 --> [email protected]  (iPad Retina)

The easiest way to update the names is to click on them in the file browser in xCode and rename them directly there.

更新名称的最简单方法是在 xCode 的文件浏览器中单击它们并直接在那里重命名。

Source of filenames:https://developer.apple.com/library/ios/qa/qa1686/_index.html

文件名来源:https : //developer.apple.com/library/ios/qa/qa1686/_index.html

2) Check that the Project file has detected all the icons

2) 检查项目文件是否已检测到所有图标

Click on your project file in xCode, and make sure the App Icons section has picked up each of the files. If not, manually select them. If you cannot select the icon file, it's likely that the dimensions aren't correct. You can check this by selecting the file in Finder, and pressing CMD-I to Get Information, and look at the dimensions under More Information.

在 xCode 中单击您的项目文件,并确保 App Icons 部分已选择每个文件。如果没有,请手动选择它们。如果无法选择图标文件,则可能是尺寸不正确。您可以通过在 Finder 中选择文件并按 CMD-I 获取信息来检查这一点,然后查看更多信息下的尺寸。

3) Make sure that the plist has the right info

3)确保plist有正确的信息

Click on your ProjectName-Info.plistfile, and check the array underCFBundleIcons~ipad/CFBundlePrimaryIcon/CFBundleIconFiles. It should contain 4 entries: Icon-72, Icon-72@2x, and the names of your iOS7 icons. If there are any extra entries (e.g. for the old icon filenames), remove them by pressing the - button. If they stay there, validation will fail when it's unable to find the corresponding files.

单击您的ProjectName-Info.plist文件,然后检查CFBundleIcons~ipad/CFBundlePrimaryIcon/CFBundleIconFiles. 它应该包含 4 个条目:Icon-72Icon-72@2x和 iOS7 图标的名称。如果有任何额外的条目(例如旧图标文件名),请按 - 按钮将其删除。如果他们留在那里,当无法找到相应的文件时,验证将失败。



After trying the above, you should be clear of the 3 common problems: incorrect filenames, missing files, and corrupted plist. Good luck!

尝试上述操作后,您应该清除了 3 个常见问题:文件名不正确、文件丢失和 plist 损坏。祝你好运!