Skip to content

Advanced Configuration: RFID Chip

RFID Delegate

The RFID chip delegate:

DocReader.shared.rfidDelegate = self
[RGLDocReader shared].rfidDelegate = self;

func didChipConnected()

Tells the delegate that the connection with the RFID chip is established.

func didChipConnected() {
    print("Connected")
}
- (void)didChipConnected {
    NSLog(@"Connected");
}

func didReceivedError(RFIDErrorCodes)

Tells the delegate an error appeared during the RFID chip processing.

func didReceivedError(_ errorCode: RFIDErrorCodes) {
    print(errorCode.rawValue)
}
- (void)didReceivedError:(RGLRFIDErrorCodes)errorCode {
    NSLog(@"%u", errorCode);
}

For information about the methods you can implement for your delegate object, see the API Reference.

PKD Certificates

  • Add a list of PKD certificates that will be passed to Core during the initialization process:
DocReader.shared.addPKDCertificates(certificates: certificates)
  • Clear the list of PKD certificates that have been passed to Core:
DocReader.shared.clearPKDCertificates()

TCC Params

Sets the given TCCParams to the RFID session. The parameters are required to be set before starting the RFID session.

The TCCParams includes the following properties:

  • serviceTAURLString is the TA URL for the TCC service. The value of the property must be a valid URL string.
  • servicePAURLString is the PA URL for the TCC service. The value of the property must be a valid URL string.
  • pfxCertURLString is the URL for the certificate for a TCC service. The value of the property must be a valid URL string.
  • pfxCertData is the bytes of the certificate for a TCC service. This data will be used instead of loading the certificate via pfxCertURLString.
  • pfxPassPhrase is the passphrase for the cerficiate provided by the pfxCertURLString property.
let tccParams = TCCParams(
    serviceTAURLString: "",
    servicePAURLString: "",
    pfxCertURLString: "",
    pfxCertData: nil,
    pfxPassPhrase: ""
)
DocReader.shared.setTCCParams(tccParams) { success, error in
    // check `success` or `error`...
}
TCCParams *tccParams = [[TCCParams alloc] initWithServiceTAURLString:@""
                                                  servicePAURLString:@""
                                                    pfxCertURLString:@""
                                                        pfxCertData:nil,
                                                       pfxPassPhrase:@""];
[RGLDocReader.shared setTCCParams:tccParams completion:^(BOOL success, NSError * _Nullable error) {
    // check `success` or `error`...
}];

Next Steps