长按链接后按“打开链接”时,WKWebView变为黑色

问题描述

我正在快速编程,遇到一个错误,我的WKWebView在“ Safari”中“打开链接”或“添加到照片”后变成黑色。

所以我得到了WebView,一切正常。但是,当我长按(例如图像)时,Apple下拉菜单打开,并带有“打开链接”,“添加到阅读列表”,...,“添加到照片”。现在,当我再次关闭下拉菜单并转到主屏幕并再次打开该应用程序时,Web视图将变为黑色。控制台说它正在加载并完成了操作,但是我什么也看不到。有人知道可能的问题吗?

当我在下拉菜单中按“打开链接”时,Safari浏览器将打开该链接。但是当我回到应用程序时,屏幕变黑。这是再次打开我的应用程序后控制台的代码。

--------------------- SCENEDELEGATE sceneWillEnterForeground ---------------------

2020-08-13 13:48:38.560642+0200 GMP[1817:418564] [ProcessSuspension] 0x282f2aa00 - WKProcessAssertionBackgroundTaskManager: Ignored request to start a new background task because the application is already in the background
2020-08-13 13:48:38.561286+0200 GMP[1817:418564] [ProcessSuspension] 0x282f2aa00 - WKProcessAssertionBackgroundTaskManager: Ignored request to start a new background task because the application is already in the background
--------------------- SCENEDELEGATE sceneDidBecomeActive ---------------------
currentUrl: https://myWebPage.com/
loadUrl(link: https://myWebPage.com/)
didStartProvisionalNavigation webView(_:didStartProvisionalNavigation:)
didCommit webView(_:didCommit:)
2020-08-13 13:48:39.341814+0200 GMP[1817:418614] [assertion] Error acquiring assertion: <NSError: 0x282ff4db0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x102c8f640; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-08-13 13:48:39.341902+0200 GMP[1817:418614] [ProcessSuspension]  0x1094e0438 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1819
2020-08-13 13:48:39.342137+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e0438 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.342917+0200 GMP[1817:418614] [assertion] Error acquiring assertion: <NSError: 0x282ff4de0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x1040ae040; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-08-13 13:48:39.342998+0200 GMP[1817:418614] [ProcessSuspension]  0x1094e0460 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1817
2020-08-13 13:48:39.343085+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e0460 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.343851+0200 GMP[1817:418614] [assertion] Error acquiring assertion: <NSError: 0x282ffcea0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x10415ddb0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-08-13 13:48:39.343954+0200 GMP[1817:418614] [ProcessSuspension]  0x1094e0488 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1818
2020-08-13 13:48:39.344028+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e0488 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.905526+0200 GMP[1817:418815] [assertion] Error acquiring assertion: <NSError: 0x282f3b690; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x10414ea00; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-08-13 13:48:39.905574+0200 GMP[1817:418815] [ProcessSuspension]  0x1094e20a8 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1819
2020-08-13 13:48:39.905602+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e20a8 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.906163+0200 GMP[1817:418815] [assertion] Error acquiring assertion: <NSError: 0x282f39590; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x102d4d0c0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-08-13 13:48:39.906196+0200 GMP[1817:418815] [ProcessSuspension]  0x1094e20d0 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1817
2020-08-13 13:48:39.906218+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e20d0 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.906769+0200 GMP[1817:418815] [assertion] Error acquiring assertion: <NSError: 0x282f391d0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
    userInfo = {
        RBSAssertionAttribute = <RBSLegacyAttribute: 0x102c66420; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
    }
}
2020-08-13 13:48:39.906803+0200 GMP[1817:418815] [ProcessSuspension]  0x1094e20f8 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1818
2020-08-13 13:48:39.906828+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e20f8 - ProcessAssertion::processAssertionWasInvalidated()
didFinish webView(_:didFinish:)
didSet currentUrl = https://myWebPage.com/

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...