Related
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.
I've added a 1024 pt icon to the app as necessary. Here, it is on a screenshot:
But when I try to upload it to the AppStore - it says I don't have it.
Here when I try to choose Icon assets in Xcode - it strangely give me options only to use AppIcon file from the libraries which are empty and nonexistent, not giving me an option to use Assets from my Assets file in project
Here on a picture all these options are from the library and empty
So, as a result I can't use my real icons and get this warning :
Anybody know how to solve this issue??
I also faced this problem yesterday,i spent a whole day and finally i solved this problem.
Here is my environment
1.cocoapod
2.macOS Sierra/macOS High Sierra
3.Xcode 9
First of all,make sure you have already set the assets which cantains appicon,and make sure you have set the 1024*1024 icon for App Store.
If so,you still get the problem while uploading the binary to App Store.Then there are two situations.
If you use cocoapod
**Also,you can not see the app icon properly after you run you app on you device.**It's because cocoapod's bug.Open the project directory,open the file whose path is [PROJECT_NAME]/Pods/Target Support Files/Pods-[PROJECT_NAME]/Pods-[PROJECT_NAME]-resources.sh,pull to the end,replace the code
printf "%s\0" "${XCASSET_FILES[#]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
to
printf "%s\0" "${XCASSET_FILES[#]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"
fi
then run your app,you can see the right app icon now and you can also upload binary properly.If it still does not work, use the following method.
If you don't use cocoapod,
it's a bug of APFS.
Once your app was archived right click it and choose show in Finder. Open the package contents and open this file inside of it: /Products/Application/yourApp.app/info.plist
In there you have to change all the DTXXX Values to be the same as in the latest version of Xcode 8.
DTXcode - “0833”
DTSDKName - “iphoneos10.3"
DTSDKBuild - “14E8301”
DTPlatformName - “iphoneos”
DTCompiler - “com.apple.compilers.llvm.clang.1_0”
DTXcodeBuild - “8E3004b”
DTPlatformVersion - “10.3”
DTPlatformBuild - “14E8301"
Save the plist file and go back to xcode where you need to export the archive for the App Store.
Last but not least download Application Loader 3.0 from Apple and upload the just generated IPA file.
I also faced this same issue few weeks back, though I had added the marketing icon of 1024 X 1024 with .png format and no alpha channel in the Xcode, the submission was denied and failed continuously with warning as shown below:
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
I am not fully sure about the cause of issue whether it is because of Xcode 9 or Mac OS High sierra or Cocoa-pods, but I could solved the issue with following :
Added the 1024 X 1024 .png Appstoreicon with no alpha channel.
Archieve the Xcode project. (Just do Archieve, do not upload or export .ipa in this step.)
Locate your app's .xcarchive file clicking show in finder as shown below:
Then right click -->> Show Package Contents, go to Products folder -->> Applications -->> on your application's name, again right click and -->> Show Package Contents. Locate the info plist from there (you can clean up files by clean by kind in order to locate info.plist fast).
And change the BuildMachineOsBuild value to 16A323.
Then save the .plist file
Now export the .ipa file and upload that .ipa file to iTunes with Application loader.
The app submission should success, even with the WARNING ITMS-90704: "Missing Marketing Icon.
Hope it works for your case too.
The thread discussion is here:
Marketing icon missing issue:
Thanks
I had the same problem. I just dragged and dropped all icons to the assets. It fixed the problem
You can ignore those Error. You can upload a marketing image on iTunes Connect later.
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.
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.
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