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 -> StringObjective-C
- ( void ) execute :( RecaptchaAction * _Nonnull ) action withTimeout :( double ) timeout completion : ( nonnull void ( ^ )( NSString * _Nullable , NSError * _Nullable )) completion ;Parameters
actionThe user action to protect.
timeoutTimeout for execute in milliseconds.
completionCallback 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 -> StringObjective-C
- ( void ) execute :( RecaptchaAction * _Nonnull ) action completion : ( nonnull void ( ^ )( NSString * _Nullable , NSError * _Nullable )) completion ;Parameters
actionThe user action to protect.
completionCallback function to return the execute result.
-
Deprecated
Use method execute(withTimeout:completionHandler) instead
Executes reCAPTCHA on a user action.
This method throws a timeout exception after 10 seconds.
Declaration
Swift
func execute ( _ action : RecaptchaAction ) async -> ( RecaptchaToken ?, RecaptchaError ?)Objective-C
- ( void ) execute :( RecaptchaAction * _Nonnull ) action completionHandler : ( nonnull void ( ^ )( RecaptchaToken * _Nullable , RecaptchaError * _Nullable )) completionHandler ;Parameters
actionThe user action to protect.
completionHandlerCallback function to return the execute result.

