使用XCode 5支持iOS 5.0图标 [英] Support of iOS 5.0 icons with XCode 5

查看:79
本文介绍了使用XCode 5支持iOS 5.0图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用新的资产目录AppIcon为iOS 5(理论上),6和7设置正确的图标。
不幸的是,在我的iPad 1(使用iOS 5.1.1)上安装应用程序时,显示的图标不正确(它从另一个图标升级,当然是57x57)。

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).

我在创建资产目录后看到,2个空条目是添加在 Info.plist 文件中:

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


  • 图标文件(iOS 5)

  • CFBundleIcons~ipad

  • Icon files (iOS 5)
  • CFBundleIcons~ipad

我读了很多解决方案,但没有什么对我有用:(

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

其中一个解决方案是在plist中添加这些条目(并在项目中添加相应的图标):

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>Icon@2x.png</string>
            <string>Icon-72.png</string>
            <string>Icon-72@2x.png</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>Icon-72@2x.png</string>
            <string>Icon-72.png</string>
        </array>
        <key>UIPrerenderedIcon</key>
        <true/>
    </dict>
</dict>

但它根本不起作用。

我正在使用XCode 5.0(5A1413)。

I'm using XCode 5.0 (5A1413).

任何帮助都会非常感激。

Any help would be really appreciated.

推荐答案

我终于找到了一个有效的解决方案。
我不再使用资产目录了。
我把这些行放在我的info.plist文件中:

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>Icon-72@2x.png</string>
    <string>Icon-57.png</string>
    <string>Icon-57@2x.png</string>
    <string>Icon-60@2x.png</string>
    <string>Icon-60.png</string>
    <string>Icon-76@2x.png</string>
    <string>Icon-76.png</string>
    <string>Icon-29@2x.png</string>
    <string>Icon-29.png</string>
    <string>Icon-50@2x.png</string>
    <string>Icon-50.png</string>
    <string>Icon-40@2x.png</string>
    <string>Icon-40.png</string>
</array>
<key>CFBundleIcons</key>
<dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string>Icon-72@2x.png</string>
            <string>Icon-57.png</string>
            <string>Icon-72.png</string>
        </array>
        <key>UIPrerenderedIcon</key>
        <true/>
    </dict>
</dict>

它现在像魅力一样:)

这篇关于使用XCode 5支持iOS 5.0图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆