From 9384a65b4f6d0532964c2690c73cfdbd2dd985d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hochst=C3=B6ger=20Matthias?= <116495532+mhochsto@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:39:08 +0200 Subject: [PATCH 1/4] fix: removed nfc --- abrevva-react-native.podspec | 2 +- android/build.gradle | 2 +- .../abrevva/reactnative/AbrevvaBleModule.kt | 9 +- .../abrevva/reactnative/AbrevvaNfcModule.kt | 163 ------------------ .../abrevva/reactnative/ExampleAppPackage.kt | 2 +- .../android/app/src/main/AndroidManifest.xml | 1 - .../project.pbxproj | 108 ++++++------ example/ios/ExampleAppExample/Info.plist | 2 - example/ios/Podfile | 2 + example/ios/Podfile.lock | 42 ++--- example/src/App.tsx | 40 +---- ios/crypto/AbrevvaCrypto.swift | 5 +- ios/nfc/AbrevvaNfc.mm | 12 -- ios/nfc/AbrevvaNfc.swift | 122 ------------- src/index.test.tsx | 28 +-- src/index.tsx | 25 --- src/interfaces.tsx | 6 - src/setup.tsx | 5 - 18 files changed, 89 insertions(+), 487 deletions(-) delete mode 100644 android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaNfcModule.kt delete mode 100644 ios/nfc/AbrevvaNfc.mm delete mode 100644 ios/nfc/AbrevvaNfc.swift diff --git a/abrevva-react-native.podspec b/abrevva-react-native.podspec index 7f2fe3e..f14d184 100644 --- a/abrevva-react-native.podspec +++ b/abrevva-react-native.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.dependency "CocoaMQTT" s.dependency "CryptoSwift" - s.dependency "AbrevvaSDK", '~> 1.0.23' + s.dependency "AbrevvaSDK", '1.0.31' # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. diff --git a/android/build.gradle b/android/build.gradle index 71e50ed..9c8964e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,7 +91,7 @@ repositories { def kotlin_version = getExtOrDefault("kotlinVersion") dependencies { - implementation group: "com.evva.xesar", name: "abrevva-sdk-android", version: "1.0.19" + implementation group: "com.evva.xesar", name: "abrevva-sdk-android", version: "1.0.21" implementation "com.facebook.react:react-native:0.20.1" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" diff --git a/android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaBleModule.kt b/android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaBleModule.kt index 30f0087..1b15115 100644 --- a/android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaBleModule.kt +++ b/android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaBleModule.kt @@ -10,7 +10,6 @@ import androidx.annotation.RequiresPermission import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat import com.evva.xesar.abrevva.ble.BleManager -import com.evva.xesar.abrevva.nfc.toHexString import com.evva.xesar.abrevva.util.bytesToString import com.evva.xesar.abrevva.util.stringToBytes import com.facebook.react.bridge.Arguments @@ -448,12 +447,10 @@ class AbrevvaBleModule(reactContext: ReactApplicationContext) : if (scanRecordBytes != null) { try { // Extract EVVA manufacturer-id - val arr = byteArrayOf(0x01) - arr.toHexString() - val keyHex = byteArrayOf(scanRecordBytes.getByte(6)!!).toHexString() + byteArrayOf( + val keyHex = byteArrayOf(scanRecordBytes.getByte(6)!!) + byteArrayOf( scanRecordBytes.getByte(5)!! - ).toHexString() - val keyDec = keyHex.toInt(16) + ) + val keyDec = bytesToString(keyHex).toInt(16) // Slice out manufacturer data val bytes = scanRecordBytes.copyOfRange(7, scanRecordBytes.size) diff --git a/android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaNfcModule.kt b/android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaNfcModule.kt deleted file mode 100644 index 52641b5..0000000 --- a/android/src/main/java/com/evva/xesar/abrevva/reactnative/AbrevvaNfcModule.kt +++ /dev/null @@ -1,163 +0,0 @@ -package com.evva.xesar.abrevva.reactnative - -import android.content.Intent -import android.nfc.NfcAdapter -import com.evva.xesar.abrevva.nfc.KeyStoreHandler -import com.evva.xesar.abrevva.nfc.Message -import com.evva.xesar.abrevva.nfc.Mqtt5Client -import com.evva.xesar.abrevva.nfc.NfcDelegate -import com.evva.xesar.abrevva.nfc.asByteArray -import com.evva.xesar.abrevva.nfc.toHexString -import com.facebook.react.bridge.BaseActivityEventListener -import com.facebook.react.bridge.LifecycleEventListener -import com.facebook.react.bridge.Promise -import com.facebook.react.bridge.ReactApplicationContext -import com.facebook.react.bridge.ReactContextBaseJavaModule -import com.facebook.react.bridge.ReactMethod -import com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5Publish -import java.util.Timer -import java.util.TimerTask - -class AbrevvaNfcModule(reactContext: ReactApplicationContext) : - ReactContextBaseJavaModule(reactContext) { - - private val host = "172.16.2.91" - private val port = 1883 - private val clientID = "96380897-0eee-479e-80c3-84c0dde286cd" - - private val STATUS_NFC_OK = "enabled" - - private val kyOffTimer = Timer() - private val hbTimer = Timer() - - private var mqtt5Client: Mqtt5Client? = null - private var nfcDelegate = NfcDelegate() - - private var clientId: String? = null - - private val adapterStatus: String - get() = nfcDelegate.setAdapterStatus() - - private val activityEventListener = object : BaseActivityEventListener() { - override fun onNewIntent(intent: Intent?) { - super.onNewIntent(intent) - if (intent != null) { - currentActivity!!.intent = intent - nfcDelegate.processTag(intent) { - mqtt5Client?.subscribe("readers/1/$clientId/t", ::messageReceivedCallback) - mqtt5Client?.publish( - "readers/1/$clientId", - Message( - "ky", - "on", - nfcDelegate.getIdentifier(), - nfcDelegate.getHistoricalBytesAsHexString(), - "BAKA" - ).asByteArray() - ) - setDisconnectTimer() - setHbTimer() - } - } - } - } - - private val lifecycleEventListener = object : LifecycleEventListener { - override fun onHostResume() { - nfcDelegate.restartForegroundDispatch(reactContext, currentActivity) - } - - override fun onHostPause() { - nfcDelegate.disableForegroundDispatch(reactContext, currentActivity) - } - - override fun onHostDestroy() { - } - } - - init { - reactContext.addActivityEventListener(activityEventListener) - reactContext.addLifecycleEventListener(lifecycleEventListener) - nfcDelegate.setAdapter(NfcAdapter.getDefaultAdapter(reactContext)) - } - - private fun messageReceivedCallback(response: Mqtt5Publish) { - try { - val resp = nfcDelegate.transceive(response.payloadAsBytes) - mqtt5Client?.publish("readers/1/$clientId/f", resp) - } catch (e: Exception) { - println(e) - } - } - - private fun setDisconnectTimer() { - kyOffTimer.scheduleAtFixedRate(object : TimerTask() { - override fun run() { - try { - // .isConnected throws SecurityException when Tag is outdated - nfcDelegate.isConnected() - } catch (ex: java.lang.Exception) { - mqtt5Client?.publish( - "readers/1", - Message("ky", "off", oid = clientId).asByteArray() - ) - this.cancel() - } - } - }, 250, 250) - } - - private fun setHbTimer() { - hbTimer.scheduleAtFixedRate(object : TimerTask() { - override fun run() { - mqtt5Client?.publish("readers/1", Message("cr", "hb", oid = clientId).asByteArray()) - } - }, 30000, 30000) - } - - @ReactMethod - fun read(promise: Promise) { - if (adapterStatus != STATUS_NFC_OK) { - // No NFC hardware or NFC is disabled by the user - promise.reject(adapterStatus) - return - } - nfcDelegate.restartForegroundDispatch(reactApplicationContext, currentActivity) - } - - @OptIn(ExperimentalStdlibApi::class) - @ReactMethod - fun connect() { - val ksh = KeyStoreHandler() - try { - val cacheDir = reactApplicationContext.cacheDir - ksh.parseP12File("$cacheDir/client-android.p12", "123") - ksh.initKeyManagerFactory() - ksh.initTrustManagerFactory() - } catch (ex: Exception) { - println(ex) - return - } - - this.clientId = clientID - this.mqtt5Client = Mqtt5Client(clientID, port, host, ksh) - mqtt5Client?.connect() - print(Message("ky", "off", oid = "oidValue").asByteArray().toHexString()) - } - - @ReactMethod - fun disconnect() { - hbTimer.cancel() - kyOffTimer.cancel() - mqtt5Client?.publish("readers/1", Message("cr", "off", oid = clientID).asByteArray()) - mqtt5Client?.disconnect() - } - - override fun getName(): String { - return NAME - } - - companion object { - const val NAME = "AbrevvaNfc" - } -} diff --git a/android/src/main/java/com/evva/xesar/abrevva/reactnative/ExampleAppPackage.kt b/android/src/main/java/com/evva/xesar/abrevva/reactnative/ExampleAppPackage.kt index 8670457..c8b1596 100644 --- a/android/src/main/java/com/evva/xesar/abrevva/reactnative/ExampleAppPackage.kt +++ b/android/src/main/java/com/evva/xesar/abrevva/reactnative/ExampleAppPackage.kt @@ -7,7 +7,7 @@ import com.facebook.react.uimanager.ViewManager class ExampleAppPackage : ReactPackage { override fun createNativeModules(reactContext: ReactApplicationContext): List { - return listOf(AbrevvaCryptoModule(reactContext)) + listOf(AbrevvaNfcModule(reactContext)) + listOf( + return listOf(AbrevvaCryptoModule(reactContext)) + listOf( AbrevvaBleModule(reactContext) ) } diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 2499a4f..4122f36 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 59D3BAD406D244112EDD8B5C /* [CP] Check Pods Manifest.lock */ = { + 19905B8CF9CAE6AA1D1D84D6 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample-ExampleAppExampleTests/Pods-ExampleAppExample-ExampleAppExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ExampleAppExample-ExampleAppExampleTests-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample-ExampleAppExampleTests/Pods-ExampleAppExample-ExampleAppExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample-ExampleAppExampleTests/Pods-ExampleAppExample-ExampleAppExampleTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 88569654A39B7F4943A4ECB5 /* [CP] Check Pods Manifest.lock */ = { + 20635155BD5ADF3EF1109A16 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample/Pods-ExampleAppExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ExampleAppExample-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample/Pods-ExampleAppExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample/Pods-ExampleAppExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 92BE6BC0CFAA17A0C2386446 /* [CP] Embed Pods Frameworks */ = { + AA1E527239C7DC8BC535B9F1 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample-ExampleAppExampleTests/Pods-ExampleAppExample-ExampleAppExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample-ExampleAppExampleTests/Pods-ExampleAppExample-ExampleAppExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ExampleAppExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExampleAppExample-ExampleAppExampleTests/Pods-ExampleAppExample-ExampleAppExampleTests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -374,7 +374,7 @@ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 88BFDD102C005583A3DDE543 /* Pods-ExampleAppExample.debug.xcconfig */; + baseConfigurationReference = 6CDCDB6EBD657F5AB82D4529 /* Pods-ExampleAppExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -407,7 +407,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 68BC1AF6EDA113C27D65AC10 /* Pods-ExampleAppExample.release.xcconfig */; + baseConfigurationReference = 8A4DF353A54EAC9B7D836744 /* Pods-ExampleAppExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -438,7 +438,7 @@ }; 39FBC3E42C64DE9800BEE979 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 20389187CDDBF5F10F171A64 /* Pods-ExampleAppExample-ExampleAppExampleTests.debug.xcconfig */; + baseConfigurationReference = 95A96E601730AC9031B18B92 /* Pods-ExampleAppExample-ExampleAppExampleTests.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; @@ -475,7 +475,7 @@ }; 39FBC3E52C64DE9800BEE979 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9A974A4BFAF3C7FA0946ABAC /* Pods-ExampleAppExample-ExampleAppExampleTests.release.xcconfig */; + baseConfigurationReference = 791740A1319B42B285B9B9D9 /* Pods-ExampleAppExample-ExampleAppExampleTests.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; diff --git a/example/ios/ExampleAppExample/Info.plist b/example/ios/ExampleAppExample/Info.plist index e17ceff..2065cac 100644 --- a/example/ios/ExampleAppExample/Info.plist +++ b/example/ios/ExampleAppExample/Info.plist @@ -51,8 +51,6 @@ 12FC - NFCReaderUsageDescription - NFC tag to read NDEF messages into the application NSBluetoothAlwaysUsageDescription Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code. diff --git a/example/ios/Podfile b/example/ios/Podfile index 6dbb744..21f7454 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -28,6 +28,8 @@ end target 'ExampleAppExample' do config = use_native_modules! use_frameworks! + pod 'CryptoSwift' + use_react_native!( :path => config[:reactNativePath], # Enables Flipper. diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index eb28ed5..bc7ad65 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - abrevva-react-native (0.1.5): + - abrevva-react-native (1.0.1): - AbrevvaSDK (~> 1.0.23) - CocoaMQTT - CryptoSwift @@ -23,7 +23,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - AbrevvaSDK (1.0.23): + - AbrevvaSDK (1.0.31): - CocoaMQTT - CryptoSwift - boost (1.83.0) @@ -32,15 +32,15 @@ PODS: - CocoaMQTT/Core (2.1.6): - MqttCocoaAsyncSocket (~> 1.0.8) - CryptoSwift (1.8.3) - - CwlCatchException (2.2.0): - - CwlCatchExceptionSupport (~> 2.2.0) - - CwlCatchExceptionSupport (2.2.0) - - CwlMachBadInstructionHandler (2.2.0) - - CwlPosixPreconditionTesting (2.2.0) - - CwlPreconditionTesting (2.2.1): - - CwlCatchException (~> 2.2.0) - - CwlMachBadInstructionHandler (~> 2.2.0) - - CwlPosixPreconditionTesting (~> 2.2.0) + - CwlCatchException (2.2.1): + - CwlCatchExceptionSupport (~> 2.2.1) + - CwlCatchExceptionSupport (2.2.1) + - CwlMachBadInstructionHandler (2.2.2) + - CwlPosixPreconditionTesting (2.2.2) + - CwlPreconditionTesting (2.2.2): + - CwlCatchException (~> 2.2.1) + - CwlMachBadInstructionHandler (~> 2.2.2) + - CwlPosixPreconditionTesting (~> 2.2.2) - DoubleConversion (1.1.6) - FBLazyVector (0.74.3) - fmt (9.1.0) @@ -50,7 +50,7 @@ PODS: - hermes-engine/Pre-built (0.74.3) - MockingbirdFramework (0.20.0) - MqttCocoaAsyncSocket (1.0.8) - - Nimble (13.4.0): + - Nimble (13.5.0): - CwlPreconditionTesting (~> 2.2.0) - Quick (7.6.2) - RCT-Folly (2024.01.01.00): @@ -1440,16 +1440,16 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - abrevva-react-native: 6980035371bf192213003a60418276baced5d569 - AbrevvaSDK: 4edd60273dd1b2d171e8adb5a84756aa5084347c + abrevva-react-native: bad5d64a489a5cc76813d5ac9ef5747081fc7f6c + AbrevvaSDK: 87be0b144be7212470f79d2cbc5d3b3c72df4da4 boost: d3f49c53809116a5d38da093a8aa78bf551aed09 CocoaMQTT: 1f206228b29318eabdacad0c2e4e88575922c27a CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483 - CwlCatchException: 51bf8319009a31104ea6f0568730d1ecc25b6454 - CwlCatchExceptionSupport: 1345d6adb01a505933f2bc972dab60dcb9ce3e50 - CwlMachBadInstructionHandler: ea1030428925d9bf340882522af30712fb4bf356 - CwlPosixPreconditionTesting: a125dee731883f2582715f548c6b6c92c7fde145 - CwlPreconditionTesting: ccfd08aca58d14e04062b2a3dd2fd52e09857453 + CwlCatchException: 7acc161b299a6de7f0a46a6ed741eae2c8b4d75a + CwlCatchExceptionSupport: 54ccab8d8c78907b57f99717fb19d4cc3bce02dc + CwlMachBadInstructionHandler: dae4fdd124d45c9910ac240287cc7b898f4502a1 + CwlPosixPreconditionTesting: ecd095aa2129e740b44301c34571e8d85906fb88 + CwlPreconditionTesting: 67a0047dd4de4382b93442c0e3f25207f984f35a DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 FBLazyVector: 7e977dd099937dc5458851233141583abba49ff2 fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 @@ -1457,7 +1457,7 @@ SPEC CHECKSUMS: hermes-engine: 1f547997900dd0752dc0cc0ae6dd16173c49e09b MockingbirdFramework: 54e35fbbb47b806c1a1fae2cf3ef99f6eceb55e5 MqttCocoaAsyncSocket: 77d3b74f76228dd5a05d1f9526eab101d415b30c - Nimble: c3d7c9848a0adae88a665ca52f8da23dd4d2cd94 + Nimble: cc0469644d253140c6bab7e88d4ee3bbed59a25c Quick: b8bec97cd4b9f21da0472d45580f763b801fc353 RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47 RCTDeprecation: 4c7eeb42be0b2e95195563c49be08d0b839d22b4 @@ -1514,4 +1514,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: c2b657d91fc21203dd436e57c3a2a27527cbae3b -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/example/src/App.tsx b/example/src/App.tsx index 42e6dba..4059343 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,18 +1,8 @@ -import { AbrevvaCrypto, AbrevvaNfc } from '@evva-sfw/abrevva-react-native'; +import { AbrevvaCrypto } from '@evva-sfw/abrevva-react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; -import { useEffect } from 'react'; import { useState } from 'react'; -import { - Dimensions, - Platform, - ScrollView, - StyleSheet, - Text, - TouchableOpacity, - View, -} from 'react-native'; -import RNFS from 'react-native-fs'; +import { Dimensions, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import { BleScreen } from './BleScreenComponents'; @@ -23,7 +13,6 @@ const App = () => { - @@ -34,9 +23,6 @@ const App = () => { const HomeScreen = ({ navigation }) => { return ( - navigation.navigate('nfc')}> - NFC Test - navigation.navigate('crypto')}> Crpto Test @@ -47,28 +33,6 @@ const HomeScreen = ({ navigation }) => { ); }; -const NfcScreen = () => { - useEffect(() => { - if (Platform.OS === 'ios' || Platform.OS === 'android') { - RNFS.exists(`${RNFS.DocumentDirectoryPath}/client-${Platform.OS}.p12`).then((exists) => { - if (!exists) { - void RNFS.copyFile( - RNFS.MainBundlePath + `/client-${Platform.OS}.p12`, - `${RNFS.DocumentDirectoryPath}/client-${Platform.OS}.p12`, - ); - } - }); - } - }, []); - return ( - -