Skip to content

Commit b0f66ff

Browse files
committed
fix: update api for card emulation
1 parent b4c7a2d commit b0f66ff

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

android/src/main/java/app/akiles/reactnative/AkilesModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ class AkilesModule(reactContext: ReactApplicationContext) :
528528
* @returns true if card emulation is supported, false otherwise.
529529
*/
530530
@ReactMethod
531-
override fun isCardEmulationSupported(): Boolean {
532-
return akiles.isCardEmulationSupported()
531+
override fun isCardEmulationSupported(promise: Promise) {
532+
promise.resolve(akiles.isCardEmulationSupported());
533533
}
534534

535535
private fun convertError(ex: AkilesException): WritableMap {

example/ios/AkilesExample.xcodeproj/project.pbxproj

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,14 @@
191191
inputFileListPaths = (
192192
"${PODS_ROOT}/Target Support Files/Pods-AkilesExample/Pods-AkilesExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
193193
);
194+
inputPaths = (
195+
);
194196
name = "[CP] Embed Pods Frameworks";
195197
outputFileListPaths = (
196198
"${PODS_ROOT}/Target Support Files/Pods-AkilesExample/Pods-AkilesExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
197199
);
200+
outputPaths = (
201+
);
198202
runOnlyForDeploymentPostprocessing = 0;
199203
shellPath = /bin/sh;
200204
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AkilesExample/Pods-AkilesExample-frameworks.sh\"\n";
@@ -230,10 +234,14 @@
230234
inputFileListPaths = (
231235
"${PODS_ROOT}/Target Support Files/Pods-AkilesExample/Pods-AkilesExample-resources-${CONFIGURATION}-input-files.xcfilelist",
232236
);
237+
inputPaths = (
238+
);
233239
name = "[CP] Copy Pods Resources";
234240
outputFileListPaths = (
235241
"${PODS_ROOT}/Target Support Files/Pods-AkilesExample/Pods-AkilesExample-resources-${CONFIGURATION}-output-files.xcfilelist",
236242
);
243+
outputPaths = (
244+
);
237245
runOnlyForDeploymentPostprocessing = 0;
238246
shellPath = /bin/sh;
239247
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AkilesExample/Pods-AkilesExample-resources.sh\"\n";
@@ -378,10 +386,7 @@
378386
"-DFOLLY_CFG_NO_COROUTINES=1",
379387
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
380388
);
381-
OTHER_LDFLAGS = (
382-
"$(inherited)",
383-
" ",
384-
);
389+
OTHER_LDFLAGS = "$(inherited) ";
385390
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
386391
SDKROOT = iphoneos;
387392
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -450,10 +455,7 @@
450455
"-DFOLLY_CFG_NO_COROUTINES=1",
451456
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
452457
);
453-
OTHER_LDFLAGS = (
454-
"$(inherited)",
455-
" ",
456-
);
458+
OTHER_LDFLAGS = "$(inherited) ";
457459
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
458460
SDKROOT = iphoneos;
459461
USE_HERMES = true;

example/ios/AkilesExample/Info.plist

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,21 @@
2424
<string>$(CURRENT_PROJECT_VERSION)</string>
2525
<key>LSRequiresIPhoneOS</key>
2626
<true/>
27+
<key>NFCReaderUsageDescription</key>
28+
<string>This app uses NFC to read and update access cards.</string>
2729
<key>NSAppTransportSecurity</key>
2830
<dict>
29-
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
3031
<key>NSAllowsArbitraryLoads</key>
3132
<false/>
3233
<key>NSAllowsLocalNetworking</key>
3334
<true/>
3435
</dict>
35-
<key>NSLocationWhenInUseUsageDescription</key>
36-
<string>This app needs location access to discover and connect to nearby Akiles devices via Bluetooth.</string>
3736
<key>NSBluetoothAlwaysUsageDescription</key>
3837
<string>This app uses Bluetooth to communicate with Akiles access control devices.</string>
3938
<key>NSBluetoothPeripheralUsageDescription</key>
4039
<string>This app uses Bluetooth to communicate with Akiles access control devices.</string>
41-
<key>com.apple.developer.nfc.readersession.formats</key>
42-
<array>
43-
<string>NDEF</string>
44-
<string>TAG</string>
45-
</array>
46-
<key>NFCReaderUsageDescription</key>
47-
<string>This app uses NFC to read and update access cards.</string>
40+
<key>NSLocationWhenInUseUsageDescription</key>
41+
<string>This app needs location access to discover and connect to nearby Akiles devices via Bluetooth.</string>
4842
<key>UILaunchStoryboardName</key>
4943
<string>LaunchScreen</string>
5044
<key>UIRequiredDeviceCapabilities</key>
@@ -59,5 +53,10 @@
5953
</array>
6054
<key>UIViewControllerBasedStatusBarAppearance</key>
6155
<false/>
56+
<key>com.apple.developer.nfc.readersession.formats</key>
57+
<array>
58+
<string>NDEF</string>
59+
<string>TAG</string>
60+
</array>
6261
</dict>
6362
</plist>

0 commit comments

Comments
 (0)