简体   繁体   English

图像路径无效 - 在“CFBundleIconFile”键下引用的路径中找不到图像:Icon.png

[英]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的应用程序,所以我做了以下内容:

  1. Prepare 8 icon files: two app icons for iOS6 and earlier (57x57 and 114x114), two icons for iOS7 (60x60 and 120x120), two icons for spotlight search/settings for iOS 6 and earlier (29x29 and 58x58), and two icons for spotlight (40x40 and 80x80). 准备8个图标文件:iOS6及更早版本的两个应用程序图标(57x57和114x114),iOS7的两个图标(60x60和120x120),iOS 6及更早版本(29x29和58x58)的聚光灯搜索/设置的两个图标,以及两个图标聚光灯(40x40和80x80)。 The files must be PNG files. 文件必须是PNG文件。 Name these files whatever you want, but the high-resolution file name must in the form of lowResolutionName@2x.png 根据需要为这些文件命名,但高分辨率文件名必须为lowResolutionName@2x.png
  2. In the project plist file, edit the CFBundleIconFiles key (which is an array) to include the names of the above icon files. 在项目plist文件中,编辑CFBundleIconFiles键(这是一个数组)以包含上述图标文件的名称。 Only the low resolution file names are needed, and the extension (.png) should not be included. 只需要低分辨率文件名,不应包含扩展名(.png)。 The Xcode will automatically find the high resolution files as long as their names follow the convention (with @2x). 只要名称符合约定(使用@ 2x),Xcode就会自动找到高分辨率文件。
  3. Make sure your project does not contain the Asset Catalog folder 确保您的项目不包含“资产目录”文件夹
  4. If you did the above things right, when you check the "General" section of the app target, you should see that Xcode has listed all the icon files in right place under the "app icons" section. 如果你做了以上的事情,当你检查应用程序目标的“常规”部分时,你应该看到Xcode已经在“应用程序图标”部分下面的正确位置列出了所有图标文件。
  5. If your app needs to support iOS 3.1 and earlier, you need to make four extra icon files. 如果您的应用需要支持iOS 3.1及更早版本,则需要制作四个额外的图标文件。 The size and the name of these files are as follows: Icon.png (57x57), Icon@2x.png (114x114), Icon-Small.png (29x29), Icon-Small@2x.png (58x58). 这些文件的大小和名称如下:Icon.png(57x57),Icon @ 2x.png(114x114),Icon-Small.png(29x29),Icon-Small @ 2x.png(58x58)。 The fixed names are required by iOS and cannot be changed. iOS需要固定名称,无法更改。 But as long as you name the icon files that way, you don't need to do any extra things. 但只要您以这种方式命名图标文件,就不需要做任何额外的事情。

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: 最后,以下内容确实有效,以防其他人遇到同样的问题:

  1. Remove the app-icon set that is causing the problem from the Asset Catalog 从资产目录中删除导致问题的应用程序图标集
  2. In target properties from the navigator pane remove and then readd the 'Using Asset Catalog' for app icons - this will recreate an empty app-icon set 在导航器窗格中的目标属性中删除然后读取应用程序图标的“使用资产目录” - 这将重新创建一个空的应用程序图标集
  3. Select your desired sizes and assign the correct images by dragging from the navigation pane 选择所需的尺寸,然后从导航窗格中拖动以指定正确的图像
  4. Delete CFBundleIconFiles keys (there is a second one for iPad) 删除CFBundleIconFiles键(iPad有第二个键)
  5. Rebuild archive 重建档案

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.xcassetsAppIcon图像设置图像的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.

相关问题 错误ITMS-90032:“无效的图像路径-在键'CFBundleIconFile':'icon.png'下引用的路径中找不到图像” - ERROR ITMS-90032: “Invalid Image Path - No image found at the path referenced under key 'CFBundleIconFile': 'icon.png'” 使用xcode 7将错误代码为msms-90032的cordova基本版本上传到应用商店,在密钥'CFBundleIconFile':'icon.png'下找不到图像 - uploading cordova base build to the appstore usning xcode 7 with Error itms-90032 no image found under key 'CFBundleIconFile': 'icon.png' 上传IPA,一个奇怪的问题:错误ITMS-90032:“无效的图像路径-在键'$ key':'$ path'下引用的路径中找不到图像 - Upload IPA, strange issue: ERROR ITMS-90032:“Invalid Image Path - No image found at the path referenced under key '$key': '$path' 错误 ITMS-90032:“无效的图像路径 - 在键“CFBundleIcons”下引用的路径中找不到图像:AppIcon40x40” - ERROR ITMS-90032:"Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons':AppIcon40x40" 如何修复错误 ITMS-90032:“无效的图像路径 - 在键 'CFBundleIcons' 下引用的路径中找不到图像:'AppIcon60x60'”? - How to fix ERROR ITMS-90032: “Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons': 'AppIcon60x60'”? iOS应用程序提交错误:ERROR ITMS-90032:“无效的图像路径 - 在关键字'CFBundleIcons'下引用的路径中找不到图像:'AppIcon29x29'” - iOS app submission error : ERROR ITMS-90032: “Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons': 'AppIcon29x29'” 图像路径无效 - 未找到图像 - Invalid Image Path - No image found 错误ITMS-9000:无效的图像路径-在“ CFBundleIcons” appicon-260x60下引用 - ERROR ITMS-9000: Invalid Image Path - referenced under 'CFBundleIcons' appicon-260x60 图像路径无效 - 在路径中找不到图像。 CFBundleIcons Xcode 5 - Invalid Image Path - No image found at the path. CFBundleIcons Xcode 5 ios验证:无效的图像路径-缺少图标文件 - ios validation: Invalid image path - missing icon file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM