Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3369498c9f | ||
|
|
3bbdf13ef7 | ||
|
|
af61b0213a | ||
|
|
31e057dc04 | ||
|
|
7548329c59 |
+12
-2
@@ -9,8 +9,18 @@ class StatusKeycard: RCTEventEmitter {
|
||||
var cardChannel: CardChannel? = nil
|
||||
var nfcStartPrompt: String = "Hold your iPhone near a Status Keycard."
|
||||
|
||||
private var _keycardController: Any? = nil
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
private(set) lazy var keycardController: KeycardController? = nil
|
||||
private var keycardController: KeycardController? {
|
||||
get {
|
||||
return _keycardController as? KeycardController
|
||||
}
|
||||
|
||||
set(kc) {
|
||||
_keycardController = kc
|
||||
}
|
||||
}
|
||||
|
||||
@objc
|
||||
func nfcIsSupported(_ resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
|
||||
@@ -199,7 +209,7 @@ class StatusKeycard: RCTEventEmitter {
|
||||
let nsError = error as NSError
|
||||
if nsError.code == 200 && nsError.domain == "NFCError" {
|
||||
self.sendEvent(withName: "keyCardOnNFCUserCancelled", body: nil)
|
||||
} else if nsError.code == 201 && nsError.domain == "NFCError" {
|
||||
} else if (nsError.code == 201 || nsError.code == 203) && (nsError.domain == "NFCError") {
|
||||
self.sendEvent(withName: "keyCardOnNFCTimeout", body: nil)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "react-native-status-keycard",
|
||||
"homepage": "https://keycard.status.im/",
|
||||
"version": "2.5.36",
|
||||
"version": "2.5.38",
|
||||
"description": "React Native library to interact with Status Keycard using NFC connection",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user