无法使用OpenIn功能在app中通过webbrowser打开docx文件

Sam*_*uel 1 iphone ipad ios ios5

我正在使用"OpenIn"功能并将Web浏览器中的文件打开到我的应用程序中.所有文件类型都已注册,并且工作正常.当尝试从Web浏览器打开docx,pptx或其他文件时,"打开方式"框未显示我的应用程序名称.虽然我可以使用UIDocumentInteractionController在我的应用程序中查看docx或pptx文件.我不知道问题在哪里因为它的工作非常好.

欢迎任何建议.提前感谢您的帮助

小智 15

doc UTI:com.microsoft.word.doc

docx UTI:org.openxmlformats.wordprocessingml.document

ppt UTI:com.microsoft.powerpoint.ppt

pptx UTI:org.openxmlformats.presentationml.presentation

xls UTI:com.microsoft.excel.xls

xlsx UTI:org.openxmlformats.spreadsheetml.sheet

样品:

    <dict>
        <key>CFBundleTypeName</key>
        <string>Microsoft Word 2003 XML document</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.openxmlformats.wordprocessingml.document</string>
        </array>
    </dict>
Run Code Online (Sandbox Code Playgroud)