I am developing one sample Xamarin.Forms Application and in this application I'm using WebView for tyro payment gateway integration and also create WebViewRenderer for store data in localStorage of UIWebView. and I'm getting security error (SecurityError (DOM Exception 18): The operation is insecure). Tyro payment gateway web url is "https://iclient.test.tyro.com".
Please have a look below my code and help me
string subkey = "window.localStorage.setItem('webTta.integrationKey','integrationKey')";
string key ="try { "+subkey +"; } catch (e) { alert(e); }";
IntegrationKey = _uiWebView.EvaluateJavascript(key);
My issue is solved. This error was occurring by storing data before loading page. I solved this issue by call EvaluateJavascript method after loading a page. If you try to call an EvaluateJavascript method in blank WebView then it is also occurring.