Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry the card reading session when the "Tag connection lost" issue occurs. #226

Open
LuuNguyen0811 opened this issue Jun 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@LuuNguyen0811
Copy link

LuuNguyen0811 commented Jun 21, 2024

I'm frequently encountering the "Tag connection lost" issue. This problem might be related to the iOS version or the device itself. I have two iPhones: an iPhone 8 with iOS 15 and an iPhone 12 with iOS 15. The iPhone 8 successfully reads 8 out of 10 times, whereas the iPhone 12 only reads successfully 5 out of 10 times, often displaying the "Tag connection lost" error.

When I perform the same task using ReadId Me, I experience a similar issue, but it doesn't throw an error. Instead, it maintains the status and continues the reading session, eventually succeeding (8/10 times in ip12 too).

Is there a way to preserve data and continue the reading session when the Tag connection is lost? Does anyone have a solution for this?
~ see "Tag connection lost": https://forums.developer.apple.com/forums/thread/118499

@longpham2310
Copy link

@LuuNguyen0811 I think it depends on how the library handles reading tags. In this library, it will throw exceptions when something goes wrong

try await readDataGroups(tagReader: tagReader)

So I think we have to retry the whole process.

@AndyQ AndyQ added the enhancement New feature or request label Jan 30, 2025
@AndyQ
Copy link
Owner

AndyQ commented Jan 30, 2025

Unfortunately, when we get the the tag connection lost, iOS closes the NFC Connection and you have to completely start the connection flow (including detection again). I'm not aware of any feature to just retry and trying to preserve a session is currently not possible.

It should be possible to keep whatever was read though and maybe re-start the session with an partially read passport object and continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants