Closed astr0-4 closed 1 year ago
There's a limitation on WKWebView where it only executes the JS content when the view is part of the visible view hierarchy. That's why the library asks for a view during validation time.
If you want to present the webview on a modal, you could try removing it from the current superview and adding it to the view controller you will be presenting, but tbh, I have no idea if that will work or not.
If you decide to go on that route, let us know if it works.
The way I would like to use this is to do the validation in the background, and then if the captcha needs to be displayed, present that webview in a modal view controller where the user can press back or cancel.
But it seems like we can only add the view as a subview to the current view? If I could just get notified when the captcha is ready to be displayed I think I could present a view controller with the captcha webview. This seems like a pretty common use case, maybe I am just setting up the recaptcha wrong?