[英]Invalid Image Path - No image found at the path referenced under key “CFBundleIconFile”: Icon.png
I got this error from Application Loader when uploading my app to App Store. 将应用程序上传到App Store时,我从Application Loader收到此错误。 My app was developed at the time of iOS 3.0, and still targets at iOS 4.3 and above. 我的应用程序是在iOS 3.0时开发的,目标仍然是iOS 4.3及更高版本。 I recently updated the app to make it iOS7-compatible. 我最近更新了应用程序以使其与iOS7兼容。 But the Application Loader always returned this type of error to me. 但Application Loader总是向我返回这种类型的错误。 I searched the Internet and found that I am not alone. 我搜索了互联网,发现我并不孤单。 So I created this post and hopefully what I found out about the app icons can help other people. 所以我创建了这篇文章,希望我发现有关应用程序图标的内容可以帮助其他人。
Sounds like you may, like me, have accepted the suggestion by XCode 5.0 to migrate your icon files to a catalog. 听起来你可能像我一样接受了XCode 5.0的建议,将你的图标文件迁移到目录。
When you do that, you need to remove the CFBundleIconFile ("Icon file") parameter from your project's .plist file. 执行此操作时,需要从项目的.plist文件中删除 CFBundleIconFile(“Icon file”)参数。 That's the old way of doing this, and once you've migrated your icon files, obviously that parameter is incorrect. 这是执行此操作的旧方法,一旦您迁移了图标文件,显然该参数不正确。
Strange that XCode's migration doesn't fix this for you automatically. 奇怪的是,XCode的迁移并不能自动解决这个问题。 Would have been so very Apple to help you out there. 本来非常Apple会帮助你。
If your app supports iOS 5.0 and up, moving all icon files to the Asset Catalog will work. 如果您的应用支持iOS 5.0及更高版本,则将所有图标文件移动到资产目录都可以。
If your app still needs to support lower versions of iOS (like mine), the solution is to use the CFBundleIconFiles key in the project plist file. 如果您的应用仍然需要支持较低版本的iOS(如我的),解决方案是使用项目plist文件中的CFBundleIconFiles键。 In my case, my app is an iPhone-only app, so I did the following: 在我的情况下,我的应用程序是一个仅限iPhone的应用程序,所以我做了以下内容:
After these steps, you should not have any problems with the icons when uploading your app to the App Store. 完成这些步骤后,将应用程序上传到App Store时,图标应该没有任何问题。
The Asset Catalog simplies some of the above steps, eg, generating low resolution icon files (my guess). 资产目录简化了上述一些步骤,例如,生成低分辨率图标文件(我的猜测)。
I got the above info from "iOS Human Interface Guidelines", "iOS app programming guide" and "information property list reference". 我从“iOS人机界面指南”,“iOS应用程序编程指南”和“信息属性列表参考”中获得了上述信息。 Search for "app icons" and everthing is explained. 搜索“app icons”并解释everthing。
My solution was: in 'build phases', under 'copy bundle resources', click '+' and choose all your icons. 我的解决方案是:在“构建阶段”中,在“复制捆绑资源”下,单击“+”并选择所有图标。
good luck. 祝好运。
Your recipe work's perfectly. 你的食谱完美无缺。
For my part, 对我来说,
I've select NameOfMyApp-info.plist in the Supporting Files. 我在支持文件中选择了NameOfMyApp-info.plist。
I've only have to open the Key: Icon files. 我只需要打开Key:Icon文件。
I've just deleted all the string of image. 我刚刚删除了所有的图像串。 (The error message in the Submit was exactly about those images. (提交中的错误消息与这些图像完全相同。
I've try submiting again and : Submit Successful. 我尝试再次提交并提交成功。
Thank's 谢谢
None of the above solutions worked in my particular instance. 以上解决方案都没有在我的特定实例中起作用。
In the end the following did work so in case anyone else has the same problem: 最后,以下内容确实有效,以防其他人遇到同样的问题:
I basically went into the info.plist and removed the icons that I didn't need. 我基本上进入了info.plist并删除了我不需要的图标。 I started out with the Cocos2d template and didn't need most of them, so I deleted them all. 我开始使用Cocos2d模板并且不需要大部分模板,因此我将它们全部删除了。 When I archived the program and went to validate it, it gave errors such as "where is this icon and that icon?" 当我存档该程序并进行验证时,它会出现错误,例如“此图标和该图标在哪里?” Well, I deleted them all. 好吧,我把它们全部删除了。 But in the info.plist all 13 icons were still listed, so I just removed all the ones I deleted. 但是在info.plist中仍然列出了所有13个图标,所以我删除了我删除的所有图标。
In order for me to fix this issue I had to add again one icon image. 为了让我解决这个问题,我不得不再添加一个图标图像。
The error mentioned 'CFBundleIcons':AppIcon40x40 file and when I checked the Images.xcassets
under the AppIcon
image set the image the Iphone Spotlight IOS 7-9 40pt was in fact with the wrong resolution so I dragged again from Finder the icon with 80x80 resolution (40x40 multiplied by the scale factor 2x). 提到的错误“CFBundleIcons”:AppIcon40x40文件,当我检查了Images.xcassets
下AppIcon
图像设置图像的iPhone聚光灯IOS 7-9 40pt实际上与错误的分辨率,所以我从Finder中再次将图标拖动与80×80分辨率(40x40乘以比例因子2x)。
This error can have several causes as it seems. 这个错误可能有几个原因。 In my case, two Icon Files had the wrong pixel dimensions (generated by cordova). 在我的例子中,两个图标文件的像素尺寸错误(由cordova生成)。 So you might check that. 所以你可能会检查一下。
Found the same issue while building Cordova project. 在构建Cordova项目时发现了同样的问题。
Removing CFBundleIcon
with icon.png in info.plist
cleared the issue for me 在info.plist
删除带有icon.png的 CFBundleIcon
清除了我的问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.