简体   繁体   English

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

[英]Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels

My recent App Store upload gave me this error:我最近的 App Store 上传给了我这个错误:

iTunes Store operation failed.
Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 7.0.

I've added a 120 pixel icon file with the names "Icon-120.png" and "Icon-60@2x.png" and checked it's being added in the Build Phases > Copy Bundle Resources but I am still getting the same error.我添加了一个名为“Icon-120.png”和“Icon-60@2x.png”的 120 像素图标文件,并检查它是否被添加到构建阶段 > 复制捆绑资源中,但我仍然遇到相同的错误.

Any suggestion what else I can try to solve this?有什么建议我还能尝试解决这个问题吗?

If it helps I've been working my way through this very lengthy SO answer: 'Missing recommended icon file - The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format' but yet to get to the bottom of this.如果它有帮助,我一直在努力解决这个非常冗长的 SO 答案: “缺少推荐的图标文件 - 该捆绑包不包含 .png 格式的 iPhone/iPod Touch 的应用程序图标,该图标完全为 120x120”像素,但还没有深入了解这一点。

Also, I've done a Build > Clean and restarted Xcode.另外,我已经完成了 Build > Clean 并重新启动了 Xcode。

==== ====

$ file Icon-120.png 
Icon-120.png: PNG image data, 120 x 120, 8-bit/color RGBA, non-interlaced
$ file Icon-60\@2x.png 
Icon-60@2x.png: PNG image data, 120 x 120, 8-bit/color RGBA, non-interlaced

For Xcode 9 on High Sierra try this:对于 High Sierra 上的 Xcode 9,试试这个:

  1. Go to Menu Product > Archive, right click on your new build > Show in Finder.转到菜单产品 > 存档,右键单击您的新版本 > 在 Finder 中显示。

  2. Open Terminal and change to Archive: (type cd + space, drag your new build *.xcarchive打开终端并更改为存档:(键入 cd + space,拖动您的新构建 *.xcarchive

     cd /Users/[user]/Library/Developer/Xcode/Archives/[XXX].xcarchive
  3. Using @stubyte's code:使用@stubyte 的代码:

     find Products/ -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323
  4. Go back to Xcode > Windows > Organizer > Upload to App Store...返回 Xcode > Windows > Organizer > Upload to App Store...

Fixed:固定的:

ERROR ITMS-90022: "Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0."错误 ITMS-90022:“缺少必需的图标文件。该捆绑包不包含适用于 iPhone/iPod Touch 的应用程序图标,其像素正好为 '120x120',适用于 iOS 版本 >= 10.0 的 .png 格式。”

ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad of exactly '167x167' pixels, in .png format for iOS versions supporting iPad Pro."错误 ITMS-90023:“缺少必需的图标文件。该捆绑包不包含适用于 iPad 的应用程序图标,该图标完全为 167x167 像素,适用于支持 iPad Pro 的 iOS 版本的 .png 格式。”

ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 10.0."错误 ITMS-90023:“缺少所需的图标文件。该捆绑包不包含适用于 iPad 的应用程序图标,该图标完全为 152x152 像素,适用于 iOS 版本 >= 10.0 的 .png 格式。”

Still warning仍然警告

WARNING ITMS-90704: "Missing Marketing Icon. iOS Apps must include a 1024x1024px Marketing Icon in PNG format. Apps that do not include the Marketing Icon cannot be submitted for App Review or Beta App Review."警告 ITMS-90704:“缺少营销图标。iOS 应用程序必须包含一个 1024x1024 像素的 PNG 格式营销图标。不包含营销图标的应用程序无法提交应用程序审核或 Beta 版应用程序审核。”

This temporary solution is working for me.这个临时解决方案对我有用。

If you use xcode 9, maybe try this.如果您使用 xcode 9,不妨试试这个。 Find xcarchive file, execute this command.找到xcarchive文件,执行这个命令。

find Products/ -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323

Visit developer site stubyte`s answer.访问开发者网站stubyte 的回答。

Since you mentioned the icon filename is not in the Info.plist you'll want to add:由于您提到图标文件名不在Info.plist您需要添加:

<key>CFBundleIconFiles</key>
<array>
    <string>Icon-120.png</string>
</array>

It appears to be required now in order to associate the icon(s) with your app.现在似乎需要将图标与您的应用程序相关联。

在“ General ”视图中的“ App Icons and Launch Images ”部分,确保“ Apps Icons Source ”与“ Images.xcassets ”文件相关联。

In my case, for some reason the AppIcon asset was not part of the app target.就我而言,由于某种原因 AppIcon 资产不是应用程序目标的一部分。 Checking this checkbox solved the problem:选中此复选框解决了问题:

在此处输入图片说明

Another Simple Fix once discovered:曾经发现的另一个简单修复:

I had a similar issue with XCode 9.0, a project that worked perfectly well under XCode 8 and iOS 10 suddenly loses it's icons (only on iPads) when I upgraded the solution.我在 XCode 9.0 上遇到了类似的问题,当我升级解决方案时,一个在 XCode 8 和 iOS 10 下运行良好的项目突然丢失了它的图标(仅在 iPad 上)。

Tore my hair out, did the sRGB thing, did the Transparency thing.撕掉我的头发,做了 sRGB 的事情,做了透明的事情。

Turns out I still had the following empty entry in my targets info.plist file结果我的目标 info.plist 文件中仍然有以下空条目

CFBundleIcons~ipad CFBundleIcons~ipad

I'd long ago moved to specifying this in the target build settings.我很久以前就开始在目标构建设置中指定它。

The solution was to simply remove this entry from the info.plist file (clicked the helpful little "-" button. Rebuilt and tested and everything was perfect once more.解决方案是简单地从 info.plist 文件中删除此条目(单击有用的小“-”按钮。重新构建和测试,一切再次完美。

If you are using an images.xcassets file, be sure it is included in the Build Phases > Copy Bundle Resources list.如果您使用的是images.xcassets文件,请确保它包含在 Build Phases > Copy Bundle Resources 列表中。 I inherited a project that did not use this, migrated to use this file for App Icon, but did not add it to the Copy Bundle Resources list.我继承了一个没有使用这个的项目,迁移到App Icon使用这个文件,但是没有将它添加到Copy Bundle Resources列表中。 Now, you would expect a better error message, but this fixed the problem.现在,您希望得到更好的错误消息,但这解决了问题。 (So did editing the plist file as per Sahil above citing stubyte.) (根据上面引用 stubyte 的 Sahil 编辑 plist 文件也是如此。)

Just had same problem.刚刚有同样的问题。 Using Xcode 8.3.3 and wanted to use AppIcon in Assests catalogue.使用 Xcode 8.3.3 并想在资产目录中使用 AppIcon。 Tried all sorts of Stack Overflow answers without success.尝试了各种 Stack Overflow 的答案,但没有成功。

Finally learned about a deep clean step from Ken/Apple Forum:终于从 Ken/Apple 论坛了解到了一个深度清理步骤:

  • removed all icon files, whether from resources (delete - trash) or appicon file (select - remove selected items);删除所有图标文件,无论是从资源(删除 - 垃圾箱)还是 appicon 文件(选择 - 删除所选项目); removed even assets folder删除偶数资产文件夹
  • deep cleaned (Use the Product menu w/option key pressed, then choose to 'clean build folder')深度清理(使用带有选项键的产品菜单,然后选择“清理构建文件夹”)
  • added a new asset catalogue and called it "Assets" right clicked in Assets folder and added new app icon set - changed that one in inspector to be for iOS >=7添加了一个新的资产目录并将其命名为“资产”,在资产文件夹中右键单击并添加新的应用程序图标集 - 在检查器中将其更改为 iOS >=7
  • triple checked all my icon files OUTSIDE of Xcode (all were already png files of right resolution, but some had still colour profile attached from photoshop elements or did have indexed colour instead of RGB profile. so I made sure I only save a png file without colour profile and from a background layer) - not sure that was necessary三重检查了我在 Xcode 之外的所有图标文件(所有的图标文件都已经是正确分辨率的 png 文件,但有些仍然从 photoshop 元素附加了颜色配置文件,或者确实有索引颜色而不是 RGB 配置文件。所以我确保我只保存一个没有颜色配置文件和背景层) - 不确定这是必要的
  • archived the build from Product menu从产品菜单归档构建
  • validated and uploaded the build from Window - Organizer从 Window - Organizer 验证并上传构建

If you have added all icons files to the "images.xcassets", it could be possible that you have forgotten check the "Target Membership" in the right panel of Xcode.如果您已将所有图标文件添加到“images.xcassets”,您可能忘记检查 Xcode 右侧面板中的“Target Membership”。

You will can to clean your project, archive it and send it to iTunesConnect.您可以清理您的项目,将其存档并将其发送到 iTunesConnect。

I was able to resolve the issue by copying the below-given code in PodFile.我能够通过在 PodFile 中复制下面给出的代码来解决这个问题。

post_install do |installer|
  copy_pods_resources_path = "Pods/Target Support Files/Pods-PROJECT_NAME/Pods-PROJECT_NAME-resources.sh"
  string_to_replace = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"'
  assets_compile_with_app_icon_arguments = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"'
  text = File.read(copy_pods_resources_path)
  new_contents = text.gsub(string_to_replace, assets_compile_with_app_icon_arguments)
  File.open(copy_pods_resources_path, "w") {|file| file.puts new_contents }
end

Let me know, if this works for you.如果这对你有用,请告诉我。

If you're like me:如果你和我一样:

  • Uninterested in hacks对黑客不感兴趣
  • Brand new to XCODE , just trying to get your React Native or Wrapper app to build and upload全新的 XCODE ,只是试图让你的 React Native 或 Wrapper 应用程序构建和上传
  • Running Xcode 9运行Xcode 9
  • Didn't declare icons locally properly没有在本地正确声明图标

You may have made my mistake and you're not actually having the problems that others here are having.您可能犯了我的错误,而您实际上并没有遇到这里其他人遇到的问题。 You just need to put the icons in the project!您只需要将图标放入项目中即可!

My simple solution:我的简单解决方案:

  • Create a 80x80 icon named Icon-40@2x.png创建一个名为 Icon-40@2x.png 的 80x80 图标
  • Create a 120x120 icon named Icon-60@2x.png创建一个名为 Icon-60@2x.png 的 120x120 图标
  • Create a 1024x1024 icon named Icon.png创建一个名为 Icon.png 的 1024x1024 图标
  • Open XCODE打开 XCODE
  • Navigate to Images.xcassets, which presents you with several places to drag icons to导航到 Images.xcassets,它会为您提供几个将图标拖动到的位置
  • Drag Icon-40@2x.png to Iphone Spotlight iOS 7, 40pt, x2 box将 Icon-40@2x.png 拖到 Iphone Spotlight iOS 7, 40pt, x2 box
  • Drag Icon-60@2x.png to Iphone App iOS 7, 60pt, x2 box将 Icon-60@2x.png 拖到 Iphone App iOS 7, 60pt, x2 box
  • Drag Icon.png to App Store 1024pt将 Icon.png 拖到 App Store 1024pt

Re-archive and retry upload... success!重新存档并重试上传...成功!

In my case, I've created new icons for the application using this site.就我而言,我使用此站点为应用程序创建了新图标。

This error happens because there is no icon of the size indicated in the error.发生此错误是因为没有错误中指示的大小的图标。 In my case it was icons of different sizes that did not exist.就我而言,它是不存在的不同大小的图标。

https://appicon.co/#app-icon https://appicon.co/#app-icon

We had an old legacy project from 2015 and Xcode 6. It was using an old cocoapods integration.我们有一个 2015 年的旧遗留项目和 Xcode 6。它使用的是旧的 cocoapods 集成。 None of the other proposed solutions worked so far.到目前为止,其他提出的解决方案都没有奏效。 After banging my head for a couple of hours I found the solution.在敲打我的头几个小时后,我找到了解决方案。 We just needed to update cocoapods and rerun pod install .我们只需要更新 cocoapods 并重新运行pod install In fact I deintegrated cocoapods and integrated it from scretch, but maybe a pod install would've been sufficient.事实上,我分解了 cocoapods 并从头开始集成它,但也许pod install一个pod install就足够了。

after wasting my almost 1 day and trying every possible solution available on the internet, but nothing worked.在浪费了我将近 1 天的时间并尝试了互联网上所有可能的解决方案之后,但没有任何效果。

Finally, I got the actual problem and the way to solve.最后,我得到了实际问题和解决方法。 Here we go.开始了。

The actual problem is that your image assets (Images.xcassets) are not linked with your target project.实际问题是您的图像资产 (Images.xcassets) 未与您的目标项目链接。 Now solution,现在解决方案,

  • Go to the Build Phases of your project.转到项目的构建阶段。
  • Add Copy Bundle Resources from the add icon on top if not already added.如果尚未添加,请从顶部的添加图标添加复制捆绑资源
  • Then inside that add Images.xcassets.然后在里面添加Images.xcassets。
  • That's it.. you are done.就是这样..你完成了。 Now, it should work fine.现在,它应该可以正常工作。

How I got the solution?我是如何得到解决方案的? Just compared the configurations of a newly created project with my current project.刚刚将新创建的项目的配置与我当前的项目进行了比较。 And voila.瞧。

确保 plist MinimumOSVersion > 6.0

TLDR : beware of special characters in your app's display name aka "Product Name". TLDR :当心您的应用程序的显示名称(又名“产品名称”)中的特殊字符。

My project is new (created fresh in Xcode 9 a month ago) and we had correctly-sized assets for all the image groups (app icon, settings, etc.) dragged into the xcassets file.我的项目是新的(一个月前在 Xcode 9 中新创建的),我们将所有图像组(应用程序图标、设置等)的大小正确的资产拖到 xcassets 文件中。 I was getting these errors about missing icons of exact sizes when uploading to App Store Connect API, both with fastlane as well as within Xcode.在使用fastlane和 Xcode 上传到 App Store Connect API 时,我收到了有关缺少精确大小图标的这些错误。 This was the first time uploading this particular app.这是第一次上传这个特定的应用程序。

I wasted a few very frustrating hours on this issue, and tried various things to no avail, that are mentioned online:我在这个问题上浪费了几个非常令人沮丧的时间,并尝试了网上提到的各种方法都无济于事:

  • cleaning all build folders清理所有构建文件夹
  • recreating the xcassets file, making sure it is in the correct build phase重新创建 xcassets 文件,确保它处于正确的构建阶段
  • naming the files the "old way" (eg, Icon-60@2x.png etc.) before dragging into the AppIcon inside the xcassets在将文件拖入 xcassets 内的 AppIcon 之前,以“旧方式”命名文件(例如, Icon-60@2x.png等)
  • verifying the project points at the right xcassets file for App Icon验证项目指向应用程序图标的正确 xcassets 文件
  • I could go on...我可以继续...

In the end, on a hunch, I tried to rename the app (that is, the "Product Name" in Xcode project's settings, which is shown on the user's home screen under the app icon) because ours contained a tilde ~ (our app is a retro themed game called SOMETH~1.app ).最后,凭直觉,我尝试重命名应用程序(即 Xcode 项目设置中的“产品名称”,显示在用户主屏幕上的应用程序图标下),因为我们的应用程序包含一个波浪号~ (我们的应用程序是一款复古主题游戏,名为SOMETH~1.app )。 Removing the tilde fixed my issue.删除波浪号解决了我的问题。 I became suspicious because the output files from the build are literally called what you put into the "Product Name" field, and so I could imagine that on the server side the path with tilde is being handled incorrectly.我开始怀疑,因为构建的输出文件字面上称为您放入“产品名称”字段的内容,因此我可以想象在服务器端,带有波浪号的路径处理不正确。 It never gave trouble in iOS Simulator or my device, but there you go!它从未在 iOS 模拟器或我的设备中出现问题,但是你去! FWIW I did submit a bug report, but have yet to hear back from Apple. FWIW 我确实提交了错误报告,但尚未收到 Apple 的回复。

Thought I'd post my experience in case somebody else out there runs into the same problem.我想我会发布我的经验,以防其他人遇到同样的问题。

I also faced the same problem, I created an app icon by this URL:我也遇到了同样的问题,我通过这个 URL 创建了一个应用程序图标:

https://appicon.co/ https://appicon.co/

for iPhone and iPad.适用于 iPhone 和 iPad。 It gives me a .zip file, I unzip it and move "AppIcon.appiconset" in my application's xcassets.它给了我一个 .zip 文件,我解压缩它并在我的应用程序的 xcassets 中移动“AppIcon.appiconset”。

Now clean the project and create a new archive and upload it to the AppStore and it worked,现在清理项目并创建一个新存档并将其上传到 AppStore 并且它起作用了,

Thanks谢谢

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误ITMS-9000:“缺少所需的图标文件。该捆绑软件不包含恰好为&#39;120x120&#39;像素的iPhone / iPod Touch的应用程序图标 - ERROR ITMS-9000:"Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels &#39;缺少推荐的图标文件 - 捆绑包不包含 .png 格式的 iPhone / iPod Touch 应用程序图标,像素正好是 120x120&#39; - 'Missing recommended icon file - The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format' 缺少推荐的图标文件。 该捆绑软件不包含用于iPhone / iPod Touch的“ .png”格式的“ 120x120”像素的应用图标 - Missing recommended icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format 该捆绑包不包含用于iPhone / iPod Touch的精确为“ 120x120”像素的应用程序图标 - The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels “缺少所需的图标文件。该捆绑包不包含尺寸为&#39;120x120&#39;像素的应用程序图标 - "Missing required icon file. The bundle does not contain an app icon of size '120x120' pixels 缺少必需的图标文件。 该捆绑软件不包含用于iPhone / iPod Touch的完全为&#39;1024x1024的应用程序图标 - Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '1024x1024 缺少必需的图标文件。 捆绑包不包含120x120。 使用资产目录 - Missing required icon file. Bundle does not contain 120x120. Using Asset Catalog 缺少必需的图标文件。 该捆绑包不包含 iPad 的应用程序图标,像素为“167x167”,在尝试上传应用程序时为 .png 格式 - Missing required icon file. The bundle does not contain an app icon for iPad of exactly '167x167' pixels, in .png format when trying to upload app 缺少所需的图标文件120 * 120 - Missing required Icon file 120*120 缺少必需的图标文件。 捆绑包不包含 - Missing required icon file. The bundle does not contain
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM