views:

290

answers:

2

For some reason, the iPhone 4 refuses to display my high resolution icon file.

I've checked out these solutions, none of which have worked for me:

http://stackoverflow.com/questions/3389160/how-to-setup-normal-icon-for-iphone3-and-retina-for-iphone-4

http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html

http://appworks.radeeccles.com/programming/cfbundleiconfiles-nice-ready-prime-time/

The icons are in my resources group, and are all named correctly:

I've also tried adding them to the Info.plist file, first as an array, then as a dictionary, then simply deleting all icon references from the plist file, but no matter what I do, it still displays the 57x57 icon scaled up.

Can someone who has a working icon setup please post the actual XML incantation required to make this work?

+1  A: 

i had this problem too... this is how I managed to fix it

in your info.plist file you need two entries:

the first one will be "icon file" and this needs to be "Icon.png".

the second entry will be "icon files" and this is an array...

the FIRST ENTRY in the array is your icon file at std def: "Icon.png"

the SECOND ENTRY is the icon file at high def: "[email protected]"

alt text

Thomas Clayson
Bear in mind the case sensitivity in file names.
BoltClock
Yes, this is basically what is written in the Apple documentation. I have the case correct and the filenames are exact. It still shows the low res icon in the iPhone 4.
Karl
are you sure high-res image is not corrupt. I know that a lot of the time I accidentally save PSDs as PNGs without changing the file-type, just the extention.
Thomas Clayson
Just loaded it and saved it as png. Still doesn't work :(
Karl
sorry... you're doing it right... there must be something else wrong. Are you installing it on an iphone 4? Have you tried deleting the app and reinstalling it? Are you sure the @2x icon isn't the same as the std def one? Are you sure its 114x114 and you haven't accidentally saved it at 57x57? Erm... not much else I can think it could be
Thomas Clayson
Yeah, I've checked all that. I was just hoping someone could post the actual XML so I could compare mine to one that actually works.
Karl
well you've got my screenshot... not much more to the acctual XML
Thomas Clayson
The problem is that visual editors often lie, which is why I'm looking for the actual XML.
Karl
+3  A: 

My Solution was simple, but only caught it be painstakingly comparing line-by-line in Apple Docs.

The non-obvious solution that seamed contradictory was "Deleting the Icon file key value". In the previous answer's image, you can see the Icon file still shows "icon.png" and the "Icon files" shows the two: icon.png & [email protected].

I got my app to work by deleting the "Icon file's" key value of "Icon.png" It was the only thing different, in the Apple Docs was the absence of a value for the "Icon file" key. View an image here: Info.plist Apple Docs Image

In addition, I would make sure you are using Apples recommended notation when labeling the photos:

  • 512x512 iTunesArtwork iTunes Image
  • 57x57 Icon.png Home screen for < iPhone 4
  • 114x114 [email protected] Home screen for iPhone 4 High Resolution
  • 72x72 Icon-72.png Home screen for iPad compatibility
  • 29x29 Icon-Small.png Spotlight and Settings
  • 50x50 Icon-Small-50.png Spotlight for iPad compatibility
  • 58x58 [email protected] Spotlight and Settings for iPhone 4 High Resolution

Next Steps...

  1. Clean All targets
  2. Reset Simulator
  3. Relaunch Application
  4. Works fine for iPhone4, reveals large AppIcon = "[email protected]"

Final Steps...

  1. I put the "Icon.png" name back in for the (Icon file) key.
  2. I put this back in to Backwards support iOS 3.0+ so that it still has a value to use.
  3. Clean All Targets again,
  4. Build & Relauch!

This methods seams to clear out any legacy issues and assures that the simulator pulls in the correct files.

Hopes this helps!

P.S. If this helps you solve your problem, be sure to check my comment as the Solution.

Newbyman
Thanks for this - saved me!
phooze