Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simple-machines/simple-touch
Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS.
https://github.com/simple-machines/simple-touch
Last synced: 8 days ago
JSON representation
Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS.
- Host: GitHub
- URL: https://github.com/simple-machines/simple-touch
- Owner: simple-machines
- License: mit
- Created: 2015-10-22T22:55:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-19T23:54:37.000Z (almost 8 years ago)
- Last Synced: 2024-08-15T00:19:50.838Z (4 months ago)
- Language: Swift
- Size: 17.6 KB
- Stars: 120
- Watchers: 7
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ios - simple-touch - Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS. (Security / Unofficial)
- awesome-ios-star - simple-touch - Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS. (Security / Unofficial)
README
# 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 :heart: 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.