ReCaptchaWebViewManager
open class ReCaptchaWebViewManager
Handles comunications with the webview containing the ReCaptcha challenge.
-
Starts the challenge validation
Declaration
Swift
open func validate(on view: UIView, resetOnError: Bool = true, completion: @escaping (ReCaptchaResult) -> Void)Parameters
viewThe view that should present the webview.
resetOnErrorIf ReCaptcha should be reset if it errors. Defaults to
true.completionA closure that receives a ReCaptchaResult which may contain a valid result token.
-
Stops the execution of the webview
Declaration
Swift
open func stop() -
Provides a closure to configure the webview for presentation if necessary.
If presentation is required, the webview will already be a subview of
presenterViewif one is provided. Otherwise it might need to be added in a view currently visible.Declaration
Swift
open func configureWebView(_ configure: @escaping (WKWebView) -> Void)Parameters
configureA closure that receives an instance of
WKWebViewfor configuration. -
Resets the ReCaptcha.
The reset is achieved by calling
grecaptcha.reset()on the JS API.Declaration
Swift
open func reset()
ReCaptchaWebViewManager Class Reference