objective-c – iOS:有没有办法打开受密码保护的Microsoft Office文档?

在iOS 6中,Apple添加了在Mail.app中打开受密码保护的Microsoft Office文档的功能.此功能是否以任何方式向第三方开发人员公开?当我们尝试使用UIWebView打开这样的文档时,我们遇到异常:CMTopExceptionDocumentIsEncrypted.堆栈跟踪如下所示:

0   MyTestApp                           0x000025a0 start + 0,
1   OfficeImport                        0x125ceb91 +[WMTop fillHTMLArchiveForOfficeData:fileName:xmlFlag:archiver:] + 603,
2   OfficeImport                        0x125e6f3a OIPreviewFillHTMLForDocumentData + 93,
3   OfficeImport                        0x125e6e48 OIPreviewProcessWithDataAndOptions + 154,
4   QuickLook                           0x08a8b7d2 OIGenerateProgressivePreviewForData + 267,
5   QuickLook                           0x08aafb1f -[QLBasePreviewParts computePreview] + 463,
6   QuickLook                           0x08a8fabb -[QLPreviewParts computePreviewInThread] + 315,
7   Foundation                          0x0078b0d5 -[NSThread main] + 76,
8   Foundation                          0x0078b034 __NSThread__main__ + 1304,
9   libsystem_c.dylib                   0x969a8557 _pthread_start + 344,
10  libsystem_c.dylib                   0x96992cee thread_start + 34

有谁知道怎么解决这个问题?

最佳答案 使用QLPreviewController来呈现代替UIWebView的内容会导致显示密码提示.

点赞