Search code examples
iosxcodeios5icons

Support of iOS 5.0 icons with Xcode 5


I'm using the new asset catalog AppIcon to set the right icons for iOS 5 (in theory), 6 and 7. Unfortunately, when installing the application on my iPad 1 (with iOS 5.1.1), the displayed icon is not the right one (it's upscaled from another one, certainly the 57x57 one).

I saw that after creating the asset catalog, 2 empty entries are added in the Info.plist file:

  • Icon files (iOS 5)
  • CFBundleIcons~ipad

I've read a lot of "solutions", but nothing worked for me :(

One of the solution was to add these entries in the plist (and add the corresponding icons in the project):

<key>CFBundleIcons</key>
<dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string>Icon.png</string>
            <string>[email protected]</string>
            <string>Icon-72.png</string>
            <string>[email protected]</string>
        </array>
        <key>UIPrerenderedIcon</key>
        <true/>
    </dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string>Icon-Small</string>
            <string>Icon-Small-50</string>
            <string>[email protected]</string>
            <string>Icon-72.png</string>
        </array>
        <key>UIPrerenderedIcon</key>
        <true/>
    </dict>
</dict>

But it's not working at all.

I'm using Xcode 5.0 (5A1413).

Any help would be really appreciated.


Solution

  • I finally found a working solution. I don't use anymore the asset catalog. And I put these lines in my info.plist file:

    <key>CFBundleIconFile</key>
    <string>Icon-57.png</string>
    <key>CFBundleIconFiles</key>
    <array>
        <string>Icon-72.png</string>
        <string>[email protected]</string>
        <string>Icon-57.png</string>
        <string>[email protected]</string>
        <string>[email protected]</string>
        <string>Icon-60.png</string>
        <string>[email protected]</string>
        <string>Icon-76.png</string>
        <string>[email protected]</string>
        <string>Icon-29.png</string>
        <string>[email protected]</string>
        <string>Icon-50.png</string>
        <string>[email protected]</string>
        <string>Icon-40.png</string>
    </array>
    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>[email protected]</string>
                <string>Icon-57.png</string>
                <string>Icon-72.png</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <true/>
        </dict>
    </dict>
    

    It's working like a charm now :)