我目前在将.ppt文件导入到我的iOS应用程序时遇到问题。到目前为止,这些UTI中的每一个都可以使用,并且允许我将其对应的文件类型导入到我的应用程序中。这包括docx,doc,xslx,xsl,pptx。 .ppt是唯一拒绝让我导入的应用程序(我的应用程序的图标从不显示)。

我使用了苹果官方网站上的UTI,但仍然无法使用:https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html

有任何想法吗?

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>My Document File</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.microsoft.word.doc</string>
            <string>com.microsoft.word.wordml</string>
            <string>org.openxmlformats.wordprocessingml.document</string>
            <string>com.microsoft.excel.xls</string>
            <string>org.openxmlformats.spreadsheetml.sheet</string>
            <string>com.microsoft.powerpoint.​ppt</string>
            <string>org.openxmlformats.presentationml.presentation</string>
            <string>com.adobe.pdf</string>
            <string>com.microsoft.bmp</string>
            <string>public.jpeg</string>
            <string>public.png</string>
            <string>public.tiff</string>
            <string>com.compuserve.gif</string>
        </array>
    </dict>
</array>

最佳答案

找出原因。请勿将UTI复制并粘贴到您的Plist文件或任何其他字符串中。除了在“。”之间有一个不可见的Unicode字符外,其余字符均相同。和“ ppt”。如果使用箭头键单步操作字符串,则会发现必须点按两次以移过“ ppt”中的“ p”,因为那里有一个字符。

一旦我自己输入UTI,它就会起作用。

07-28 02:37
查看更多