• Stars
    star
    965
  • Rank 47,414 (Top 1.0 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 10 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Touch ID and Passcode framework used in the Venmo app.

VENTouchLock

Build Status

VENTouchLock secures your app by requiring a Touch ID fingerprint scan or passcode to gain access when the app is launched cold or from the background. It is used in the official Venmo app.

Installation

The easiest way to get started is to use CocoaPods. Just add the following line to your Podfile:

pod 'VENTouchLock', '~> 1.0'

Usage

1. Create a splash view controller

VENTouchLock requires a custom splash view controller to hide the contents of your app during app-switch and present the Touch ID prompt or passcode view controller. In order to create one, subclass VENTouchLockSplashViewController and override its init function with any customization. The splash view controller is usually a good place to give your users the option to logout in case another user is attempting to sign in.

2. Start the framework

Add the VENTouchLock header file to your app delegate. Import this header in any of your implementation files to use the framework.

#import <VENTouchLock/VENTouchLock.h>

Add the following code to initialize VENTouchLock in your app delegate's application:didFinishLaunchingWithOptions: method.

[[VENTouchLock sharedInstance] setKeychainService:@"KEYCHAIN_SERVICE_NAME"
								  keychainAccount:@"KEYCHAIN_ACCOUNT_NAME"
                                    touchIDReason:@"TOUCHID_REASON"
                             passcodeAttemptLimit:ATTEMPT_LIMIT
                        splashViewControllerClass:[CUSTOM_SPLASH_VIEW_CONTROLLER class]];
  • KEYCHAIN_SERVICE_NAME: A service name used to set and return a passcode from Apple's Keychain Services interface. Example: Venmo
  • KEYCHAIN_ACCOUNT_NAME: An account name used to set and return a passcode from Apple's Keychain Services interface. Example: [email protected]
  • TOUCHID_REASON: A message displayed on the Touch ID prompt. Example: Scan your fingerprint to unlock
  • ATTEMPT_LIMIT: The maximum number of passcode attempts before the splash view controller fails to authenticate (Your app should logout when the user reaches this limit)
  • CUSTOM_SPLASH_VIEW_CONTROLLER: The name of the VENTouchLockSplashViewController subclass.

3. Set a passcode

In order for your users to enable Touch ID and / or a passcode, they must set a passcode. In the Venmo app, this option is in the settings page. To let your users create a passcode, use a VENTouchLockCreatePasscodeViewController.

4. Enable Touch ID

If the user's device supports Touch ID (i.e. [VENTouchLock canUseTouchID] returns YES), after setting a passcode prompt, allow the user to set an option to unlock with Touch ID. Set their preference with the VENTouchLock class method setShouldUseTouchID:(BOOL)preference

Sample Project

Check out the sample project in this repo for sample usage.

Contributing

We'd love to see your ideas for improving this library! The best way to contribute is by submitting a pull request. We'll do our best to respond to your patch as soon as possible. You can also submit a new Github issue if you find bugs or have questions. :octocat:

Please make sure to follow our general coding style and add test coverage for new features!

More Repositories

1

synx

A command-line tool that reorganizes your Xcode project folder to match your Xcode groups
Ruby
6,082
star
2

Static

Simple static table views for iOS in Swift.
Swift
1,250
star
3

business-rules

Python DSL for setting up business intelligence rules that can be configured without code
Python
891
star
4

VENTokenField

Easy-to-use token field that is used in the Venmo app.
Objective-C
793
star
5

VENCalculatorInputView

Calculator keyboard used in the Venmo iOS app
Objective-C
763
star
6

DVR

Network testing for Swift
Swift
651
star
7

tooltip-view

Dead simple Android Tooltip Views
Java
486
star
8

DryDock-iOS

DEPRECATED: An open-source internal installer app
433
star
9

VENSeparatorView

Jagged border separators on UIViews used in the Venmo app.
Objective-C
379
star
10

VENVersionTracker

Objective-C
300
star
11

business-rules-ui

A JavaScript library for building out the logic and UI for business rules.
JavaScript
197
star
12

VENPromotionsManager

iOS Library to perform location & time-based promotions.
Objective-C
197
star
13

cursor-utils

A library that encapsulates the repeatable actions of Android Cursors.
Java
195
star
14

venmo-ios-sdk

Make and accept payments in your iOS app via Venmo
Objective-C
176
star
15

react-html-document

A foundational React component useful for rendering full html documents on the server.
JavaScript
155
star
16

VENExperimentsManager

An Objective-C library enabling easy implementation of feature experiments on iOS allowing users to opt in and out of experiments at will.
Objective-C
76
star
17

slouch

A lightweight Python framework for building cli-inspired Slack bots.
Python
71
star
18

xcode_server

Xcode Bot client
Ruby
58
star
19

android-pin

An easy drop-in PIN controller for Android
Java
42
star
20

app-switch-android

Java
35
star
21

VENCore

Core Objective-C client library for the Venmo API
Objective-C
27
star
22

QuizTrain

Swift Framework for TestRail's API
Swift
19
star
23

feature_ramp

Toggling and ramping features via a lightweight Redis backend.
Python
18
star
24

btnamespace

A Python library to isolate state on the Braintree sandbox during testing.
Python
17
star
25

flaskeleton

Python
13
star
26

swaggergenerator

Create swagger / OpenAPI schemas from example interactions.
Python
11
star
27

tornado-stub-client

A stub library for making requests with tornado's AsyncHTTPClient
Python
9
star
28

venmo.github.io

Old Venmo Engineering Blog
CSS
8
star
29

nose-detecthttp

A nose plugin that can detect tests making external http calls.
Python
7
star
30

puppet-consulr

Dynamic puppet manifests using consul
Ruby
5
star
31

puppet-sentry

Puppet module for managing the Sentry realtime event logging and aggregation platform
Ruby
4
star
32

python3-avro

Copies the python3 client implementation from our fork of apache's avro project.
Python
4
star
33

nose-seed-faker

A nose plugin that seeds the faker package
Python
4
star
34

QuizTrainExample

Example of how to use QuizTrain with Unit Tests and UI Tests on iOS
Swift
3
star
35

single-click-highlightable

HOC for React that allows users to highlight text on elements without triggering the onClick handler
JavaScript
3
star
36

puppet-hound

Puppet hound module
Puppet
2
star
37

nose-timeout

Nose plugin for aborting long running tests
Python
1
star
38

foundations-interview

This is a test repository used in Foundations team interview process
JavaScript
1
star