IOS version on which the error is reproduced: 10.3.2
Code works correctly on iOS 10.3.1 and earlier
Whenever I try to load the youtube video URL into a UIWebView, I get the following error:
The operation could not be completed. (NSURLErrorDomain error -999.)
Downloading a UIWebView request is simple and is done as shown below:
// ... let urlRequest = URLRequest(url: url) self.webView.loadRequest(urlRequest) // URL is: https://www.youtube.com/watch?v=hntVmN2aK8k func webView(_ webView: UIWebView, didFailLoadWithError error: Error) { print(error.localizedDescription) // The operation could not be completed. (NSURLErrorDomain error -999.) }
source share