Cannot get app icons to work in Xcode 6

13,862

Solution 1

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.

Solution 2

  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

Solution 3

In case someone else runs into this again: I had trouble getting icons to work because the asset catalog was not in the root resource folder but in a subfolder, that's obviously not allowed for icons (Xcode 7)

Share:
13,862
Brian Rak
Author by

Brian Rak

Updated on July 04, 2022

Comments

  • Brian Rak
    Brian Rak almost 2 years

    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?

  • marciokoko
    marciokoko over 9 years
    I have a similar issue, Ive put in the app icon sizes. It builds but I get many warnings for 60x60@2x is required, i have an unassigned image, 29x29=58, 40x40=80, 80x80=120, 60x60=120 and I get not app launch icon. I have a 29, 40, 60, 80, 87, 120 & 180.
  • Jmh2013
    Jmh2013 over 9 years
    You should consider including a snippet of the relevant documentation just in case that link should ever die.