1

I am following the official guide provided by Google for integrating with iOS app. They only show an example for calling the excecute() method with RecaptchaAction.login action. Within Xcode editor, the RecaptchaAction object seems to only have properties for login and signup but no custom like in Android.

What am I missing to be able to execute with a custom action string?

I am working in Objective-C and the current version of RecaptchaEnterprise pod of 18.2.2

sonyisda1
  • 422
  • 1
  • 8
  • 21

1 Answers1

0

I am going to answer my own questions: yes.

Buried in the api documentation describes creating an RecaptchaAction object with custom action.

See below example code for passing a custom action named "CoolAction":

    NSString* myAction = @"CoolAction";
    RecaptchaAction* action = [[RecaptchaAction alloc] initWithCustomAction:myAction];
              
    [recaptchaClient execute:action
      completion:^void(NSString* _Nullable  token, NSError* _Nullable error) {
      if (!token) {
        NSLog (@"%@", (RecaptchaError *)error.errorMessage);
        return;
      }
      NSLog (@"%@", token);
    }];
sonyisda1
  • 422
  • 1
  • 8
  • 21