RecaptchaEnterprise Framework Reference

RecaptchaClient

@interface RecaptchaClient : NSObject

Interface to interact with reCAPTCHA.

  • Executes reCAPTCHA on a user action.

    It is suggested the usage of 10 seconds for the timeout. The minimum value is 5 seconds.

    Declaration

    Swift

    func execute(withAction action: RecaptchaAction, withTimeout timeout: Double) async throws -> String

    Objective-C

    - (void)execute:(RecaptchaAction *_Nonnull)action
        withTimeout:(double)timeout
         completion:
             (nonnull void (^)(NSString *_Nullable, NSError *_Nullable))completion;

    Parameters

    action

    The user action to protect.

    timeout

    Timeout for execute in milliseconds.

    completion

    Callback function to return the execute result.

  • Executes reCAPTCHA on a user action.

    This method throws a timeout exception after 10 seconds.

    Declaration

    Swift

    func execute(withAction action: RecaptchaAction) async throws -> String

    Objective-C

    - (void)execute:(RecaptchaAction *_Nonnull)action
         completion:
             (nonnull void (^)(NSString *_Nullable, NSError *_Nullable))completion;

    Parameters

    action

    The user action to protect.

    completion

    Callback function to return the execute result.