[BREAKGLASS] Append-only mirror of github.com/bluewallet/react-native-nfc-manager
| android | ||
| example | ||
| ios | ||
| ndef-lib | ||
| .babelrc | ||
| .gitignore | ||
| .travis.yml | ||
| APIv1.md | ||
| APIv2.md | ||
| ByteParser.js | ||
| ByteParser.test.js | ||
| index.d.ts | ||
| LICENSE | ||
| NativeNfcManager.js | ||
| ndef.test.js | ||
| NdefParser.js | ||
| NdefParser.test.js | ||
| NfcManager.js | ||
| package.json | ||
| react-native-nfc-manager.podspec | ||
| README.md | ||
react-native-nfc-manager
Bring NFC feature to React Native. Inspired by phonegap-nfc and react-native-ble-manager
Contributions are welcome!
Install
# RN >= 0.60
npm i --save react-native-nfc-manager
# RN < 0.60 (without the latest iOS 13 feature)
npm i --save react-native-nfc-manager@1.2.2
Setup
# RN >= 0.60, iOS
cd 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 platforms
react-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:
Example
Look into example for the features you need.
v2 examples
- v2-ios+android-read-ndef
- v2-ios+android-write-ndef
- v2-ios+android-get-uid
- v2-ios+android-mifare-custom-command
v1 examples
- v1-ios-read-ndef
- v1-android-read-write-ndef
- v1-android-mifare-classic
- v1-android-read-write-ndef-with-ndef-tech