Giter VIP home page Giter VIP logo

simple-touch's Introduction

SimpleTouch

Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS.

Sample Project

There is a SimpleTouchDemo target defined in the project file. This will run in the Simulator or on a device.

Installation

Carthage

Add the following to your Cartfile

github "simple-machines/simple-touch"

Manual

  • Drag and drop SimpleTouch.xcodeproj into your project in Xcode.
  • Add the SimpleTouch framework SimpleTouch (SimpleTouch) as a Target Dependency in Build Phases in your project.
  • Add SimpleTouch.framework in the Link Binary With Libraries step in Build Phases in your project if it's not there already.

Use

First of all, import the framework:

import SimpleTouch

Then, check for Touch ID support:

switch SimpleTouch.isTouchIDEnabled {
case .Success:
  // All is good. Can use Touch ID for authentication
  break
case .Error(let error):
  // TouchID cannot be used. Interrogate error to see why
  break
}

Finally, attempt to authenticate with Touch ID:

SimpleTouch.presentTouchID("Testing Touch ID", fallbackTitle: "Fallback Method") { response in
  switch response {
  case .Success:
    // Successful authentication
    break
  case .Error(let error):
    // Authentication failed. Interrogate error to see why
    break
  }
}

Contributing

We ❤️ pull requests. If you'd like to see new features, fix bugs, or lodge issues then please do so via Github.

License

SimpleTouch is released under an MIT license. See LICENSE.md for more information.

simple-touch's People

Contributors

rickerbh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.