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 +1 -0
- package/ios/NfcManager.m +15 -0
- package/package.json +1 -1
- package/src/NfcError.js +2 -0
- package/src/NfcManager.js +2 -0
- package/src/NfcManagerIOS.js +6 -0
package/index.d.ts
CHANGED
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
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
package/src/NfcManagerIOS.js
CHANGED
|
@@ -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(
|