/react-native-nfc-manager

React Native NFC module for Android & iOS

Primary LanguageJavaScriptApache License 2.0Apache-2.0

react-native-nfc-manager

npm version build issues

Bring NFC feature to React Native. Inspired by phonegap-nfc and react-native-ble-manager

Contributions are welcome!

iOS 13 development is ongoing!

Ndef writing, get UID, send mifare command, and APDU exchange... Lots features come into iOS13!

Currently this work will be published in npm beta channel.

Install

# RN >= 0.60, XCode 11 (for all fancy iOS 13 core nfc features!)
npm i --save react-native-nfc-manager@beta
# RN >= 0.60, XCode 10
npm i --save react-native-nfc-manager@2.0.0-beta.1
# RN < 0.60, XCode 10
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

v1 examples

API Document