Xcode 4.2 - App Loader:无法验证图标尺寸,找不到图标

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8370940/
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-09-14 22:39:41  来源:igfitidea点击:

Xcode 4.2 - App Loader: Unable to verify icon dimensions, no icon found

iphoneiosxcodexcode4xcode4.2

提问by Teofilo Israel Vizcaino Rodrig

I have never had this problems until I began to use Xcode 4.2. I'm getting the following error trying to upload my app:

在我开始使用 Xcode 4.2 之前,我从未遇到过这个问题。我在尝试上传我的应用程序时遇到以下错误:

Unable to verify icon dimensions, no icon found. Your minimum os version is below 3.2, so you must define CFBundleIconFile or provide a default Icon.png that is 57x57

无法验证图标尺寸,找不到图标。您的最低操作系统版本低于 3.2,因此您必须定义 CFBundleIconFile 或提供一个默认的 Icon.png 为 57x57

I have an "Icon.png" image and is 57x57. I tried add it and remove it from info.plist. No success. I don't know what to do.

我有一个“Icon.png”图像,尺寸为 57x57。我尝试添加它并从 info.plist 中删除它。没有成功。我不知道该怎么办。

enter image description here

在此处输入图片说明

Here is my info.plist file

这是我的 info.plist 文件

enter image description here

在此处输入图片说明

Info.plist edited again

Info.plist 再次编辑

enter image description here

在此处输入图片说明

SOLUTION

解决方案

Thanks for your comments. The problem was that I was not following the right steps to prepare the app for submission in Xcode 4. It's very different to Xcode 3.2. If you follow the steps of this guideyou will not have the issues I had.

感谢您的意见。问题是我没有按照正确的步骤准备应用程序以在 Xcode 4 中提交。它与 Xcode 3.2 非常不同。如果您按照本指南的步骤操作,您将不会遇到我遇到的问题。

采纳答案by Teofilo Israel Vizcaino Rodrig

To avoid more replies, I post the solution (solved myself)

为避免回复多,我贴出解决方案(自己解决)

The problem was that I was not following the correct step to prepare the app for submission in Xcode 4. It's very different to Xcode 3.2. If you follow the steps of [link]weston-fl.com/blog/?p=2442 this guide you will not have the issues I had.

问题是我没有按照正确的步骤准备应用程序以在 Xcode 4 中提交。它与 Xcode 3.2 非常不同。如果您按照 [link]weston-fl.com/blog/?p=2442 本指南的步骤操作,您将不会遇到我遇到的问题。

回答by chown

Make sure your Info.plist has these entries and that the file names match exactly (iOS 5 icons may not be necessary but it doesn't hurt to include them):

确保您的 Info.plist 具有这些条目并且文件名完全匹配(iOS 5 图标可能不是必需的,但包含它们也无妨):

enter image description here

在此处输入图片说明

Here are the pages that Apple talks about the Icon guidelines:

以下是 Apple 谈论图标指南的页面:

iOS HIG - Custom Icon and Image Creation Guidelines
Apple Technical Q&A QA1686 - App Icons on iPad and iPhone

iOS HIG - 自定义图标和图像创建指南
Apple 技术问答 QA1686 - iPad 和 iPhone 上的应用程序图标



This is the same thing as above but with the "Raw" key/value pairs:

这与上面的相同,但使用“原始”键/值对:

enter image description here

在此处输入图片说明

回答by RickJansen

The actual problem is that the specification of icon files in the Info.plist changed with iOS 5. Note that it says "Icon files (iOS 5)" in the Info.plist. If you specify a build target before 5.0 you will get the error messages mentioned, because specifying the icon files is different prior to 5.0! You can either change your build target to 5.0, or add icon specifications for older iOS. (That is actually what happened by adding the CFBundleIconFiles array to the Info.plist)

实际问题是 Info.plist 中图标文件的规范随 iOS 5 发生了变化。请注意,Info.plist 中显示“图标文件 (iOS 5)”。如果您在 5.0 之前指定构建目标,您将收到提到的错误消息,因为指定图标文件在 5.0 之前是不同的!您可以将构建目标更改为 5.0,或者为旧版 iOS 添加图标规范。(这实际上是通过将 CFBundleIconFiles 数组添加到 Info.plist 中发生的)

So, the problem is not in Xcode 3.2 versus Xcode 4.2, but in the iOS version you target with your App.

因此,问题不在于 Xcode 3.2 与 Xcode 4.2,而在于您的应用程序针对的 iOS 版本。

回答by Deepak Keswani

When I encountered this issue with my app submission, I tried my best to assure icon is 57x57 pixel & properly added but somehow validations always failed. Finally I removed the app icons from Project summary, Plist file & project Navigator. Renamed these files in finder and added again to the project. Somehow this worked for me.

当我在提交应用程序时遇到此问题时,我尽力确保图标为 57x57 像素并正确添加,但不知何故验证总是失败。最后,我从项目摘要、Plist 文件和项目导航器中删除了应用程序图标。在 finder 中重命名这些文件并再次添加到项目中。不知何故,这对我有用。

回答by Prashant09

I also faced same problem make sure that remove transparent pixel from icon i solved it

我也遇到了同样的问题,请确保从图标中删除透明像素我解决了它

回答by Oliver Leung

Wanna share my experience (This is really a frustrating problem). I am using XCode 4.6.3

想分享我的经验(这真的是一个令人沮丧的问题)。我正在使用 XCode 4.6.3

When I almost gave up after some long hours of trial-n-error, I did the followings:

经过长时间的试错后,当我几乎放弃时,我做了以下事情:

  1. Remove all icon files (the references) from my project.
  2. Remove the "Icon Files" entry in the info.plist
  3. Remove the App icons from the "Summary" tab of the project navigator (right-click on the icons and choose "Delete") for all the "Deployment" sections
  4. Make sure the icon file names are the same as specified at Apple's documentation("I"con.png, instead of "i"con.png)
  5. Clean the project.
  6. Drag-and-drop the icon files into the "Resources"->"images" group in the project. And check the box for "Copy items to the destination group's folder(if needed).
  7. Open the Project Navigator and make the App icons visible (which should be empty now)
  8. Drag-and-drop the icon files (one-by-one) from the project file list to the App icon space (not from Finder). There will be a warning appear saying that a file is exist and confirm replacing it. Confirm.
  9. After doing 8, you can check the "Info" tab (i.e. the info.plist) of project navigator. The "Icon Files" entry appeared.
  10. Build the project (for Archive) again.
  1. 从我的项目中删除所有图标文件(参考)。
  2. 删除 info.plist 中的“图标文件”条目
  3. 从项目导航器的“摘要”选项卡中删除所有“部署”部分的应用程序图标(右键单击图标并选择“删除”)
  4. 确保图标文件名与Apple 文档中指定的相同(“I”con.png,而不是“i”con.png)
  5. 清理项目。
  6. 将图标文件拖放到项目中的“资源”->“图像”组中。并选中“将项目复制到目标组的文件夹(如果需要)”框。
  7. 打开项目导航器并使应用程序图标可见(现在应该是空的)
  8. 将图标文件(一个一个)从项目文件列表拖放到 App 图标空间(不是来自 Finder)。会出现一个警告,说文件存在并确认替换它。确认。
  9. 做完8,就可以查看项目导航器的“Info”选项卡(即info.plist)。出现了“图标文件”条目。
  10. 再次构建项目(用于存档)。

I don't know which step above did the trick (that's why I tried to be very specific about each step, though some looks silly), but it works for me. Good Luck!

我不知道上面哪一步成功了(这就是为什么我试图对每一步都非常具体,尽管有些看起来很傻),但它对我有用。祝你好运!