Hello Damian,
Maybe the cause of the error is some exceeding memory limit and not TapLinx library?
MobileFacilityApp[5223] exceeded mem limit: InactiveHard 3072 MB (fatal)
The application which integrates TapLinx Library can be used as following (no need for ApduExchange implementation on top)
Set the delegate to the APDUHandler
let reader = TL_IOSNFCReader(uid: tag.identifier, historicalBytes: tag.historicalBytes ?? Data())
handler = TapLinxApduHandler(reader: reader)
handler.delegate = self
libraryManager?.setApduHandlerWithApduHandler(handler)
Next Step will be to implement the protocol method inside the application
func apduExchange(withByteArray apduData: Data) -> TL_TagAPDUResponse? {
var tagAPDUResponse: TL_TagAPDUResponse?
if connectedTag != nil {
// Send Tag Type Native of ISO and the apdu as NFCISO7816APDU
executeAPDUCommandOn7816Tag(tagType: tagtype, apdu: apdu) { data in
let appendedData = data
tagAPDUResponse = TL_TagAPDUResponse(responseData: appendedData, tag: self.currentTag)
semaphore.signal()
}
let _ = semaphore.wait(timeout: .now() + 3.0)
} else if connectedMifareTag != nil {
let semaphore = DispatchSemaphore(value: 0)
print("MIFARE CAPDU -> \(apduData.hex)")
executeAPDUCommandOnMIFARETag(apdu: apduData) { data in
print("RAPDU <- Data: \(data.hex)")
tagAPDUResponse = TL_TagAPDUResponse(responseData: data, tag: self.currentTag)
semaphore.signal()
}
let _ = semaphore.wait(timeout: .now() + 3.0)
}
print("Tag Response \(String(describing: tagAPDUResponse))")
return tagAPDUResponse
}
Hope this simplification would help you.
Best regards,
TapLinx team