add haptic feedback on connection
This commit is contained in:
parent
4024884b70
commit
40a2dd360a
|
@ -231,7 +231,7 @@ class SmartCard {
|
|||
|
||||
func unblockPin(channel: CardChannel, pairingBase64: String, puk: String, newPin: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) throws -> Void {
|
||||
let cmdSet = try securedCommandSet(channel: channel, pairingBase64: pairingBase64)
|
||||
try cmdSet.unblockPIN(puk: puk, newPIN: newPin).checkOK()
|
||||
try cmdSet.unblockPIN(puk: puk, newPIN: newPin).checkAuthOK()
|
||||
os_log("pin unblocked")
|
||||
resolve(true)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Foundation
|
||||
import Keycard
|
||||
import UIKit
|
||||
|
||||
@objc(StatusKeycard)
|
||||
class StatusKeycard: RCTEventEmitter {
|
||||
|
@ -151,6 +152,7 @@ class StatusKeycard: RCTEventEmitter {
|
|||
if (keycardController == nil) {
|
||||
self.keycardController = KeycardController(onConnect: { [unowned self] channel in
|
||||
self.cardChannel = channel
|
||||
UIImpactFeedbackGenerator(style: .light).impactOccurred()
|
||||
self.sendEvent(withName: "keyCardOnConnected", body: nil)
|
||||
self.keycardController?.setAlert("Connected. Don't move your card.")
|
||||
}, onFailure: { [unowned self] _ in
|
||||
|
|
Loading…
Reference in New Issue