alternateIconName保持返回nil

时间:2018-01-22 12:21:47

标签: ios xcode

我试图为我的应用设置替代图标,但由于某种原因未能这样做。虽然plist结构看起来正确,但[UIApplication sharedApplication].alternateIconName仍然保持返回nil:

<key>CFBundleIcons</key>
<dict>
    <key>CFBundleAlternateIcons</key>
    <dict>
        <key>AlternateIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>AlternateIcon</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <false/>
        </dict>
    </dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string></string>
        </array>
        <key>UIPrerenderedIcon</key>
        <false/>
    </dict>
</dict>

代码:

NSLog(@"Icon = %@",[[UIApplication sharedApplication] alternateIconName]);

打印:

Icon = (null)

1 个答案:

答案 0 :(得分:0)

RewriteCond %{QUERY_STRING} action=show&id=([0-9]+)$ RewriteRule .*$ /archives/%1? [NC,R,L] 返回nil UNLESS 已设置替代图标。