Go to file
Flávio Caetano b7fd217d31 Initial code 2017-04-11 15:00:44 -03:00
Example Initial code 2017-04-11 15:00:44 -03:00
ReCaptcha Initial code 2017-04-11 15:00:44 -03:00
.gitignore Initial code 2017-04-11 15:00:44 -03:00
LICENSE Initial code 2017-04-11 15:00:44 -03:00
README.md Initial code 2017-04-11 15:00:44 -03:00
ReCaptcha.podspec Initial code 2017-04-11 15:00:44 -03:00
_Pods.xcodeproj Initial code 2017-04-11 15:00:44 -03:00

README.md

ReCaptcha

CI Status Version License Platform


Add Google's Invisible ReCaptcha to your project. This library automatically handles ReCaptcha's events and retrieves the validation token or notifies you to present the challenge if invisibility is not possible.

Installation

ReCaptcha is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ReCaptcha"

Usage

Simply add ReCaptchaKey and ReCaptchaDomain to your Info.plist and run:

override func viewDidLoad() {
    super.viewDidLoad()

    recaptcha.presenterView = view
    recaptcha.configureWebView { [weak self] webview in
        webview.frame = self?.view.bounds ?? CGRect.zero
        webview.tag = ViewController.webViewTag
    }
}


func validate() {
    recaptcha.validate { [weak self] result in
        dprint(try? result.dematerialize())
    }
}

Author

Flávio Caetano, flavio@vieiracaetano.com

License

ReCaptcha is available under the MIT license. See the LICENSE file for more info.