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

Overview

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.

You might also like...
A simple Swift Keychain Wrapper for iOS, watchOS, and OS X.

Latch A simple Swift 2.0 Keychain Wrapper for iOS, watchOS 2, and OS X. Usage A proper example of how to use Latch can be seen in the tests. import La

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.

SwiftKeychainWrapper A simple wrapper for the iOS / tvOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift. Prov

Simple Objective-C wrapper for the keychain that works on Mac and iOS

SAMKeychain SAMKeychain is a simple wrapper for accessing accounts, getting passwords, setting passwords, and deleting passwords using the system Keyc

A really simple key-value wrapper for keychain.

PlainKeychain A really simple key-value wrapper for keychain. Features ✅ Key-value pairs using kSecClassGenericPassword. ❌ Internet passwords (kSecCla

A wrapper to make it really easy to deal with iOS, macOS, watchOS and Linux Keychain and store your user's credentials securely.

A wrapper (written only in Swift) to make it really easy to deal with iOS, macOS, watchOS and Linux Keychain and store your user's credentials securely.

A wrapper for Apple's Common Crypto library written in Swift.

IDZSwiftCommonCrypto A Swift wrapper for Apple's CommonCrypto library. IDZSwiftCommonCrypto works with both CocoaPods and Cathage. For more details on

Helper/wrapper for mautrix-imessage for jailbroken devices

Brooklyn This readme is out-of-date. Blame Ethan, he's working on it. Components Rubicon "The die is cast." Crosses Apple's last river between IMCore

Wrapper class for handling all tasks related to RSA cryptography

RSAWrapper Wrapper class for handling all tasks related to RSA cryptography USAG

Simple and secure hashing in Swift with the SipHash algorithm

SipHash ⚠️ WARNING This package has been obsoleted by the Hasher type and the Hashable.hash(into:) requirement introduced in Swift 4.2. Using this pac

Comments
  • Cant install with Carthage

    Cant install with Carthage

    Attempting to install via Carthage using Xcode 8 and Swift 3 but getting the following errors.

    *** Fetching simple-touch
    *** Checking out simple-touch at "1.0.0"
    *** xcodebuild output can be found in /var/folders/1v/zv6mks3n3ynbx2hn9hgmy7840000gn/T/carthage-xcodebuild.GT9KOD.log
    *** Building scheme "SimpleTouch" in SimpleTouch.xcodeproj
    ** CLEAN FAILED **
    
    
    The following build commands failed:
            Check dependencies
    (1 failure)
    ** BUILD FAILED **
    
    
    The following build commands failed:
            Check dependencies
    (1 failure)
    A shell task (/usr/bin/xcrun xcodebuild -project /Users/geoherna/Desktop/Swift/Vibrate/Carthage/Checkouts/simple-touch/SimpleTouch.xcodeproj -scheme SimpleTouch -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
    ** CLEAN FAILED **
    
    
    The following build commands failed:
            Check dependencies
    (1 failure)
    ** BUILD FAILED **
    
    
    The following build commands failed:
            Check dependencies
    (1 failure)
    

    Tried both carthage update --platform iOS and carthage update --platform iOS --no-use-binaries any suggestions?

    opened by geoherna 0
Owner
Simple Machines
Simple Machines
Simple Machines
Wi-attack: Cross-technology Impersonation Attack against iBeacon Services

Wi-attack: Cross-technology Impersonation Attack against iBeacon Services

Naxin 3 Nov 30, 2021
An iOS passcode lock with TouchID authentication written in Swift.

PasscodeLock A Swift implementation of passcode lock for iOS with TouchID authentication. Installation PasscodeLock requires Swift 2.0 and Xcode 7 Car

Yanko Dimitrov 679 Nov 26, 2022
An iOS passcode lock with TouchID authentication written in Swift.

PasscodeLock A Swift implementation of passcode lock for iOS with TouchID authentication. Originally created by @yankodimitrov, hope you're doing well

Serge Velikan 203 Dec 6, 2022
Two-Factor Authentication Client for iOS

Authenticator Two-Factor Authentication Client for iOS. Authenticator is a simple, free, and open source two-factor authentication app. It helps keep

Matt Rubin 770 Dec 30, 2022
An easy-to-use, open-source two-factor authentication app designed specifically for iOS.

Tofu An easy-to-use, open-source two-factor authentication app designed specifically for iOS. Tofu generates one-time passwords to help you protect yo

Calle Luks 380 Jan 8, 2023
The TouchID authentication mechanism implemented in Swift.

iOS-TouchID-Swift The TouchID authentication mechanism implemented in Swift About In iOS 8, Apple provides a new framework named LocalAuthentication w

Gabriel Theodoropoulos 24 May 20, 2018
Use Apple FaceID or TouchID authentication in your app using BiometricAuthentication.

BiometricAuthentication Use Apple FaceID or TouchID authentication in your app using BiometricAuthentication. It's very simple and easy to use that ha

Rushi Sangani 804 Dec 30, 2022
LocalAuth - Another Fusion library to implement the local authentication using Biometry

FusionLocalAuth Another Fusion library to implement the local authentication usi

Vedant Jha 0 Jan 13, 2022
The minimalistic, secure and open-source two-factor authentication app.

Einmal /ˈainmaːl/ German: once The minimalistic, secure and open-source two-factor authentication app. Features ♻️ Cross-platform — available on Andro

Incipher 75 Aug 21, 2022
Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS.

KeychainAccess KeychainAccess is a simple Swift wrapper for Keychain that works on iOS and OS X. Makes using Keychain APIs extremely easy and much mor

Kishikawa Katsumi 7.2k Dec 30, 2022