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

馋奶兔 提交于 2019-12-04 03:06:52

For Xcode 9 on High Sierra try this:

  1. Go to Menu Product > Archive, right click on your new build > Show in Finder.
  2. Open Terminal and change to Archive: (type cd + space, drag your new build *.xcarchive

    cd /Users/[user]/Library/Developer/Xcode/Archives/[XXX].xcarchive

  3. Using @stubyte's code:

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

  4. Go back to 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."

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."

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."

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."

This temporary solution is working for me.

Huang Huang

If you use xcode 9, maybe try this. Find xcarchive file, execute this command.

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

Visit developer site stubyte`s answer.

Since you mentioned the icon filename is not in the Info.plist you'll want to add:

<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.

In the "General" view, inside the "App Icons and Launch Images" section, make sure that "Apps Icons Source" is linked with the "Images.xcassets" file.

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.

Tore my hair out, did the sRGB thing, did the Transparency thing.

Turns out I still had the following empty entry in my targets info.plist file

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.

If you are using an images.xcassets file, be sure it is included in the Build Phases > Copy Bundle Resources list. 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. 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.)

Emil Østergård Johansen

In my case, for some reason the AppIcon asset was not part of the app target. Checking this checkbox solved the problem:

Just had same problem. Using Xcode 8.3.3 and wanted to use AppIcon in Assests catalogue. Tried all sorts of Stack Overflow answers without success.

Finally learned about a deep clean step from Ken/Apple Forum:

  • removed all icon files, whether from resources (delete - trash) or appicon file (select - remove selected items); 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
  • 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
  • archived the build from Product menu
  • validated and uploaded the build from 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.

You will can to clean your project, archive it and send it to iTunesConnect.

I was able to resolve the issue by copying the below-given code in 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
  • Running 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
  • Create a 120x120 icon named Icon-60@2x.png
  • Create a 1024x1024 icon named Icon.png
  • Open XCODE
  • Navigate to Images.xcassets, which presents you with several places to drag icons to
  • Drag Icon-40@2x.png to Iphone Spotlight iOS 7, 40pt, x2 box
  • Drag Icon-60@2x.png to Iphone App iOS 7, 60pt, x2 box
  • Drag Icon.png to 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

We had an old legacy project from 2015 and Xcode 6. It was using an old cocoapods integration. 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. In fact I deintegrated cocoapods and integrated it from scretch, but maybe a pod install would've been sufficient.

after wasting my almost 1 day and trying every possible solution available on the internet, but nothing worked.

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. 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.
  • 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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!