react-native-nfc-manager 3.14.3 → 3.14.5
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.
|
@@ -1315,6 +1315,9 @@ class NfcManager extends ReactContextBaseJavaModule implements ActivityEventList
|
|
|
1315
1315
|
|
|
1316
1316
|
WritableMap parsed = null;
|
|
1317
1317
|
Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
|
|
1318
|
+
if (tag == null) {
|
|
1319
|
+
return null;
|
|
1320
|
+
}
|
|
1318
1321
|
// Parcelable[] messages = intent.getParcelableArrayExtra((NfcAdapter.EXTRA_NDEF_MESSAGES));
|
|
1319
1322
|
|
|
1320
1323
|
synchronized(this) {
|
package/ios/NfcManager.m
CHANGED
|
@@ -195,15 +195,17 @@ continueUserActivity:(NSUserActivity *)userActivity
|
|
|
195
195
|
// inherites from NFCNDEFTag, so we simply allow it to connect
|
|
196
196
|
if ([tagType isEqualToString:requestType] || [requestType isEqualToString:@"Ndef"]) {
|
|
197
197
|
RCTResponseSenderBlock pendingCallback = techRequestCallback;
|
|
198
|
-
techRequestCallback = nil;
|
|
199
198
|
|
|
200
199
|
[tagSession connectToTag:tag
|
|
201
200
|
completionHandler:^(NSError *error) {
|
|
202
201
|
if (error != nil) {
|
|
203
|
-
|
|
202
|
+
NSLog(@"NFCTag restarting polling");
|
|
203
|
+
[self->tagSession restartPolling];
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
self->techRequestCallback = nil;
|
|
208
|
+
|
|
207
209
|
pendingCallback(@[[NSNull null], requestType]);
|
|
208
210
|
}];
|
|
209
211
|
return;
|