diff --git a/ios/SmartCard.swift b/ios/SmartCard.swift index 59438db..9e0cf6b 100644 --- a/ios/SmartCard.swift +++ b/ios/SmartCard.swift @@ -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) } diff --git a/ios/StatusKeycard.swift b/ios/StatusKeycard.swift index 67aeeea..7ab1fec 100644 --- a/ios/StatusKeycard.swift +++ b/ios/StatusKeycard.swift @@ -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