How could we integrate the Captcha in iOS application?

前端 未结 3 840
旧时难觅i
旧时难觅i 2020-12-29 08:45

I googled for integration of Captcha in iOS app but do not found any relevant way to do so. Even i sign up with reCAPTCHA and searched whether the plugins for Captcha are av

3条回答
  •  天涯浪人
    2020-12-29 09:40

    Though we do not have any of the API for Captcha in iOS , not even the reCaptcha has provided any plugin for iOS . And even lot of peoples suggested me that there is no need to implement the captcha for mobile applications. I agreed, but as the client was not be able to listen any excuses what i have done is,

    1. simply i created the Random number using

      -(NSInteger)randomIntBetween:(NSInteger)min and:(NSInteger)max { return (NSInteger)(min + arc4random_uniform(max + 1 - min)); }

      placed that number on label and asked user to enter the same number in in provided textField, If the match is found the captcha's principal is done [The user on the other end is human being is the only principal to integrate captcha], Other wise i regenerate the random number and place it there again on the label asking user to enter same number in provided textField.
      Final Result will be like this.

    It Will Look Something Like This

    Now the idea might be more clear to you, Simply assign the output of the function "randomIntBetween" to the label on which the number is displayed, and when the user will press the login button authenticate whether the text in the textField(Named: Enter number) is matches with the label on its left, if it matches allow the user to login if not then clear then text of text field and also the text on label then assign the new random number to the label on left by calling the method "randomIntBetween:" and ask user to enter the text in the enter number text field.

提交回复
热议问题