简体   繁体   中英

How do I associate icons to zip file type with an iPhone/iPad application?

Here is my code in plist file. It run correctly but the icon was not displayed.

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array>
            <string>iPad-320.png</string>
            <string>iPad-64.png</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>Zip Archive</string>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.pkware.zip-archive</string>
        </array>
    </dict>
</array>

I think you should use CFBundleIconFiles like this:

<key>CFBundleIconFiles</key>
<array>
    <string>icon.png</string>
    <string>icon@2x.png</string>
    <string>icon-72.png</string>
</array>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM