14

My recent App Store upload gave me this error:

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.

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.

Also, I've done a Build > Clean and restarted 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
Community
  • 1
  • 1
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
  • Have you tried using an Asset catalog? If you fill all the slots you should be good. It may be that Xcode doesn't realize those png files are icons. Make sure the sizes and pixel density are correct too. – theMikeSwan May 12 '17 at 17:28
  • Please post the output of `$ file Icon-120.png` from Terminal. – l'L'l May 12 '17 at 17:45
  • done. see above... – Snowcrash May 12 '17 at 17:48
  • @theMikeSwan I did that earlier and ran into some problems. I thought I'd just try and simply add a single icon to see if I could fix the error rather than having to refactor the entire Icon system. – Snowcrash May 12 '17 at 17:52
  • The image specs seems fine; also check in your `.plist` if the name is capitalized (eg. `Icon-120.png` vs. `icon-120.png`), sometimes that'll do it. – l'L'l May 12 '17 at 17:52
  • @l'L'l none of the Icons are listed in the `.plist`. It all worked previously without having to specify them there. – Snowcrash May 12 '17 at 17:54
  • Usually I'll put in an array using `CFBundleIconFiles` with the icons. One other thing you can try is copying the file and naming it `AppIcon-120.png`... – l'L'l May 12 '17 at 18:09
  • `AppIcon-120.png` didn't work. – Snowcrash May 12 '17 at 18:22
  • 1
    Hall-a-bloody-lujah. Adding the icons to `CFBundleIconFiles` did the job. – Snowcrash May 12 '17 at 18:29
  • I (somewhat) solved this problem [here](https://stackoverflow.com/a/46495761/5721541) – Matthew Barker Sep 29 '17 at 19:40
  • i solved this problem by link:https://stackoverflow.com/a/47885406/4305700 – Henson Fang Dec 19 '17 at 11:23

17 Answers17

20

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.

Community
  • 1
  • 1
Matt Hudson
  • 7,329
  • 5
  • 49
  • 66
  • Your solution works but will it show app icon on ios 11 if I submit my app ? I am not able to see app icon when I run the app through xcode to any ios 11 Devices. However it shows on ios 10 devices. – Rahul Vyas Dec 07 '17 at 13:09
  • 1
    This failed for me when I used this to submit app apple sent same error in mail (120x120) missing also apple rejected binary. – Rahul Vyas Dec 07 '17 at 16:57
  • Thanks, this is the perfect detail answer. Just a update is we have to create ipa after step (for manual upload) Go back to Xcode > Windows > Organizer > Upload to App Store – Sagar Panwala Jan 02 '18 at 06:55
  • This worked for me but was while processing on app store it threw back the same error and the build was rejected. – Sanju Rao Feb 11 '19 at 18:41
  • Can you by chance explain why this fixes it? I saw this hours ago, but figured, man that's hackish. I tried literally EVERYTHING else. This is the only valid solution. – Barry Mar 13 '21 at 04:55
  • I honestly don't know ;). It's not really a hack, more like someone screwed up the migration from one version to another and this is the best fix without recreating the project. – Matt Hudson Mar 15 '21 at 14:19
11

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.

Sahil Kapoor
  • 11,183
  • 13
  • 64
  • 87
Huang Huang
  • 316
  • 4
  • 6
  • This failed for me when I used this to submit app apple sent same error in mail (120x120) missing also apple rejected binary – Rahul Vyas Dec 07 '17 at 16:57
4

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.

l'L'l
  • 44,951
  • 10
  • 95
  • 146
4

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.

Eran Talmor
  • 1,918
  • 1
  • 12
  • 6
  • I was becoming crazy trying to figure out why xcode 9 didn't see the 120x120, 76x76 and 152x152 icons that were in the Appicon folder. At last, it was playing with this select element (first it asked me to migrate I don't know what -I had to remove the elements created-, and selecting AppIcon when it appeared, at last) it worked. Eran, thanks a lot. – rcerecedar Jul 03 '18 at 18:23
3

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

enter image description here

Vega
  • 27,856
  • 27
  • 95
  • 103
  • 1
    Awesome! Worked for me. Sometimes this checkbox is disabled, then just need to add Images.xcassets inside Copy Bundle Resources under Build Phases. – Rajkumar Bansal Aug 29 '19 at 15:37
1

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.

John Guy
  • 441
  • 3
  • 8
1

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

Andrew Duncan
  • 3,553
  • 4
  • 28
  • 55
1

I also faced the same problem, I created an app icon by this URL:

https://appicon.co/

for iPhone and iPad. It gives me a .zip file, I unzip it and move "AppIcon.appiconset" in my application's xcassets.

Now clean the project and create a new archive and upload it to the AppStore and it worked,

Thanks

Chandni
  • 692
  • 1
  • 10
  • 25
0

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
Uwe
  • 65
  • 4
0

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.

0

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.

Rajan Balana
  • 3,775
  • 25
  • 42
0

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!

lance.dolan
  • 3,493
  • 27
  • 36
0

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

Community
  • 1
  • 1
FlipNovid
  • 1,191
  • 3
  • 12
  • 20
0

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.

cybergen
  • 3,108
  • 1
  • 22
  • 30
0

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.

Rajkumar Bansal
  • 323
  • 2
  • 10
0

Make sure plist MinimumOSVersion > 6.0

Brent
  • 1
0

TLDR: beware of special characters in your app's display name a.k.a. "Product Name".

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. 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. 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
  • naming the files the "old way" (e.g., Icon-60@2x.png etc.) before dragging into the AppIcon inside the xcassets
  • verifying the project points at the right xcassets file for App Icon
  • 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). 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! FWIW I did submit a bug report, but have yet to hear back from Apple.

Thought I'd post my experience in case somebody else out there runs into the same problem.

RogerTheDragon
  • 267
  • 1
  • 10