Search code examples
iosiphoneipadcaptcharecaptcha

How could we integrate the Captcha in iOS application?


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 available for iOS or not? I didn't found any plugin for iOS there. Somewhere while RND i come to know that "its not needed for the mobile apps" , But the client wants the Captcha in his application so ,I want to know :-

  • Whether we can integrate the Captcha in iOS App/Mobile Apps :-

    1. If Yes? : Then what would be the relevant way to integrate it.

    2. If No? : Then what is the relevant reason .


Solution

  • 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.