tags:

views:

235

answers:

3

I have created 3 files for the app icon: Icon.png, Icon-72.png, and [email protected]. [email protected] shows up fine on the actual iPhone 4. The simulator, however, only uses the 57px version. With the iPad neither the simulator nor the iPad itself uses the Icon-72.png file. Only the 57px version.

Help! :)

+3  A: 

Did you add the icons to the Info.plist? You will need to make sure you added in an entry for "CFBundleIconFiles" and add each into the list. You can see it at the Apple Developer website with screenshots there:

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

If you don't do that, it will only use the one icon.

christophercotton
That works if you're only deploying to iOS 3.2 and greater. I need to build to 3.0 as my minimum. Apple spells out the naming convention that should work for 3.2 and 4.0 to grab the right icons based on their name: http://developer.apple.com/iphone/library/documentation/iphone/conceptual/iphoneosprogrammingguide/BuildTimeConfiguration/BuildTimeConfiguration.html#//apple_ref/doc/uid/TP40007072-CH7-SW1
Yeah, I see that the name works. I wonder if you can still use the CFBundleIconFiles, since it lets me use that and set the "Deployment SDK version" to 3.0. I don't have a 3.x device to test it on though. Since I assume you are compiling against the 4.0 SDK. I believe all AppStore submissions require that or 3.2.Also, I assume you have checked that the Icon-72.png is selected for the target you are building?
christophercotton
+3  A: 

If you want the iPad to pick up multiple icons without specifying their names, make sure CFBundleIconFile (the singular of the other suggestion) is unset. If it's set to a particular icon file, that icon will always be used, regardless of which device you're on.

Though christophercotten is correct about the 3.2+ method for specifying multiple icon files, if they're different from the default values.

Nick
I tested it out on the iPad simulator, and by deleting the "Icon File" it did use the Icon-72.png file. Adding in the "Icon File" with Icon.png made it fail.
christophercotton
Yeah, brotha! Thanks a million, Nick. I wish the Apple docs were clearer on this point. Hopefully others will find this.
+1  A: 

This is what works for me across 6 different projects on iPhone and iPad. The Info.plist file has these entries:

<key>CFBundleIconFile</key>
<string>Icon</string>
<key>CFBundleIconFiles</key>
<array>
    <string>Icon.png</string>
    <string>Icon-58.png</string>
    <string>Icon-72.png</string>
    <string>Icon-114.png</string>
    <string>Icon-Small-50.png</string>
    <string>Icon-Small.png</string>
</array>

Note that the CFBundleIconFile is set. I have had no problems with including it.

And the icon files are all in PNG format and have these file names and sizes:

  • Icon.png, 57px.
  • Icon-58.png, 58px
  • Icon-72.png, 72px
  • Icon-114.png, 114px.
  • Icon-Small.png, 29px.
  • Icon-Small-50.png, 50px.

Make sure your project is copying the icon PNG files to your app bundle for all targets. I'm building and linking against the iOS 4.0 SDK, with the Deployment target set to 3.1.3.

lucius