From 9c5b897991ea4512f3131155af5cc80ac7fc944a Mon Sep 17 00:00:00 2001 From: Michele Balistreri Date: Mon, 19 Sep 2022 14:51:16 +0200 Subject: [PATCH] Make compatible with newer XCode (#46) xcode 14 compatibility --- ios/StatusKeycard.swift | 12 +++++++++++- package.json | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ios/StatusKeycard.swift b/ios/StatusKeycard.swift index 81e1d17..c009885 100644 --- a/ios/StatusKeycard.swift +++ b/ios/StatusKeycard.swift @@ -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 { diff --git a/package.json b/package.json index 8db6cbd..64dc7e1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-native-status-keycard", "homepage": "https://keycard.status.im/", - "version": "2.5.37", + "version": "2.5.38", "description": "React Native library to interact with Status Keycard using NFC connection", "main": "index.js", "scripts": {