WKWebView支持哪些文件类型? [英] What File Types are Supported by WKWebView?

查看:880
本文介绍了WKWebView支持哪些文件类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UIWebView 支持整个文件类型列表,详见此Apple Technical Q& A doc

UIWebView supports a whole list of file types, as detailed in this Apple Technical Q&A doc:

除了HTML内容之外, UIWebView 可以显示特定的文档类型。

In addition to HTML content, UIWebView can display specific document types.


iPhone OS 2.2.1支持以下文档类型:

iPhone OS 2.2.1 supports the following document types:

Excel (.xls)
Keynote (.key.zip)
Numbers (.numbers.zip)
Pages (.pages.zip)
PDF (.pdf)
Powerpoint (.ppt)
Word (.doc)

iPhone OS 3.0支持以下附加文档类型:

iPhone OS 3.0 supports these additional document types:

Rich Text Format (.rtf)
Rich Text Format Directory (.rtfd.zip)
Keynote '09 (.key)
Numbers '09 (.numbers)
Pages '09 (.pages)


哪个好。但是现在他们通常建议开发人员使用 WKWebView 而不是 UIWebView ,因为它更快,并提供了显着的JavaScript性能改进。这很好,除了我找不到支持的文件类型列表。

Which is great. These days however they generally advise that developers use WKWebView instead of UIWebView as it's faster and offers significant JavaScript performance improvements. This is great, except that I can't find a list of file types that are supported.

它似乎支持媒体文件(例如Quicktime .mov文件)哪个 UIWebView 没有,但现在Word文档(.docx)似乎不起作用。 是否有 WKWebView 支持的文件格式列表?

It does appear to support media files (such as Quicktime .mov files) which UIWebView did not, but now Word documents (.docx) do not seem to work. Is there a list of file formats that are supported by WKWebView?

推荐答案

我有同样的问题。我向Apple提出了技术支持事件并收到了这个答复(2017年9月21日):

I had the same question. I lodged a Technical Support Incident with Apple and received this answer (21st Sep 2017):



  1. 所有Microsoft文档支持。

  2. 支持所有iWork文档。

  3. 如果UIWebView将呈现文档类型,那么WKWebView也将支持。


在运行10.3.3的iOS设备和Xcode 9.0 iOS 11.0模拟器上,以上似乎都有效。我可以在 QA 1630

On an iOS device running 10.3.3 and the Xcode 9.0 iOS 11.0 simulator, the above seems to work. I can display a range of MS Office documents (including docx, pptx, xlsx) as well as the UIWebView ones documented by Apple in QA 1630.

上面的列表至少缺少各种图像格式,所以它显然不完整。如果我从Apple获得更多信息,我将更新此答案...

The above list is however lacking at least the various image formats, so it's clearly incomplete. If I get more information from Apple I'll update this answer...

(错误报告17972625请求更新WKWebView的文档以精确指定它实际支持的格式,如果您想向 Apple Bug Reporter 提交副本。)

(Bug report 17972625 requests WKWebView's documentation be updated to precisely specify what formats it does actually support, if you care to submit a duplicate to Apple Bug Reporter.)

这篇关于WKWebView支持哪些文件类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆