From c3d53364f2d34998730a3008fdc70df2ee6e7c11 Mon Sep 17 00:00:00 2001 From: George Oastler Date: Mon, 9 Dec 2024 11:20:32 +0000 Subject: [PATCH] add baseurl to allow localstorage --- demos/ios-webview/procaptcha/ContentView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demos/ios-webview/procaptcha/ContentView.swift b/demos/ios-webview/procaptcha/ContentView.swift index d5ac5f460..b0551a210 100644 --- a/demos/ios-webview/procaptcha/ContentView.swift +++ b/demos/ios-webview/procaptcha/ContentView.swift @@ -49,7 +49,8 @@ struct WebView: UIViewRepresentable { webView.isInspectable = true //DispatchQueue.main.asyncAfter(deadline: .now() + 30) { - webView.loadHTMLString(htmlString, baseURL: nil) + // baseURL must be set for localstorage to work. If localstorage is not required, it can be set to nil. Localstorage errors appear like "SecurityError: The operation is insecure." + webView.loadHTMLString(htmlString, baseURL: URL(string: "https://prosopo.io")) //} return webView