在使用iOS功能时,为什么我们仅限于最常用的UTI?

时间:2013-11-13 19:03:46

标签: ios7 plist info.plist uti

我正在尝试创建一个支持pdf和ppt文件“打开”的应用程序。将此xml添加到info-plist

    <key>CFBundleDocumentTypes</key>
    <array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array>
            <string>Icon1.png</string>
            <string>Icon2.png</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>My Document</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.adobe.pdf </string>
            <string>com.microsoft.powerpoint.​ppt</string>
        </array>
    </dict>
</array>
<key>UIFileSharingEnabled</key>
<true/>

令人惊讶的是它不起作用,但如果我用public.item替换LSIContentTypes数组中的两个条目,一切都会顺利进行。有谁看到了恐怖的地方?

0 个答案:

没有答案