Contributions are welcome!
# RN >= 0.60npm i --save react-native-nfc-manager
# RN < 0.60 (without the latest iOS 13 feature)npm i --save email@example.com
# RN >= 0.60, iOScd ios && pod install && cd ..# ...then open ios/xxx.xcworkspace...
# RN >= 0.60, Android# This module leverages autolink, so no extra steps are required
(see here for more info about autolink)
# RN < 0.60, both platformsreact-native link react-native-nfc-manager
Extra iOS setup is required
You will need to setup some capabilities / entitlement / plist stuff to enable NFC development on your device, this repo explains these requirements very well:
IMPORTANT: For the new NFC capabilities available on iOS 13 to work, the entitlements file mentioned in the previous guide should look like this:
In the ISO18092 system codes for NFC Tag Reader Session, all FeliCa system codes used for reading must be entered in advance. Wildcards cannot be used.
Launch app on nfc event
Note on getLaunchTagEvent: keep in mind that you can only create intent-filters for the very first NDEF record on an NFC tag! If your intent-filter doesn't match the FIRST record your app will launch but it won't get the tag data. Check out for details: https://stackoverflow.com/questions/25504418/get-nfc-tag-with-ndef-android-application-record-aar/25510642
Also you should add
to your manifest to prevent launching your app as another task when it is already running.
Please use this repo as a quick start.
example for the features you need.