in WKWebView
on loading url get
Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSErrorFailingURLStringKey="https://xxxxxxxxx", NSErrorFailingURLKey="https://xxxxxxxxx", _WKRecoveryAttempterErrorKey=}
I got this error not always but randomly
-999 error code means NSURLErrorCancelled.
This happens when the past request is cancelled.
func webView(webView: WKWebView, didFailNavigation navigation: WKNavigation, withError error: NSError) {
print(error)
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.