We're trying to communicate with Tangem cards (https://tangem.com) that contains ISO7816 Tag via NFC.
We open session:
readerSession = NFCTagReaderSession(pollingOption: [.iso14443], delegate: self, queue: nil)
readerSession?.begin()
Bring our card to iPhone NFC Reader and connect to a tag
session.connect(to: tags.first!)
and start sending APDU commands one by one.
But after about 20 seconds CoreNFC session sends us the error:
Error Domain=NFCError
Code=100 "Tag connection lost"
UserInfo={NSLocalizedDescription=Tag connection lost}
or, if there was no active command at that moment:
Error Domain=NFCError
Code=201 "Session timeout"
UserInfo={NSLocalizedDescription=Session timeout}
We have to send plenty of commands within one session. It is needed to secure Tangem clients from malefactors that can read data without user's knowledge and approval. Session with the card can last more than 30 seconds. And we can't invalidate session and start another one, because after it we have to start sending commands from the very beginning.
We would be much appreciated, if someone tell how to increase the timeout of communication with connected tag.
Thank you in advance.