xcode appicon使用纪要

正常步骤

  1. AppIcon需要的文件,要加入本地的工程目录下,这样才能正确打包和调用。
    注意:每一个资源icon文件,加入后,其 file inspector 的target membership 都要勾选当前目标程序,否则可能出问题

  2. 需要在asset catalog下面创建 AppIcon对象

  3. 在plist中配置正确的AppIcon 相关字段,其中CFBundleIconName字段要一模一样,注意大小写和空格,避免低级错误。

其他问题

问题1:
上传商店时,一直莫名提示:

ERROR ITMS-90713: "Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'com.xxx.xxx'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7."

解决:
原来是CFBundleIconName节点的内容错误导致,正确的内容为在plist xml文件中添加如下:

<key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>icon-20-ipad</string>
                <string>icon-20</string>
                <string>icon-29-ipad</string>
                <string>icon-29</string>
                <string>icon-40</string>
                <string>icon-60</string>
                <string>icon-76</string>
                <string>icon-83.5</string>
                <string>ItunesArtwork</string>
            </array>
            <key>CFBundleIconName</key>
            <string>AppIcon</string>
        </dict>
    </dict>

成功后,在UI中表现就是出现:
Icon files (iOS 5) 相关的节点内容

ps:刚开始不知道怎么配置,看到此字段带了个括号iOS 5,以为是陈旧的格式,随手就把这个删除了,后面一直在网上找的不对的配置格式,各种折腾都无果,最后还是在github 代码片段的帮助下搞定了这个问题。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注