我们如何在iOS应用程序中集成Captcha? [英] How could we integrate the Captcha in iOS application?

查看:289
本文介绍了我们如何在iOS应用程序中集成Captcha?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iOS应用中搜索了 Captcha 的集成,但没有找到任何相关的方法。即使我使用 reCAPTCHA 注册并搜索了Captcha的插件是否适用于iOS?我没有找到iOS的任何插件。在RND的某个地方,我知道它不需要移动应用程序,但是客户想在他的应用程序中使用Captcha,我想知道: -

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 :-


  • 我们是否可以在iOS App / Mobile Apps中集成Captcha: -

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


  1. 如果是? :那么整合它的相关方法是什么。

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

如果不是? :那么相关的原因是什么。

If No? : Then what is the relevant reason .


推荐答案

虽然我们在iOS中没有任何适用于Captcha的API,但即使 reCaptcha 也没有为iOS提供任何插件。甚至很多人都建议我不需要为移动应用程序实现验证码。我同意了,但由于客户无法理解我所做的任何借口,

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. 我只是创造了随机数使用

  1. simply i created the Random number using

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

将该号码放在标签上并要求用户在提供的textField中输入相同的号码,如果找到匹配项验证码的主要部分已经完成[另一端的用户是人类是集成验证码的唯一原则],其他方面我重新生成随机数并将其再次放在标签上,要求用户在提供的textField中输入相同的数字。 br>
最终结果将是这样的。

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.

现在这个想法可能会更清楚了,只需分配函数的输出randomIntBetween显示号码的标签,以及当用户按下登录按钮时,验证textField(名称:输入号码)中的文本是否与其左侧的标签匹配,如果匹配则允许用户登录如果没有那么然后清除文本字段的文本以及标签上的文本然后通过调用方法randomIntBetween:将新的随机数分配给左边的标签并要求用户输入文本输入数字文本字段。

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.

这篇关于我们如何在iOS应用程序中集成Captcha?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆