Skip to content

Instantly share code, notes, and snippets.

@lammertw
Last active May 31, 2016 09:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lammertw/9d600b0321f7f8e7ebf897522a1fed80 to your computer and use it in GitHub Desktop.
Save lammertw/9d600b0321f7f8e7ebf897522a1fed80 to your computer and use it in GitHub Desktop.
PromiseKit extension on Digits by Fabric.io
import Foundation
import DigitsKit
import PromiseKit
extension Digits {
public func authenticateWithCompletion() -> Promise<DGTSession> {
return Promise(resolver: authenticateWithCompletion)
}
public func authenticateWithViewController(viewController: UIViewController?, configuration: DGTAuthenticationConfiguration) -> Promise<DGTSession> {
return Promise { authenticateWithViewController(viewController, configuration: configuration, completion: $0) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment