Skip to content

RFID Chip Processing

Overview

Biometric documents are documents similar to the traditional ones except for one significant difference: they have the RFID chip embedded.

The information stored on the chip is the same as that displayed on the data page of identity documents: full name, date of birth, place of birth, date of issue, expiration date, etc.

The chip also contains a biometric identifier in the form of a digital image of the identity document photo. The chip has a unique identification number and a digital signature as a protective measure.

The Document Reader SDK allows reading data from RFID chip memory (international standard ISO/IEC 14443) when working with devices equipped with NFC hardware, performing procedures of passive and active authentication.

Permissions

  • Add Near Field Communication Tag Reading under the Capabilities tab for the project’s target:

<key>NFCReaderUsageDescription</key>
<string>NFC tag to read NDEF messages</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
    <string>A0000002471001</string>
    <string>E80704007F00070302</string>
    <string>A000000167455349474E</string>
    <string>A0000002480100</string>
    <string>A0000002480200</string>
    <string>A0000002480300</string>
    <string>A00000045645444C2D3031</string>
</array>

Find the list of application identifiers that Document Reader SDK is able to process here.

Open RFID Reader

After the document processing is completed and an access key is obtained, you can start the RFID chip processing.

To open the RFID chip reading controller and start its processing, use the method below.

DocReader.shared.startRFIDReader(fromPresenter: self, completion: { (action, results, error) in
    switch 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;
    }
}];

Info

You can configure the RFID chip processing and avoid using our predefined configuration.

Stop RFID Reader

To stop the RFID chip reading controller programmatically, use the method below.

DocReader.shared.stopRFIDReader(errorMessage: "Custom error message") {
    print("Stopped")
}
[RGLDocReader.shared stopRFIDReaderWithErrorMessage:@"Custom error message" completion:^{
    NSLog(@"Stopped");
}];

Next Steps