Iphone – How to setup normal Icon for iPhone3 and Retina for iPhone 4

iconsiphone

I heard somewhere of an workaround by adding the following files to your xcode project:

  • Icon.png – 57×57 pixels application icon for standard resolution iPhone
  • Icon@2x.png – 114×114 pixels application icon for high resolution iPhone 4
  • Icon-72.png – 72×72 pixels application icon for iPad
  • Icon-Small.png – 29×29 pixels settings icon for standard resolution iPhone
  • Icon-Small@2x.png – 58×58 pixels settings icon for high resolution iPhone
  • Icon-Small-50.png – 50×50 pixels settings icon for iPad

Then setup your CFBundleIconFile to "Icon" (without extention).

The compiler will put a warning because your icon does not have an extention. If you just ignore it – it will work like a charm – UNTIL YOU WANT TO UPLOAD YOUR BINARY!

If you upload your binary through webinterface everything is working fine – but if you use the "apploader" it will not upload your app because of the missing extention..

is there a known way how to setup correctly the icons so you can use it for iPhone3 and iPhone4?

There is a "CFBundleIconFiles" Key for iPhone 3.2 and later – is it possible to use both?

Best Answer

Just set the Icon filename to Icon.png or delete the key all together from the info.plist file and let the OS do the work for you. It will select the correct one based on the device.

As long as both an Icon.png and an Icon@2x.png are added to the app bundle, the OS will load the correct one.

Related Topic