Skip to content

mluedke2/snowshoe-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnowShoe-Swift

CI Status Version License Platform Carthage compatible

The SnowShoe Stamp is an authentication tool for smartphones.

SnowShoe

Installation

SnowShoe-Swift is available through CocoaPods. To install it, add the following line to your Podfile:

pod "SnowShoe-Swift"

SnowShoe-Swift is also available with Carthage. To install it, add the following line to your Cartfile:

github "mluedke2/snowshoe-swift"

Usage

Example

To run the example project, clone the repo, run pod install from the Example directory, and open SnowShoe-Swift.xcworkspace.

In your own project

The core piece of this library is the SnowShoeView, a subclass of UIView that automatically detects stamps and handles the API query.

To use it, add this import:

import SnowShoe_Swift

Then, assign your key and secret from the SnowShoe Dashboard to the view:

snowShoeView.appKey = "YOUR_APP_KEY"
snowShoeView.appSecret = "YOUR_APP_SECRET"

Then, implement SnowShoeDelegate, which will be notified when a stamp request is made to the API and when a result comes back:

public protocol SnowShoeDelegate {
  func onStampRequestMade()
  func onStampResult(result: SnowShoeResult?)
}

Then assign the delegate to the SnowShoeView:

snowShoeView.delegate = delegate

Author

Matt Luedke, mluedke2@gmail.com

Hardware and API managed by SnowShoe

License

SnowShoe-Swift is available under the MIT license. See the LICENSE file for more info.