我目前在将 .ppt 文件导入我的iOS应用时遇到问题。到目前为止,这些UTI中的每一个都在工作,并允许我将相应的文件类型导入到我的应用程序中。这包括docx,doc,xslx,xsl,pptx。唯一拒绝让我导入(我的应用程序的图标永不显示)的是 .ppt 。
我使用了Apple官方网站上的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>
答案 0 :(得分:3)
找出原因。不要将UTI复制并粘贴到Plist文件或任何其他字符串中。它是完全相同的字符,除了'。'之间有一个不可见的Unicode字符。和'ppt'。如果你用箭头键翻阅字符串,你会发现你必须点击两次才能越过'ppt'中的'p',因为那里有一个字符。
一旦我自己输入UTI,就可以了。