Making sense of icon image requirements for iOS universal applications.
If you are developing (or considering) a “universal” application for iOS, an app that will run on all (current) iOS devices, one of the first things you have to consider are the initial branding graphics for your game. These include the icons, in various sizes, and the launch images for each device.
The icons, of course, are displayed on the home screen of the device to represent the game, but they can also be shown (in different sizes) on the search page (as well as in Settings, if appropriate). The launch images are stand-in graphics that are displayed in a static fashion while the app is loaded and initializes itself. On an iPad, there need to be launch images for each orientation (portrait and landscape), while the iPhone and iPod Touch only launch in portrait orientation. For more variety, though, the iPhone 4 and 4th generation iPod Touch have the Retina displays, with higher resolution, requiring still more images.
The assumptions here are that you are creating a “universal” application, supporting iOS 3.2 (the minimum version for iPad), and want to be sure to have your branding artwork shown in the best light on all three types of devices. If you are supporting only iPad (no small screens or Retina displays) or only iOS 4+ (no backwards compatibility), then there are fewer conflicts and caveats, but this article should still be helpful.
Icon Artwork Specifications
All icon (and launch) images must be in PNG format (24-bit), with no transparency. Although there are naming conventions for automatically loading different files according to the device type, arbitrary (descriptive) file names for icons are preferred and more reliable. In our case, we use the project name (“DemolishPairs” herein) as a base name, with “ipad”, “iphone”, and “retina” used as modifiers.
For complete icon coverage, with no scaling performed by iOS, we have the following (8) icon files:
- DemolishPairs.png [512×512] – This is the largest (current) icon size for iOS applications; generally, the artwork should begin at this size (or larger) and be scaled down to the other sizes.
- DemolishPairs_ipad.png [72×72] – This is the application icon for the iPad, as shown on the home screen.
- DemolishPairs_ipad_small.png [50×50] – This is the application icon for iPad, displayed in search results.
- DemolishPairs_iphone.png [57×57] – This is the application icon for the older (non-Retina) iPhone and iPod touch.
- DemolishPairs_iphone_small.png [29×29] – This is the search results icon for the older iPhone and iPod touch.
- DemolishPairs_retina.png [114×114] – This is the application icon for the newer (Retina) iPhone and iPod touch.
- DemolishPairs_retina_small.png [58×58] – This is the search results icon for iPhone/iPod touch with Retina displays.
- iTunesArtwork [512×512] – This is (in our case) a copy of ‘DemolishPairs.png‘ with a very specific filename (note: no file extension, not even ‘.png’) for ad-hoc distribution and/or submission to the App Store.
Note that most games will not have Settings packages, but those that do can use the 29×29 icon  for all older displays, including iPad, and the 58×58 icon  for all Retina displays. (Document icons have different requirements but are generally unnecessary for games, so they are not covered here.)
Project Configuration for Icons
Once you have the icon artwork, it is necessary to include all of the icon files in the Xcode project, so they will be copied to the compiled bundle, and then modify the project’s ‘Info.plist‘ file (by whichever name) to indicate the icon image filenames. There are two possible entries that indicate icons, and since we are specifying multiple image files (and by Apple recommendation), we will add an ‘Icon files‘ (CFBundleIconFiles) array with six entries:
Caveat: ‘DemolishPairs_ipad_small.png‘ must appear before ‘DemolishPairs_iphone.png‘ in the list; otherwise, iOS 3.2 (iPad) will incorrectly select the 57×57 icon instead of the 50×50 icon when displaying search results.
Although the CFBundleIconFiles array takes precedence, there is still a minor reason to add the (singular) ‘Icon file‘ (CFBundleIconFile) string, with “DemolishPairs.png” as the value. Xcode 4 uses this image file as the default icon for the target application in the project; if it is missing or empty, the last entry in the array is used. This (currently) has no practical impact on the application itself, but supplying a reference (512×512) icon within the bundle is not a bad thing.
Of course, if one is building an application for only iPad devices, the number of icons necessary is reduced, but I would still recommend getting a complete set of the above icon sizes from your artist anyway (just in case). On the other hand, if one is building an application for only iPhone devices, shame on you; there is no excuse for not supporting the iPad nowadays.
Technical notes: The above information has been thoroughly tested using Xcode 4.0, specially created test icons, and both the iOS Simulator and a variety of physical devices. The icon images were designed to be distinguishable from each other, with single pixel borders for detecting stretching and clipping. Results were confirmed for iOS 4 on the simulator for all three types of devices: “iPad”, “iPhone”, and “iPhone (Retina)”, as well as on an original iPad (iOS 3.2), a second generation iPod touch (iOS 4.2.1), an iPhone 4 (iOS 4.2.6), and an iPad 2 (iOS 4.3.5). [Editor’s note: We have no plans to upgrade any device to iOS 5.x in the immediate future.]
In our next installment, Ten Little Images (or so), Part 2, I discuss the requirements and caveats of launch images in universal iOS applications.
Pingback: Ten Little Images (or so), Part 2 » Gamecraft - computer game software development and programming