Skip to content

Conversation

@samuelkchris
Copy link

Summary

  • NFCError Code 403 ("NDEF tag does not contain any NDEF message") was being treated as a fatal error, causing tags to be silently skipped
  • Users had to wait for the session timeout before receiving any feedback when scanning empty tags
  • This fix treats error 403 as a valid tag state with nil cached NDEF message, allowing immediate user feedback

Changes

  • Modified ios/Classes/NfcManagerPlugin.swift to check for NFCError Code 403 specifically
  • When error 403 is encountered, the tag is returned with nil cachedNdefMessage instead of being silently skipped

Test plan

  • Scan an empty NDEF tag on iOS - should trigger onDiscovered callback immediately with nil NDEF message
  • Scan a tag with NDEF content - should work as before
  • Verify other NFC errors are still handled correctly

Fixes #259

NFCError Code 403 ("NDEF tag does not contain any NDEF message") was
being treated as a fatal error, causing tags to be silently skipped.
Users had to wait for the session timeout before receiving feedback.

This fix treats error 403 as a valid tag state with nil cached NDEF
message, allowing immediate user feedback for empty tags.

Fixes: okadan#259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IOS] Error Domain=NFCError Code=403 "NDEF tag does not contain any NDEF message"

1 participant