A TouchID Helper with completion handler just so that you can present it whenever you need.
#Usage
- Import it wherever you need
import TouchIDHelper- Check for TouchID availability like
switch TouchIDHelper.isTouchIDAllowed {
case .Pass:
// All is good. Can use Touch ID for authentication
break
case .Fail(let error):
// TouchID cannot be used. Interrogate error to see why
break
}- Present TouchID authentication whenever && wherever you want like so:
TouchIDHelper.showTouchID("Testing Touch ID", fallbackTitle: "Fallback Method") { response in
switch response {
case .Pass:
// Successful authentication
break
case .Fail(let error):
// Authentication failed. Interrogate error to see why
break
}
}#Installation
- Clone and run
Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthageTo integrate TouchIDHelper into your Xcode project using Carthage, specify it in your Cartfile:
github "Dershowitz011/TouchIDHelper"