Missing required icon file. The bundle does not contain - ios

This is the error message:
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 have this problem while submitting my app to the app store, I face this problem while validating my project and I tried all the answers here in stackoverflow but the error is same .

Open your project's General Preferences in Xcode, and make sure that your App Icons Source is the Asset Catalog named "AppIcon":
Then, in the project navigator, click Images.xcassets, click AppIcon, and then drag and drop your icons into the required places. If AppIcon is not shown, you'll have to right click and choose "New App Icon" and then select the proper icons from the inspector on the right:
Once you've done this, your icons should show up where they're supposed to.

Right click on AppIcon xcassets, then you can see new app Icon.
It will show you New App Icon, then it will show you all required icon, and you need to fill everything needed there and remove current one.

Please change your development target 6.0 to 7.0 in your xcode and start new archive its working successfully.

Just had same problem and post answer in case someone like me, stumbles over here. Using Xcode 8.3.3 and wanted to use AppIcon in Assets 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

I was facing this error while uploading app to AppStore
Missing required icon file - The bundle does not contain an app icon
for iPad of exactly ‘76x76’ pixels, in .png format for iOS versions >=
7.0.
Missing required icon file - The bundle does not contain an app icon
for iPad of exactly ‘152x152’ pixels, in .png format for iOS versions
= 7.0.
I solved it by adding this script at the end of Podfile
post_install do |installer|
copy_pods_resources_path = "Pods/Target Support Files/Pods-TargetName/Pods-TargetName-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
Install your Podfile again, may it should help.
P.S. Remember TargetName in above script should be your Projects'
Target Name. e.g. if your target name is MyAppName then you should
replace TargetName in above script as MyAppName

Related

App icon not showing on iPad Pro(12.9 inch) 2nd Generation [duplicate]

I can't see iOS AppIcon when installing the build from the latest Xcode Beta. What could be the possible error?
I have included the required icon sizes including 1024x1024.
You are not alone.
In my project, I found that a previous AppIcon resource that was working fine no longer resulted in an app icon being rendered. A range of experimentation found the following:
An AppIcon resource copied in from another project where the AppIcon worked, resulted in the AppIcon working in this project, suggesting there was something wrong with the specific original AppIcon resource that wasn't working.
Copying the image files from the non-working to the working AppIcon asset resulted in the working one now failing also.
Creating a new AppIcon resource, and inserting the original app icon images likewise led to a blank app icon.
Combined together, the points to this stage suggested perhaps there was something wrong with the image files themselves. I therefore tried various steps to resolve this:
Re-exporting all the icon sizes with my usual pre-processing app Prepo. Ensured that my source image did not contain transparency. Inserting those re-created icon images still resulted in a blank app icon.
Re-creating all the icon sizes with a different process, via Sketch, and inserting those icon images into the same AppIcon resource resulted in the app icon working.
Creating a new AppIcon resource, and inserting the Sketch-created images resulted in the app icon still working.
All of the above suggests that there is something in Xcode 9 which rejects or fails to use previously working app icon images, and that some processes to create app icons that previously were fine produce images that Xcode 9 cannot use. Perhaps there is something within the png specification which is a valid png, but not an acceptable app icon to Xcode 9. The most obvious thought is that app icons with transparency might be rejected, but I do not believe the icon images I was using contained transparency and I tried to eliminate this in my testing above.
A completely separate cause that has been reported for some users is related to CocoaPods integration. See discussion with possible temporary fix here and a pull request that has been created for Cocoapods that theoretically addresses this issue. I say theoretically addresses because I've tried implementing both of these solutions, and neither of them resolved the issue on the project where I've encountered it.
For clarity, make sure that the color profile is set to: sRGB IEC61966-2.1. My icons had no color profile before I stumbled across this issue.
I'm sure other color profiles must work but I haven't done the testing to be sure.
This can be done in preview by:
Tools → Assign Profile
Select sRGB IEC61966-2.1
When you do a Get Info on the icons it should now say the correct Color Profile.
After trying various solutions like "Asigning color profile (sRGB IEC61966-2.1) to icons" and "CocoaPods solution" stated above, or "Changing App Icon Source name to different asset name in proect setting",
I found one very basic solution as follow:
Clear your project
Clear derived data at (~/Library/Developer/Xcode/DerivedData/)
Go to "Project -> Build Phase"
Find "Copy Bundle Resources" and drag it as the last item of the list
Uninstall application if it is already there, and run project
Find screenshot for better understanding.
Before
After
Note: You can check, what is creating problem for app-icon in your project by simply changing position of "Copy Bundle Resources" to upward direction.
I had the same problem with my App icons. They displayed on some devices but not on others. I looked further into the problem and found that not all of my icons had been flattened and all had an incorrect color space (Adobe RGB). I flattened all icons and converted to SRGB color space, then replaced the existing icons. All icons show perfectly now.
Another Simple Fix once discovered:
I had the same 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 simpy remove this entry from the info.plist file (clicked the helpfull little "-" button. Rebuilt and tested and everything was perfect once more.
Edit: This needs to fire in the middle of gym, which I don't know how to do. Running the bug fix as soon as the archive appears in the folder will do the trick. If someone can help improve this, please let me know!
I ran into this problem using Fastlane, and I wrote a shell script that I run as a lane to solve the problem. The fix itself is code from user stubyte in this thread.
Here is my script for archive_fix.sh:
#!/bin/bash
# navigate to latest archive created
cd ~/Library/Developer/Xcode/Archives
foo=$(ls -t | head -n1) && cd $foo
line=$(ls -t | head -n1) && cd "$line"
# bug fix
find Products/ -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323
Inside my Fastfile, I ran:
sh("./archive_fix.sh")
I spent a whole day wasting time on this. I checked my png files to ensure no transparency, to ensure correct RGB settings, I also changed the podfile as discussed here. Nothing worked. The upgrade to Xcode 9/iOS 11 seemed to break/change something as icons were previously showing for me for the same app.
Anyway, what fixed it for me was to change the name of the iOS App Icon in the Assets.xcassets (Default = AppIcon), and to also change the 'Asset Catalog App Icon Set Name' in the Build Settings to align with the new name.
Strangly, after I got this to work, I updated all my images in AppIcon within Assets.xcassets and I got a blank image again! Repeated above steps and problem solved for second time.
Problem:
1. App icon not appearing on iOS 11 or Xcode 9.
2. App icon visible on iPhone but not in iPad.
Solution that worked for me:
The issue seems to be with the build process for Xcode 9 and iOS 11. In the past, Apple has been using ~iPad extension to differentiate between the assets for iPhone and iPad.
The info.plist has a dictionary with the key “CFBundleIcons~ipad” which has no items (as it appears in Xcode 9), which is causing the bundle to GET the images from the info.plist file instead of images.xcassets, thus the app icon on Xcode 9 is not appearing.
Deleting this key from .plist file worked for my build, while the others did'nt.
TL;DR: create a "Copy Bundle Resources" Build Phase
After a day and a half trying pretty much every solution on this and other threads, I found a very different fix that worked for me. Looking at app package within my build folder, I noticed that the App Icon png files were not being copied over into it. I created a blank app from scratch, added an app icon, and in that blank app it did copy the icon file over. So what gives?
The blank app had a "Copy bundle resources" build phase that copied the Assets.xcassets package over. Mine didn't. So I created one, added my Images.xcassets, and presto change-o, my archive got validated. NB I am pretty sure I never had that build phase before, yet I was able to submit a build just a month ago ...
In my case none these solutions worked.
My icons were not being shown cause they were NOT IN CORRECT SIZES. Once I resize them correctly then my issue got resolved.
Answer from gales_vasile: https://forums.developer.apple.com/thread/86290
Worked for me.
It should be a bug in CocoaPods, as disccussed here https://github.com/CocoaPods/CocoaPods/issues/7003
I had the same problem but I fixed it following the next steps:
1) Add this code to Podfile:
post_install do |installer|
copy_pods_resources_path = "Pods/Target Support Files/Pods-IconTest/Pods-IconTest-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
2) Change copy_pods_resources_path for your app and run “pod update”.
This should fix your problem!
This issue comes due to CocoaPods for iOS 11. After few research I found one solution:
post_install do |installer|
copy_pods_resources_path = "Pods/Target Support Files/Pods-XXX/Pods-XXX-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
Just add above to podfile and in terminal, execute pod install.
But this above code have limitation.
There may such conditions like we have multiple pod then we need to run in loop.
post_install do |installer|
installer.aggregate_targets.each do |target|
copy_pods_resources_path = "Pods/Target Support Files/Pods-Fixr/Pods-Fixr-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
end
It works fine when there is multiple file.
A easy Way to change the color Profile is using the Automator.
Make an Job every file and folder
Screenshot Automator
And save it.
then you can mark all Icon Files in your asset and choose the Job.
All Profiles for the Icons will be made:)
1- Add this code to Podfile:
post_install do |installer|
copy_pods_resources_path = "Pods/Target Support Files/Pods-IconTest/Pods-IconTest-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
2- pod install
note: make sure you replace this:
Pods-IconTest/Pods-IconTest-resources.sh
as IconTest is the name of your app
or you can get this path by searching for .sh: (check image)
Having an incorrect icon size in your icon set can cause the App Icon to not display #iOS11. After many days of investigating, I found this entry in my build log:
Showing All Messages, Filtering for "icon". warning:
ApplicationIcons.appiconset/Icon-40#2x.png is 80x80 but should be
60x60.
Whilst this message was present, my app icon was always not displaying (i.e. would see the default iOS app logo). I corrected the problem icon file (swapping it with the correctly sized image), and now my App Icon always displays. For some reason, changing the 'Asset Catalog App Icon Set Name' corrected the issue as a once-off. Subsequent app builds would result in the default icon displaying again.
In my case one of the Pods contained .xcasset. Removing it solved the problem.
In my case the app icon started to show up correctly in Finder after I changed
<key>CFBundleIconFile</key>
<string>AppIcon</string>
into
<key>CFBundleIconFile</key>
<string>AppIcon.icns</string>
in the Info.plist. My XCode version is 8.3.3
After trying a bunch of these solutions, this is what solved it for me:
1). Delete any .xcassets folders in any of my Pod folders
Then delete any references to those files in:
2). Pods > Target Support Files > Pods-YourApp-resources.sh
Lastely, under my App > Build Phases > Copy Pod Resources
3). Remove any references to the same .xcassets paths
Afterwards just to be safe I did a Clean, Clean build folder, and then deleted Derived Data. Closed Xcode and reopened, voila!
Hope this helps someone, it took me about half a day as well to iron this out...
After some days of research I figured out the problem, im my case the culprit was xcode 10 beta that cause the missing app icon issue on ios 11.
I downgraded to xcode 9.4.1 and now the icon appear on ios 11 as well.
In my case
Xcode 10.3
macOS 10.14.5
I had a legacy project that used .icns instead of .xcassets.
The app insisted on using the old icon even after I ...
deleted all icon files;
removed all the references to icon files in the Copy Bundle Resources build phase;
ensured that no old .icns files included in the output app bundle resources; in fact, there was absolutely no .icns file there!
cleaned, deep cleaned project build folder, manually deleted ~/Library/Developer/Xcode/DerivedData before rebuilding;
added Assets.xcassets to the project and tested varies renaming of this bundle: images, Images, Icons, etc;
created and imported icon-set images that are generated from Icon Set Creator; The icon-set works for an fresh empty macOS Cocoa project.
What worked for me was something among a few desperate trials:
Changed the Bundle Identifier and made sure everything still builds: this involves lots of one-click fixes that Xcode suggests to the project metadata, such as this one: https://stackoverflow.com/a/45976427/987846 and regenerating .entitlements.
Removed and re-added CFBundleIconFIle property to the target's Info.plist. Name it AppIcon.
Set App Icon property in the target's General settings to use my .xcassets.
Experienced .xcassets generating another empty AppIcon called AppIcon-2 behind my back, so manually deleted it from .xcassets, then reset the App Icon of the target to AppIcon.
Readding .xcassets to the Copy Bundle Resources build phase.
After rebuilding, this time the correct .icns is copied over to the app bundle's resources folder.
As Andrew Dunkin commented on another suggested answer, my image assets were not included in the Copy Bundle Resources build phase. I spent longer than I probably should have looking for this solution so I hope I save someone else some time.
Go to Project -> Build Phases
Open Copy Bundle Resources dropdown
Make sure your folder with your image assets are included in this phase. If not add it. (The name of my asset folder was Assets.xcassets)
In my case, I had an asset file called "Images", I had to create an asset file called "Assets". And then create an AppIcon inside.

missing required icon issue and marketing icon not found issue

I just updated Xcode from version 8.3 to 9 via appstore. I am trying to submit my new app version but I am facing app upload problem with Xcode 9.
I had not got this issue before when I uploaded app using Xcode 8.3. My app is iPhone app and minimum target is iOS 9. My code is in Swift 3.2.
The issue is about the missing required icon as shown below:
When I upload app with Application Loader 3.0, it gives me error saying "Missing required icon file........ >=7.0" and about marketing icon 1024x1024 in .png without alpha channel and transparency. I have followed all those criteria.
I have all the icons including 120 X 120 and also marketing icon of 1024 X 1024 included
I have all the app icons in Assets.xcassets folder in AppIcon.
Even then I and getting same error again and again have not been able to upload the new version of app to iTunes.
I googled and checked most of the stacker flow posts regarding this type of issue.But I am still not able to get rid of this issue.
Its been 2 days I am trying this.
I also tried without using asset catalog and adding app icons in the App bundle in folder with name format as icon.png and so on.
I then added the app icon names in info.plist as well and tried, but also the error is same and is not letting me to upload the app to appstore.
I am not sure what is the issue. Is this the bug in Xcode 9 or is there any mistake I need to correct. I have uploaded app many times but this is the first time I am getting the issue. Not sure what to do. Anybody faced this issue recently? Any help would be highly acknowledged. Thanks.
I have the same problem. Check this: solution
Just add this code below to your podfile:
post_install do |installer|
installer.aggregate_targets.each do |target|
copy_pods_resources_path = "Pods/Target Support Files/#{target.name}/#{target.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
end
and then run in console pod install
After trying multiple things - getting rid of the alpha channel, messing with my pods, etc - turns out it was a High Sierra issue. A bit hacky, but basically have to make Xcode think you are on a lower OS.
See Stubyte`s answer on this thread.
What I did:
Locate your app's .xcarchive file, right click >> show package contents, navigate to products >> applications >> your application's name >> show package contents. Locate the info plist from here, and change the BuildMachineOsBuild to 16A323. Then, submit the app.

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:
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
For Xcode 9 on High Sierra try this:
Go to Menu Product > Archive, right click on your new build > Show in Finder.
Open Terminal and change to Archive: (type cd + space, drag your new build *.xcarchive
cd /Users/[user]/Library/Developer/Xcode/Archives/[XXX].xcarchive
Using #stubyte's code:
find Products/ -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323
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.
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.
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.
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 my case, for some reason the AppIcon asset was not part of the app target. 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.
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.)
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
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.
Make sure plist MinimumOSVersion > 6.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.

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

I successfully uploaded my app on Xamarin forms but after it was uploaded I received this in an email from apple:
"Missing required icon file. The bundle does not contain an app icon for iPad of exactly 167x167 pixels, in .png format ."
So it wants an image in my resources file I suppose (not in info.plist icons as they are not asking for 167x there) but should I name it: Icon-83.5#2x.png or Icon-174.png?
Go to xcode > select Images.xcassets > check ipad from the right menu at the top right > you will get new set of dimensions, now it's easy as fill your new app icons for each dimension.
I've had this particular problem in the last couple of days.
The iPad icon didn't show within the Info.plist and kept giving the warning you're getting right now.
My fix was to manually add the icon Icon-83.5#2x.png to the resources folder ( as Prashant pointed out ) and add this to the Info.plist:
<key>CFBundleIconFiles</key>
<array>
<string>Icon-40.png</string>
<string>Icon-40#2x.png</string>
<string>Icon-40#3x.png</string>
<string>Icon-60#2x.png</string>
<string>Icon-60#3x.png</string>
<string>Icon-76.png</string>
<string>Icon-76#2x.png</string>
<string>Icon-83.5#2x.png</string>
<string>Icon-Small-40.png</string>
<string>Icon-Small-40#2x.png</string>
<string>Icon-Small.png</string>
<string>Icon-Small#2x.png</string>
<string>Icon-Small#3x.png</string>
</array>
I used to work with Asset Catalog but I couldn't get it to work with the iPad Pro icon.
For the forum post Andres mentioned in the comments:
Rename the 167x167 icon file to Icon-83.5#2x.png, place it in the Resources folder, and make sure it has a build action of BundleResource.
See https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_resources/ for information about setting BundleResource option.
XCODE 13 2022
In my case, the problem was default AppIcon is deprecated, then we need to use a new App Icon standard. As I publish apps to iPhone and iPad I need all the necessary icons. (This issue no appear when you check only one device(iPhone or iPad))
Go to Xcode >Images.xcassets> And select your App Icon from the assets list.
Right-click on there, You can now see a menu list like that
Select iOS>New iOS App Icon
Then you can find now a new "AppIcon" asset named "AppIcon-1"
There is a difference to "AppIcon" because It has more icons options(iPad icons size)
Remove "AppIcon" (OLD)
Rename your "AppIcon-1" to "AppIcon"
Now you can put the missing icon size.
Xcode 14.1 (14B47b)
You're getting this error because you have checked the iPad option. In my case, I had been developing my app on Xcode 13.x and then after the new version of Xcode 14.x I got this error.
So on Xcode 14 there is no need to create app icons in various versions and put them inside Images.xcassets, just follow the steps:
Click on the Images:
Then try to press + and choose iOS App icon:
You will see it got changed by comparing it to the previous version, it only accepts one and only one 1024x png image.
Now, clean your last build and build your app again.
But if still you want to use the previous version, you can click on AppIcon and then after choosing it, open the right panel of Xcode:
Then by choosing All sizes you would be able to see the previous version set.
I use Visual Studio 2017 on a Windows machine with a MacBook connected to it. I have an Asset Catalog called images that contains an image set called AppIcons where I have posted all of the various required image sizes. I was getting the same error as medvedo except I was getting three errors for 3 different images sizes (2 for ipad and 1 for ipod as I recall) After a lot of searching I found the solution was to reference the Asset Catalog in the Info.plist file.
First I had to find the path that Xamarin was putting my asset catalog in. I did that by deploying the app to the MacBook and then using Finder I went to the Go menu and chose the Library folder (earlier in the day I Googled how to show hidden folders on the Mac) In the Library folder I found the Caches folder and in that I found Xamarin/mtbs/builds/myappname There I found that the folder was Images.xcassets/AppIcons.appiconset. I say all of this knowing that it might always be in that folder but I had to look it up so I thought I would share in case it changes from installation to installation.
Once I knew the path and name I was able to add the following to my Info.plist file inside of branch
XSAppIconAssets
Images.xcassets/AppIcons.appiconset
FYI - I have built and deployed this app to iTunes at least 4 times over the previous 8 months. I am not sure what I did, if anything, to cause the error to pop up.
After trying many things, this is how I fixed the "Missing required icon" error messages:
Go to Solution->ProjectName.iOS->Asset Catalogs->Assets.
See "AppIcons" there? We are going to delete it, BUT FIRST! Find that same folder in your project files and copy it somewhere safe. Now, delete the AppIcons asset in the project. Also delete the "Assets" catalog.
ProjectName.iOS right click select 'Clean'. Go to physical project folder. Delete the "bin" and "obj" folders. Find the empty "Assets.xcassets" folder and delete it as well.
ProjectName.iOS->Asset Catalogs right click select "Add Asset Catalog". It should automatically add an "AppIcons" entry. Go through and set each of the image sizes, pointing to where you copied your images. They will automatically be copied to the Assets.xcassets folder. They will also generate hidden entries in the ProjectName.iOS.csproj file that will include the image in the final binary. The entries look like this:
<ImageAsset Include="Assets.xcassets\AppIcons.appiconset\1024.png">
<Visible>false</Visible>
</ImageAsset>
Edit Info.plist. Set the App Icons Source to "AppIcons".
ProjectName.iOS right click, select "Rebuild". ProjectName.iOS right click, select "Archive". Archive Manager > Distribute > App Store. Verify certificate. Enter Apple login name and App-Specific password to upload. Done!
If you are still facing issue with all the above process steps performed correctly.
Then please check you are logged into appstore connect using your browser and then try to publish it will and work.
If you do not want the app to be available for ipad and getting the same error just uncheck ipad from runner properties below version number

Xcode target icon not displayed

Whilst trying the AFNetworking iOS example project I noticed that Xcode was displaying the target icon. Xcode does not do the same for my own projects/targets however.
AFNetworking iOS example project that shows the target icon:
A project that does not show the target icon:
The only difference I can see between both projects is that the AFNetworking iOS example target has an 'Icon files (iOS 5)' ('CFBundleIcons' raw key) dictionary within *-Info.plist. Surely this cant be the source of the problem though given that my example project is targeting iOS 7? Both targets do have an 'Icon files' ('CFBundleIconFiles' raw key) array within *-Info.plist.
Please could someone help to shed light on where Xcode is looking for the target icon?
I tried all the above and did not fixed the icon issue. I was using assets catalog for the project and X-Code version was 5.0.2.
Following steps fixed my issue:
Select the Project file from the navigator and select the target which you do not have the icons
Then select Build Phases and expand and Copy Bundle Resources
Add the *.xcassets file to the bundle resources (In my project the file name was Images.xcassets)
Clean and build the target.
To get the icon to appear you have to have the App Icon (Icon-72.png) in the root directory of your project.
If you've changed the App Icon name, you must change the correct properties (CFBundleIconFile, CFBundleIconFiles, and CFBundleIcons) in the Info.plist to the changed App Icon file name.
(This part doesn't matter, but I've found it works much better if you do.)
Fully qualify your info plist file in your target build settings with the following variable name: $(SRCROOT)/your_plist_file_name.plist (of course changing "your_plist_file_name" to the correct name)
I've also found you have to change your target's info plist to a different plist, then back to the correct plist file in order for the icon to show in the build settings. You'll also have to click away from the project file and then back in order for it to show in the list of targets.
I'm using Xcode 5, but this should work on Xcode 4 and above.
Good Luck.
Please flow the step
1)Click on the app icon arrow
2) drag the app icon 120*120 px
3) fisrt time click on the scheme then show the app icon or rest the simulator and again run
See this screenshot:
Here Blue are dimensions and red are icon names. Like 57-57 is actually 57-57.png. Put all these icons in the root of the project with .xcodeproj file. Add them into the project. Then set them all accordingly in Target > Project Name > General
Doing this will start showing every icon at its place in XCode automatically.
If using the Asset Catalog, select Images.xcassets and look in File Inspector. Check the target membership and make sure your target is selected.

Resources