Reactive

public extension Reactive where Base: ReCaptcha

Provides a public extension on ReCaptcha that makes it reactive.

Available where Base: ReCaptcha

  • Starts the challenge validation uppon subscription.

    The stream’s element is a String with the validation token.

    Sends stop() uppon disposal.

    Declaration

    Swift

    func validate(on view: UIView, resetOnError: Bool = true) -> Observable<String>

    Parameters

    view

    The view that should present the webview.

    resetOnError

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

  • Resets the ReCaptcha.

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

    Declaration

    Swift

    var reset: AnyObserver<Void> { get }
  • Notifies when the webview finishes loading all JS resources

    This Observable may produce multiple events since the resources may be loaded multiple times in case of error or reset. This may also immediately produce an event if the resources have already finished loading when you subscribe to this Observable.

    Declaration

    Swift

    var didFinishLoading: Observable<Void> { get }