How do I specify both icons for a universal iPhone/iPad app?

IphoneIpad

Iphone Problem Overview


I hope to create a single app that supports both the iPhone and the iPad. The app works in the simulator for both devices as desired. Now I'm trying to build and deploy it. I set the "Icon File" in the plist to the 57x57 .png image and when I build and try to submit the app ItunesConnect complains about needing a 72x72 .png image for the iPad. If I specify the "Icon File" to the 72x72 .png ItunesConnect complains about needing a 57x57 image for the iPhone. How do I specify both icons in a single plist?

Iphone Solutions


Solution 1 - Iphone

Add a CFBundleIconFiles key of type Array to your Info.plist. The array should contain 2 string items: the filenames of the two icons. The OS will then automatically choose the correct icon for each platform based on their pixel dimensions.

You can keep the CFBundleIconFile key and have it point to the icon file for the iPhone for 3.0/3.1 compatibility.

Update May 2010: Apple now has Technical Note explaining this in great detail: Technical Q&A QA1686 – App Icons on iPad and iPhone

Solution 2 - Iphone

CFBundleIconFile

CFBundleIconFiles

The first can only be a string, and will be used for iphone 3.1 and earlier builds (I think). The second can be changed to Value Type "array" (right click). Then click the triangle to the left of it(so it points down), and past a value to the right. Paste a second value to include another file name.

It seems the name doesn't matter, as long as it's a PNG. The file will be chosen based on which is the right size, so only include the name of one 57x57 for iPhone and one 72x72 for iPad.

I'm currently converting Math Cards Pro to be universal, so I haven't successfully submitted a universal app to the App Store, but I'm pretty confident that all this is right.

Solution 3 - Iphone

Well, you know how you put the Default image you must put Defaultlandscape and DefaultPortrait in order for your ipad application to display both start up images when it loads either on landscape or portrait, well, i did the same thing with the icons. Since both iphone and ipad icons were named exactly the same, even though i separated them in different folders it still didn't let me, either iphone icon or ipad icon, so i renamed the iphone icon to icon~iphone and i imported it to xcode and then dragged it on the iphone icon image slot and on the plist file it automatically recognized it. So i recommend doing that, i haven't uploaded it to itunes connect but it shows no error.

Hope it helped.

Solution 4 - Iphone

Worked for me as well. Using 3.2.b5 I was able to right-click on my plist file and click "Open As... Source code". Added the info exactly as byamabe pasted above and presto - submitted. Now, if only I wasn't another hour (too) late because of this problem...

Solution 5 - Iphone

You can also add it via the built in editor.

icon.png is string 0 icon-ipad.png is string 1

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbyamabeView Question on Stackoverflow
Solution 1 - IphoneOle BegemannView Answer on Stackoverflow
Solution 2 - IphoneWilliam JanochView Answer on Stackoverflow
Solution 3 - IphoneMiguel AraujoView Answer on Stackoverflow
Solution 4 - Iphoneuser303430View Answer on Stackoverflow
Solution 5 - IphoneNathanView Answer on Stackoverflow