Best NFC plugin

cordova-nfc causes a crash on Android 13, so I’ve asked for the possibility to use cordova-nfc-api31 instead.

But if that fails too…

Does anyone have experience of an NFC reader/writer plugin that works well on later versions of Android and iOS? I only need NDEF.

Thanks in advance.

I’m now using @red-mobile/cordova-plugin-nfc that’s already approved for use with VoltBuilder. A listener for NDEF can be registered, and no errors occur, but I get no event for NDEF data, even if the data is just text (not even a URL).

cordova-nfc looks like it is dead. It hasn’t bee updated in 6 years and the Github repo is gone.

Have you tried contacting the maintainer of @red-mobile/cordova-plugin-nfc to see if they have any tips?

I will. There’s no Issues tab, so I need to contact them directly.

Update:

I have. It’s the newest among the approved ones, so I hope Hiroyuki Okada can take a look. npmjs has even newer updates, but with even less confidence level:

@ragestudio/cordova-nfc is newer but doesn’t have a GitHub page. phonegap-nfc-api31 that I tried with earlier is not approved. Another not approved candidate is fttx-phonegap-nfc.

All are forks of the original phonegap-nfc.

Both of those plugins look clean - I’ll put them in for approval.

Both are ready for use - give them a try!

Thanks. I’ll test right away.

Thumbs up for phonegap-nfc-api31, so I’ll continue with that one for now.

@ragestudio/cordova-nfc is not approved yet (if that was the one you meant).

Thanks for the help.

That has been added now as well.

I succeeded to complete the first intended use case: convert the NFC NDEF payload (text and URI primarily) to plain text in an existing note-taking app. More on the way.

Thanks again.

Update: Writing works too, at least on Android (13).

If anyone cares, I had to switch plugin again due to API 34. I’m now back to @red-mobile/cordova-plugin-nfc that was updated recently and that seems to tick all boxes in terms of compatibility and the functions I need. This has been verified and new app versions have been released.

1 Like

And of course @red-mobile/cordova-plugin-nfc doesn’t work on iOS.

Now using phonegap-nfc-api31-ios13fix instead.