具体而言,视频未在一个 iPad 中播放

Video is not playing in one iPad specifically

我正在为 iOS 开发一个应用程序,其中包含一个 UIWebView,其中包含一个视频(存储在本地,与一些正确显示的图像位于同一文件夹中)。

这在我自己的 iPad 中运行良好,但我在工作时得到了另一个用于安装该应用程序的应用程序,它只显示视频控件。当我点击播放按钮时没有任何反应。 iPad 归公司所有,因此可以启用任何安全功能。

我已经研究了很多,但我找不到任何原因可以解释为什么该应用程序可能在一个 iPad 上运行而不在另一个上运行。我知道如果没有密码或类似的东西可能无法修复,但我至少需要知道哪种配置可能导致应用程序无法运行。

使用 WKWebView 修复了它。除非特别需要,否则不应再使用 UIWebView。

来自 Apple 文档:

In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView. Additionally, consider setting the WKPreferences property javaScriptEnabled to false if you render files that are not supposed to run JavaScript.