Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot get app icons to work in Xcode 6

I cannot for the life of me get this to work. Here's what I'm doing:

  • Create a brand new project for iPhone.
  • In Project > General, project is already set to get app icon from the default asset catalog.
  • Go into the asset catalog > AppIcon and drop in images as appropriate.
  • Build and run. No icon.
  • Check Project > Build Settings > Asset Catalog App Icon Set Name. It is correctly set to AppIcon.
  • Check the images.xcassets file and make sure it has the right target membership.
  • Check Project > Build Phases > Copy Bundle Resources and verify that images.xcassets is in there.

Still nothing. I am going INSANE. Someone please tell me I forgot a checkbox somewhere. Please?

like image 291
Brian Rak Avatar asked Sep 11 '14 03:09

Brian Rak


People also ask

Why are my apps not showing icons?

Icons Disappear from App Launcher If you haven't tried to restart the device yet, give that a try. Press and hold the “Power” button, then select “Restart“. In many cases, the Home screen will refresh and the icon(s) will return.

How do I enable app icons?

Turn on App icon badges from Settings. Navigate back to the main Settings screen, tap Notifications, and then tap Advanced settings. Tap the switch next to App icon badges to turn them on.

Why are my app icons not showing Apple?

1: Reboot iPhone A hard reboot is often the easiest thing to do, which is accomplished by pressing Volume Up, then Volume Down, then pressing and holding the Power button until you see the  Apple logo show up on screen. Sometimes this alone can fix the missing icon problem, or the blank dock issue.

How do I add app icons in Xcode?

It contains all mobile platforms ( iOS, Android, iWatch, etc) needed icons. Now you need to copy these icons into the Xcode project, what you need to do is just drag the folder AppIcon. appiconset under the iOS folder, and drop it to Assets.


2 Answers

The problem was with the images. I haven't been able to figure out exactly what was wrong with them. Resaving them with a different editor caused them to start working in my project.

In case it helps anyone, these were the details of my scenario:

  • I created the images programmatically using Inkscape.
  • The files were all 32-bit PNGs.
  • I confirmed by examining the binary files that interlacing was turned off, as Apple recommends.
  • Resaving as 32-bit PNGs using Fireworks resulted in working files.
  • I compared the good and bad files and only the headers were different. I'm not sure what the poisonous chunk was, but I did notice that the pHYs dimensions were different between the good and bad files (good: 00 00 0B 12, bad: 00 00 0B 13, which both correspond to 72 dpi). Obviously DPI shouldn't matter here, but I do vaguely remember a case where I had trouble with images that didn't have a certain DPI written into them in the past.

At any rate, I dearly hope this saves someone else some hair pulling.

like image 140
Brian Rak Avatar answered Sep 19 '22 03:09

Brian Rak


  1. Make sure under Settings > General > App Icons and Launch Images that App Icons Source is set to AppIcon
  2. Under Images.xcassets include the image files with the correct dimensions (refer to image below)
  3. Your icon must be a .png, & you must follow sizing according to this documentation: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html

In case the link should die it goes something like this (more sizing constraints for settings icon, toolbar and navigation bar icon, tab bar icon, etc..):

App icon sizing for iPhone 6 Plus (@3x): 180x180
app icon sizing for iPhone6 and iPhone5(@2x): 120x120

app icon sizing for iPhone 4s (@2x): 120x120

app icon sizing for iPad and iPadmini(@2x): 152x152

like image 34
Victor Ranu Avatar answered Sep 21 '22 03:09

Victor Ranu