Skip to content

Commit

Permalink
add baseurl to allow localstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler committed Dec 9, 2024
1 parent 04c5b0e commit c3d5336
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion demos/ios-webview/procaptcha/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3d5336

Please sign in to comment.