Use the method below to open RFID chip reading controller and start its processing:
DocReader.shared.startRFIDReader(fromPresenter: self, completion: { (action, results, error) inswitch action {case .complete:print("Completed")case .cancel:print("Cancelled by user")case .error:print("Error: \(error)")default:break;}})
[RGLDocReader.shared startRFIDReaderFromPresenter:self completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {switch (action) {case RGLDocReaderActionComplete: {NSLog(@"Completed");}break;case RGLDocReaderActionCancel: {NSLog(@"Cancelled by user");}break;​case RGLDocReaderActionError: {NSLog(@"Error: %@", error);}break;default:break;}}];
Use the method below to stop RFID chip reading programmatically:
DocReader.shared.stopRFIDReader {print("Stopped")}
[RGLDocReader.shared stopRFIDReader:^{NSLog(@"Stopped");}];
Don't forget to specify the app IDs in the Info.plist file. They can be found here.
​