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

    view

    The view that should present the webview.

    resetOnError

    If ReCaptcha should be reset if it errors. Defaults to true.

    completion

    A 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 presenterView if 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

    configure

    A closure that receives an instance of WKWebView for configuration.

  • Resets the ReCaptcha.

    The reset is achieved by calling grecaptcha.reset() on the JS API.

    Declaration

    Swift

    open func reset()