Brian Rak Brian Rak - 1 year ago 71
iOS Question

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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download