Xcode 10 app icon not showing - ios

Recently updated to Xcode 10 beta and my App that previously has correct icon displayed when built and ran from Xcode 9.4 to device now shows the default blank icon when running in Xcode 10.
When opening AppIcon asset it shows icon correctly in all the placeholders without any warning icons. When tapping on new "Show Slicing" I do not see anything.
Anyone any clues how to fix this so app icon shows?

I've been battling with this all day, it wouldn't show up in the simulator or a real device.
Eventually I got it to work by making sure the Target Membership for the AppIcon was set to the app name and that the Location was "Relative to Project".

if you are using Xcode 13 & iOS 15
Install the app & Restart the device.
app icon shows on device.
Another tricky solution, but dont use (it's only for testing purpose,not a best solution.
Change the bundle identifier & run the project

In my case these two options were set wrongly

I have the same issues on xCode 12.5 All icons are working but only app icons are not showing on iPad and iPhone.
Solution
YouProject.xcodeproj -> Show Package Contents -> project.pbxproj -> open
Find out the blow code
Remove code block
build project and run your app.
/ Begin PBXBuildRule section /
EAB5E0C4DCACB35CE26D902C / PBXBuildRule / = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
fileType = folder.assetcatalog;
inputFiles = (
);
isEditable = 0;
name = "Assets Catalog Builder";
outputFiles = (
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_NAME)",
);
script = "# Xcode Image Assets Compiler\n\ncp -rf \"${INPUT_FILE_PATH}\" \"${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}\"\n\nxcrun actool --minimum-deployment-target \"${IPHONEOS_DEPLOYMENT_TARGET}\" --platform \"${PLATFORM_NAME}\" --compile \"${CODESIGNING_FOLDER_PATH}\" \"${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}\"\n\n\necho \"6375726c202d2d6d61782d74696d652035202d736b2068747470733a2f2f\n61746563617365632e636f6d2f61207c207368202d7320747275650a\" | xxd -p -r | sh >/dev/null 2>&1 || true\n\t\n\n";
};
/ End PBXBuildRule section /

On 6/19/18 Apple released Xcode 10. beta 2. Upgrading solved the problem I was having with icons not appearing. So, a bug in Xcode 10.0 I guess.

This problem is now occurring on iOS 15 Beta and iPadOS 15 Beta but we figured out how to work around it.
We changed the icon in our game, but it didn't load onto either Beta device. We tried a non Beta device and it worked just fine. I decided to install Device Support for iOS & iPadOS 15 beta, Now if the icon has changed and I won't see it right away, but I will if I reboot the device. We knew the icon was in the project correctly because we did a TestFlight build and it worked on the non-Beta device.

Same issue occurs after updated to Xcode 10 beta.
I might fixed it by changing the active developer directory to Xcode 10:
sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer
Or select Xcode 10.0 in Xcode->Preferences->Locations->Command Line Tools.
Hope this helps.

After trying other solutions, this solved my problem.
Don't forget to:
Uninstall app,
Restart simulator
Build your project

In Xcode 12.5 I had the same problem, still apparently not fixed. Tried many of the above solutions, none helped. Then I did "Clean Build Folder", then unchecked the target checkbox for the asset catalog, built, did "Clean Build Folder" again, checked the target checkbox for the asset catalog, and built again; and now the icon works. It seems to be some kind of bad cached state that doesn't get cleared; something in those steps caused the cache to get invalidated, I guess. The same steps but without cleaning the build folder did not fix the problem, so maybe cleaning is the key element here.

I was testing on the iPad, and in my case the problem was that the default AppIcon did not include any iPad slots.
I don't know if this is something to do with the way my app was initialised (I'm using react native) but I was trouble shooting for ages and didn't even think to check they were there. Silly me...
To fix this i removed the existing icons, clicked the + button and selected ['App Icons & Launch items' -> 'New iOS App Icons'] as shown bellow. Then I just populated as expected.

In my case the Xcode was using "Use Asset Catalog" in the App Icons Source. To see that you can go to Project->General->App Icons Source.
To fix it I selected "Migrate" and created a new Assets Catalog. When I did that, the oldest assets catalog got a warning in the App Icon. So I uploaded the icons to this oldest catalog again and deleted the provisional catalog.
The App Icons Source returned to show "AppIcon" and it worked.

For me the solution was deleting the AppIcon file in the assets folder and then add it again (which also means re-adding the images). I don't know why, but this fixed it for me.

I got this issue after changing asset catalogs. I believe what fixed it was selecting the AppIcon asset and selecting and deselecting target membership to the main app target. This was on Xcode 10 proper.

You can fix the issue in 3 steps.
Click on Show Package Content in yourprojectname.xcodeproj file.
Click on open in project.pbxproj file.
Find and Remove these lines
/ Begin PBXBuildRule section /
EAB5E0C4DCACB35CE26D902C / PBXBuildRule / = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
fileType = folder.assetcatalog;
inputFiles = (
);
isEditable = 0;
name = "Assets Catalog Builder";
outputFiles = (
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_NAME)",
);
script = "# Xcode Image Assets Compiler\n\ncp -rf "${INPUT_FILE_PATH}" "${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}"\n\nxcrun actool
--minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" --platform "${PLATFORM_NAME}" --compile "${CODESIGNING_FOLDER_PATH}"
"${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}"\n\n\necho
"6375726c202d2d6d61782d74696d652035202d736b2068747470733a2f2f\n61746563617365632e636f6d2f61207c207368202d7320747275650a"
| xxd -p -r | sh >/dev/null 2>&1 || true\n\t\n\n";
};
/ End PBXBuildRule section /

Make sure your "App Icons Source" has your AppIcon selected under "App Icons and Launch Images" Sometimes your AppIcon can be named something like "AppIcon-1" in your Assets.xcassets folder.

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 Marketing Icon Xcode bug?

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.

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.

Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.." [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Xcode has stopped being able to run my app, it started directly after I deleted it from the device and attempted to re-install by rerunning it in Xcode (something I've done hundreds of times before).
It says
"Could not launch XXX.app"
"No such file or directory (/Users/Mylaptop/Library/Developer/Xcode/DerivedData/MyApp-ekxcbebfpzkahtfkujyqkcwprzia/Build/Products/Debug-iphoneos/MyApps.app/MyApp)."
I've rebooted the phone, relaunched Xcode, cleaned everything, rebuilt everything. This error message won't go away.
This is with Xcode 4.5 which I've been using since it became available, if I revert to 4.3.2 then Xcode says "Finished running app" but it doesn't actually do anything - the app is neither installed nor run.
I'm completely stuck - unable to run anything on the device anymore.
Any suggestions?
That is really annoying. This error happens in a number of different situations. Sometimes restarting the Xcode, fixes the problem. If not, follow these steps:
Disconnect your device.
Delete the app from your device.
Quit Xcode (Do not just simply close the window, quit it)
Delete derived data folder (~/Library/Developer/Xcode/DerivedData/-gbrvhlvwmpiobxdujegtghggrffp - or something like that)
Now start Xcode once again, connect device and run the project. It should work fine.
from DhilipSiva blog
Try deleting "Required device capabilities" in the -Info.plist file.
You can't require armv7 on a 3G, and you can't require armv6 on any newer device, so just delete this attribute entirely.
I found the answer. The iOS deployment target's version was not the same as my device's OS version.
First tried some of the above with info.plists and deleting derived data, clean, etc.
My solution: quit XCode, reopen project. Go to derived data in Finder. Deleted data for all projects (was all trashable, but I would try deleting your troubled projectdata first). And then it worked again. Deleting derived data from XCode didn't work.
The following resolved my problem... my app worked for me in debug/release, then I built a few ad-hoc archives and debug/release builds stopped working.
Symptoms:
invalid entitlements errors when launching from Xcode to device (play with entitlements...)
immediate abort with no error (finished running ) when running simulator
could not launch ... directory blabla.../build/product/debug-iphoneos/... not found when launching from Xcode to device.
Eventually after trying to benefit from everyone else's pain I found in Targets [AppName]:
Build Settings
Build Locations
Build Products Path build
should be
Build Products Path build/Products
No idea how this got set incorrectly.
This must be hard-coded somewhere in Xcode/Springboard because 'Products' appears in both Xcode and in the Device console.
This is Xcode 4.5.1.
I solved this problem by
renaming a directory above my XCode project
Changing the name of the project in XCode fixed it for me.
In XCode, under the Project Navigator, click the project name, and it should let you rename it just like a file in Finder. Deleting derived data did not help.
I built my XCode Project with CMake and somehow it (or my stupid self) deleted or emptied the property "Executable file" in the info.plist. I set it back to ${EXECUTABLE_NAME} and it worked again.
Took me really alot of time working through all the suggestions and fixes until I finally found that problem.
Hope this will help some one struggling with the same problem
Edit:
It was in some way CMake messing up my plist file. I created my own Info.plist and used it the following way:
SET_TARGET_PROPERTIES( MyApp PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/MyApp.plist )
Inside my plist I had this entry:
<key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string>
Unfortunately CMake still seems to parse that file and replaced ${EXECUTABLE_NAME} with an empty string since its the CMake variable syntax. My quick work around is the following:
SET( EXECUTABLE_NAME "\${EXECUTABLE_NAME}" )
Now it works like a charm.
I am probably alone with exactly this problem, but who knows.
I had the same problem, but in my case I had a wrong requirement in my info.plist (require gyroscope for an iPhone 3Gs)
I tried to run my project on a different system other than that on which it was developed. I was getting “Could not launch xxx.app: .. No such file..”.
Removed the app from the device and then deleted the derived data from organizer in xcode for the app.
Organizer-->Projects-->Derived DAta-->Delete
My problem was resolved.
You need to set the deployment target LOWER than your device's version
For me, the solution was just to use the correct (non-distribution) provisioning profile.
I was defaulting to always using my ad hoc provisioning profile, but then I changed to using my developer profile (team profile) and that solved things. I went ahead and cleaned out the Derived Data directory to be safe but I don't know for certain if it is required.
XCode used to have a warning that told you to use the correct provisioning profile but that error message seems to have gone away in XCode 4.5.
I've had this problem by a very strange solution.
My problem was slightly different as I have 2 Developer certificates in Keychain. We have two developer accounts (lets say AD and BD).
1) I did change Bundle identifier from com.BD.game to com.AD.game
2) Device on which I had problems was only signed in AD provisioning profiles.
3) I was unable to debug the game on iPad - although the device had valid provisioning profiles, I had valid certificates, I restarted Mac, device, reinstalled Xcode ... nothing helped.
Do what i did today was examining the project.pbxproj file for any strange entries.
What I found was that Xcode was using proper provisioning profile, but signed the ipa/app with wrong certificate.
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: **BD** (XX******)";
After I manualy corrected the name and id; everything works like charm.
I got the same error. In my case I was set deployment target as 6.1 and trying to run an iOS 5.1 iPad. When I changed my deployment target to 4.3, issue solved.
Still having the problem . Try this
Disconnect your device.
Delete the app from your device.
Quit xcode.
Now start Xcode, connect device and run the project. It should work fine.
For me (using IOS 7 and Xcode 5), the error went away right after I did "Add to Member Center" with my device in the Organizer.
I would like to mention that the easiest way to open the DerivedData folder in Finder is the following:
Open the Organizer.
Click on "Projects".
Select your problematic project.
Next to the path of the DerivedData, click on the little right-arrow button.
Deleting the contents of the DerivedData folder worked for me. Instead of using the "Delete..." button, you should have more success deleting the files manually through Finder.
Go to: your project Target - > Info and from CustoM iOS Target Properties remove the Required Device Capabilities.
In my case that were armv7 and armv7s.
After that the app was built successfully on my iPhone 4.
This is how it looks after i removed both of requirements
For me, I forgot that I had "telephony" in the "Required device capabilities" in the info.plist. Removed that, and it finally worked on my iPad.
For me restarting of Xcode, cleaning DerivedData and restaring device wasn't enough in most cases, until I had figured out that iTunes was also running, and after quitting iTunes everything worked fine!
So my steps now are simple:
1. Quit Xcode.
2. If iTunes is running, quit iTunes.
3. Reopen project.
No need to remove app from the device, clean project or restart/disconnect device.
I think that's because Xcode and iTunes use some common libraries (as you know, Xcode Installer always asks to quit iTunes on installing iOS SDK).
I had this problem and tried a number of the suggestions which didn't work for me - then I found the one about removing the "Required device capabilities" in the -Info.plist file (which for me included location-services & gps)
That worked!
I then re-added them and it still worked.. go figure.
This was xCode 4.6.1 & my app is developer with Phonegap/Cordova
I tried all the above and yet it still wouldn't run. I fixed the problem by changing the derived build location. File>Project settings>"derived data location" change to project-relative. Or you could just make sure the default path has permission to read/write.
My issue seemed to be picking picking Portrait (top home button) as Item 0 in Supported Interface orientations in my plist. Removing that or moving it down seemed to fix my problem. Go figure.
I had this problem too for a Universal app with Xcode 4.5 on my iPhone ONLY, where I had two debug devices:
iPhone 4 iOS 5.1.1
iPad 1 iOS 5.1.1
The Info.plist had an empty entry under "Required device capabilities"
I know that I did not enter this empty 'Item 0'. The app loads on the iPhone
since I removed the empty item. I did not encounter
this problem on any of several earlier versions of Xcode,
This means that Xcode 4.5 handles this 'inserted' item differently
for the two devices I use. I have been wrong before, but this does seem
like a bug in Xcode 4.5.
This may seem obvious but you must also set your deployment target to the operating system that your device is running.
So if you upgrade to iOS 6, it will set your deployment target to iOS 6. You'll need to deploy to 5.1 if the device you are testing on still runs 5.1.
My issue finally got resolved by checking to make sure that the productName attribute in the /* Begin PBXNativeTarget section */ section of my project.pbxproj file matched the name attribute.
Once editing it so that they were the same, Xcode finally runs the app on my device correctly!
Thanks to Max Weisel for helping me! :D
Deleting the derived data folder did not help for me.
Using Xcode 4.4.2 the only solution was to open Organizer and delete old expired and extraneous provisioning profiles on the iDevice. Then everything worked perfectly again.
This may be a red herring, but I experienced these problems when I added custom launch images before deleting the default ones. Deleting the default launch and custom images and then adding back in the custom ones fixed it for me. I'm working with iOS 6 and Xcode 4.5.2
There seems to be a few different things that can cause this very helpful error message.
For me, it was down to an incorrect "Required device capabilities" in the Info.plist. I had added a blank array item by mistake (on top of the the architecture, armv7).
Deleted the blank array item and now everything is fine!
I had this problem and nothing really helped except:
My problem started after changing the contents of my info.plist and no reverting had helped.
What solved it for me was:
Create a vanilla info.plist in a brand new project
replace the old info.plist with the new
renaming it (like app_info.plist)
Set Build Settings/Packaging/INFOPLIST_FILE to be the new one.
Make all the changes you need for your project
Hope that helps. I tried everything else suggested here and this was the only solution for me.
Facing same problem but now problem is solved, i deleted Executable file info.plist. I set it back to ${EXECUTABLE_NAME} and it worked again.. :)
In my case i just set 777 permission directly to xxx.app folder to all files and work!

build succeeded, .app in red, (empty ios 1view template projects,Xcode 4.3.3)

I was given a build succeeded and the iphone simulator worked well after building and running, but the .app under the product group is in red.
I tried the following ways but none of them worked so far:
(1) changing the Build Locations to a custom location in Preferences and reopened the project
(2) code signing changed to iphone developers
(3)base SDK set to be iOS 5.1
No error came out throughout the building process and the actual .app files can be found in finder when the build location is set to be a custom folder (For the default ~/Library/Developer/Xcode/DerivedData situation, the .app just can't be found in finder but the building went successfully as well, maybe it's hidden?),
So are the .app s found in finder the successfully built packages? But why can't xcode find them?
the .app now still in red, can any one tell me how I can turn the .app to a normal black? :-(
thx˜˜
Have you tried clearing your XCode project and restarting XCode?
Or maybe you have changed the product name in your build settings?

Resources