react-native-nfc-manager 3.14.11 → 3.14.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -266,6 +266,7 @@ declare module 'react-native-nfc-manager' {
266
266
  le: number;
267
267
  },
268
268
  ) => Promise<{response: number[]; sw1: number; sw2: number}>;
269
+ restartTechnologyRequestIOS: () => Promise<NfcTech | null>;
269
270
  iso15693HandlerIOS: Iso15693HandlerIOS;
270
271
 
271
272
  /**
package/ios/NfcManager.m CHANGED
@@ -306,6 +306,21 @@ RCT_EXPORT_METHOD(requestTechnology: (NSArray *)techs options: (NSDictionary *)o
306
306
  }
307
307
  }
308
308
 
309
+ RCT_EXPORT_METHOD(restartTechnologyRequest:(nonnull RCTResponseSenderBlock)callback)
310
+ {
311
+ if (@available(iOS 13.0, *)) {
312
+ if (tagSession != nil) {
313
+ NSLog(@"NfcManager restarting polling");
314
+ [self->tagSession restartPolling];
315
+ techRequestCallback = callback;
316
+ } else {
317
+ callback(@[@"No active registration", [NSNull null]]);
318
+ }
319
+ } else {
320
+ callback(@[@"Not support in this device", [NSNull null]]);
321
+ }
322
+ }
323
+
309
324
  RCT_EXPORT_METHOD(cancelTechnologyRequest:(nonnull RCTResponseSenderBlock)callback)
310
325
  {
311
326
  if (@available(iOS 13.0, *)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nfc-manager",
3
- "version": "3.14.11",
3
+ "version": "3.14.13",
4
4
  "description": "A NFC module for react native.",
5
5
  "main": "src/index.js",
6
6
  "repository": {
package/src/NfcError.js CHANGED
@@ -95,6 +95,8 @@ export function buildNfcExceptionIOS(error) {
95
95
  return new InvalidParameterLength();
96
96
  } else if (code === NfcErrorIOS.errCodes.parameterOutOfBound) {
97
97
  return new ParameterOutOfBound();
98
+ } else if (code === NfcErrorIOS.errCodes.radioDisabled) {
99
+ return new RadioDisabled();
98
100
  } else if (code === NfcErrorIOS.errCodes.tagConnectionLost) {
99
101
  return new TagConnectionLost();
100
102
  } else if (code === NfcErrorIOS.errCodes.retryExceeded) {
package/src/NfcManager.js CHANGED
@@ -96,6 +96,8 @@ class NfcManagerBase {
96
96
 
97
97
  requestTechnology = NotImpl;
98
98
 
99
+ restartTechnologyRequestIOS = NotImpl;
100
+
99
101
  cancelTechnologyRequest = NotImpl;
100
102
 
101
103
  getBackgroundTag = NotImpl;
@@ -49,6 +49,12 @@ class NfcManagerIOS extends NfcManagerBase {
49
49
  );
50
50
  };
51
51
 
52
+ restartTechnologyRequestIOS = async () => {
53
+ return handleNativeException(
54
+ callNative('restartTechnologyRequest'),
55
+ );
56
+ };
57
+
52
58
  cancelTechnologyRequest = async (options = {}) => {
53
59
  const {throwOnError = false} = options;
54
60
  return handleNativeException(