In our project, URLProtocol is used to intercept the request of WKWebView.loadRequest. On iOS18, if the APP is idle for more than 10 minutes and then clicks on an H5 page, the time from WKWebView.loadRequest -> URLProtocol.canInitWithRequest will be as long as 600ms or more, but the second time the H5 page is opened, it will only be 80ms. This only occurs on iOS18 models.
iOS18 WKWebView URLProtocol
Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.
I used Xcode Trace and found that the SafeBrowsing check URL would be performed for the first time. I think this is a new feature added in iOS 18, and I want to understand how it works. Is there any way to bypass the security check or embed the URL in the disk? Because I think it is too time-consuming and will affect the speed of page opening.