0

I am working on Xamarin iOS platform while loading a URL in webview I am getting the error

The operation couldn’t be completed. (NSURLErrorDomain error -999.)

I have also added the NSAppTransportSecurity key in info.plist

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

But it is not working. Please help me to resolve this issue.

Navaneethan
  • 1,029
  • 1
  • 9
  • 15

1 Answers1

0

This error occurs due to a request is made before the previous request of WebView is completed

Based on this answer

Just ignore the error in the LoadFailed(UIWebView webView, NSError error) delegate method.

Try this code

public override void LoadFailed(UIWebView webView, NSError error)
{
    if (error.Code == -999) 
    {
      // Show some alert or just ignore the error
    }
}

Also, check you have a proper network connection

Hope it will solve your problem