Journal of a Maker

A technical and personal blog by Warren C. Moore, iOS Developer

Automatically Generate iPhone/iPad Icons at All Required Sizes

With the advent of the iPhone 4 Retina Display, iOS application developers have an even larger task when it comes to creating the various sizes of icons they need for their applications. In summary, here are the icon sizes and where they’re applied:

  1. 57x57 - iPod touch, iPhone, iPhone 3G, iPhone 3GS main screen
  2. 29x29 - iPod touch, iPhone, iPhone 3G, iPhone 3GS app settings and Spotlight, iPad settings
  3. 72x72 - iPad main screen
  4. 50x50 - iPad Spotlight
  5. 72x72 - iPad main screen
  6. 114x114 - iPhone 4 main screen
  7. 58x58 - iPhone 4 settings and Spotlight
  8. 320x320 - iOS documents
  9. 64x64 - iOS documents

You may wish to customize your document icons (e.g., by overlaying your icon on a page icon or somesuch). And of course, iTunes requires that you submit a 512x512 image to be used in the App Store and elsewhere. This is often customized but will likely be similar in style to your primary app icon.

If you’re like me, you don’t have a graphic designer operating at the pixel level to produce sharp, snazzy icons at all those sizes. So instead of tooling around in Photoshop every time you tweak your 512x512 master icon (Image -> Image Size… -> 57px -> Save As… -> Undo -> ad infinitum), why not automate the process?

I’ve put together a small (tiny) XCode project that uses AppKit to output all the icon sizes mentioned above. And it’ll be easy to tweak when the iPad with Retina Display (fingers crossed) debuts and needs 96px and 144 px versions of your icon. Throw it into your build system and get freshly-resized icons every time you compile. Grab it here:

Click to download