Expo
app.json
Bare React Native
ios/<App>/<App>.entitlements
TAG rather than NDEF is deliberate. This library uses NFCTagReaderSession
for every technology, NDEF included, so that one code path covers them all — and
that session type requires the TAG format. A narrower entitlement would read
better in a review and fail at runtime.
The entitlement also has to exist on the provisioning profile: in the Apple Developer portal,
enable Near Field Communication Tag Reading for the App ID, then regenerate the profile.
Xcode’s “Automatically manage signing” does this for you; a manually managed profile does not.
ios/<App>/Info.plist
android/app/src/main/AndroidManifest.xml
android:required="false" keeps the app installable on devices without an NFC
controller. Set requireNfcHardware: true only if the app is useless without it —
true removes those devices from your Play Store audience entirely.
Writing
Writing needs no extra configuration, but it does need the tag to allow it:writeNdef takes records; writeNdefBytes takes an already-encoded message, for
when you have bytes from elsewhere. readNdef and readNdefBytes are the same pair
in the other direction.
Next
The NDEF codec
Every record type, chunking, and tag-level framing.
Background tags
Handling a tag tapped while your app is closed.