@@ -125,13 +125,13 @@ - (void)writeTag:(CDVInvokedUrlCommand*)command API_AVAILABLE(ios(13.0)){
125
125
if (self.shouldUseTagReaderSession ) {
126
126
NSLog (@" Using NFCTagReaderSession" );
127
127
128
- self.nfcSession = [[NFCTagReaderSession new ]
128
+ self.nfcSession = [[NFCTagReaderSession alloc ]
129
129
initWithPollingOption: (NFCPollingISO14443 | NFCPollingISO15693)
130
130
delegate: self queue: dispatch_get_main_queue ()];
131
131
132
132
} else {
133
133
NSLog (@" Using NFCTagReaderSession" );
134
- self.nfcSession = [[NFCNDEFReaderSession new ]initWithDelegate:self queue: nil invalidateAfterFirstRead: FALSE ];
134
+ self.nfcSession = [[NFCNDEFReaderSession alloc ]initWithDelegate:self queue: nil invalidateAfterFirstRead: FALSE ];
135
135
}
136
136
}
137
137
@@ -306,20 +306,20 @@ - (void)startScanSession:(CDVInvokedUrlCommand*)command {
306
306
307
307
if (self.shouldUseTagReaderSession ) {
308
308
NSLog (@" Using NFCTagReaderSession" );
309
- self.nfcSession = [[NFCTagReaderSession new ]
309
+ self.nfcSession = [[NFCTagReaderSession alloc ]
310
310
initWithPollingOption: (NFCPollingISO14443 | NFCPollingISO15693)
311
311
delegate: self queue: dispatch_get_main_queue ()];
312
312
} else {
313
313
NSLog (@" Using NFCNDEFReaderSession" );
314
- self.nfcSession = [[NFCNDEFReaderSession new ]initWithDelegate:self queue: nil invalidateAfterFirstRead: TRUE ];
314
+ self.nfcSession = [[NFCNDEFReaderSession alloc ]initWithDelegate:self queue: nil invalidateAfterFirstRead: TRUE ];
315
315
}
316
316
sessionCallbackId = [command.callbackId copy ];
317
317
self.nfcSession .alertMessage = @" Hold near NFC tag to scan." ;
318
318
[self .nfcSession beginSession ];
319
319
320
320
} else if (@available (iOS 11.0 , *)) {
321
321
NSLog (@" iOS < 13, using NFCNDEFReaderSession" );
322
- self.nfcSession = [[NFCNDEFReaderSession new ]initWithDelegate:self queue: nil invalidateAfterFirstRead: TRUE ];
322
+ self.nfcSession = [[NFCNDEFReaderSession alloc ]initWithDelegate:self queue: nil invalidateAfterFirstRead: TRUE ];
323
323
sessionCallbackId = [command.callbackId copy ];
324
324
self.nfcSession .alertMessage = @" Hold near NFC tag to scan." ;
325
325
[self .nfcSession beginSession ];
0 commit comments