Skip to content

snowshoestamp/snowshoe-swift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 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"

For Swift 3:

pod "SnowShoe-Swift", :git => 'https://github.com/snowshoestamp/snowshoe-swift-3'

For Swift 4.1:

pod "SnowShoe-Swift", :git => 'https://github.com/snowshoestamp/snowshoe-swift', :branch => 'swift_4'

For Swift 5:

pod "SnowShoe-Swift", :git => 'https://github.com/snowshoestamp/snowshoe-swift', :branch => 'swift_5'

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

github "snowshoestamp/snowshoe-swift"

For Swift 3:

github "snowshoestamp/snowshoe-swift-3"

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

SnowShoe (support@snowshoestamp.com) & 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.

About

iOS wrapper for SnowShoe in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 86.6%
  • Ruby 13.4%