【发布时间】:2022-11-11 13:58:31
【问题描述】:
在 WKWebView 中加载 URL 时会导致安全警告,之后应用程序会崩溃。
UIApplicationMain 中的警告 - This method should not be called on the main thread as it may lead to UI unresponsiveness.
如何解决这个问题?有没有人面临同样的问题并解决它?
【问题讨论】:
-
有同样的问题,似乎是苹果错误
在 WKWebView 中加载 URL 时会导致安全警告,之后应用程序会崩溃。
UIApplicationMain 中的警告 - This method should not be called on the main thread as it may lead to UI unresponsiveness.
如何解决这个问题?有没有人面临同样的问题并解决它?
【问题讨论】:
您可以尝试在块 DispatchQueue.main.async { } 中调用此方法
【讨论】: