iOS 14 WKWebView loads content has a siginificant delay.

Test in Xcode 12.0 beta 3 and simulator.
When call load/loadHTMLString/loadFileURL methods to load webpage or html string, there is an obvious delay(20~30 seconds) before loading actually starts.
Another thing is:
If restart simulator, first-time WKWebView loading speed is normal, but if terminate app and re-launch, WKWebView becomes slow for loading content, and in Xcode console, log as below will be shown:
Code Block
[Process] 0x7fa53e81d020 - [pageProxyID=6, webPageID=7, PID=3679] WebPageProxy::processDidBecomeUnresponsive:


Anybody knows how this happened.
Answered by BD-JHunter in 629196022
Test in beta 5, seems like be fixed.
Same issue in my project. Still there in beta 4
I'm experiencing the same thing on my actual iPhone 8 in iOS 13.6
Same issue here. Probably worth a feedback. I've filed it as FB8285319.
Getting same issue with Xcode 12 beta-3 and beta-4. Same code works fine with Xcode11.
Xcode 12 beta logs are below. If anybody finds a solution, please help.
WF: userSettingsForUser : (null)
WF:
WebFilterIsActive returning: NO
Same issue here.
Accepted Answer
Test in beta 5, seems like be fixed.
Seeing this again in Xcode 12.5. Strange thing is I'm not loading any WKWebView on app start.

I too am experiencing occasional delays when attempting to load a URL in a WKWebView. didStartProvisionalNavigation gets called and then there is a consistent 30-32 second delay before the request is actually made and decidePolicyFor navigationResponse is called. This is happening in Xcode 12.5.1 running on a iOS 14.8 device.

In July 2022 I am still experiencing 30s (32-second, as best I can tell) delays when a user clicks on a link. There is no network delay and no DNS translation delay, since the web server is running in a thread in the application itself and the URL includes the IP address 127.0.0.1 so no DNS translation is needed. It really takes 32s for wkWebView to follow the link!!! In comparison, using the deprecated UIWebView works just fine, meaning there is no noticeable delay when clicking on a link.

In contrast, using the recommended wkWebView consistently shows the same ~30s delay when clicking on a link. I've observed this on both an iPhone running iOS 15.6 and the simulator running iOS 15.5. I am using the latest Xcode, version 13.4.1. While the app is frozen waiting for the link to be followed, in Xcode's debug window I occasionally get the message "Discarding message for event 0 because of too many unprocessed messages".

There is obviously a purposeful 32s delay built into some wkWebView link-following code. How can I avoid this delay?

iOS 14 WKWebView loads content has a siginificant delay.
 
 
Q