Skip to content

JimTeva/react-native-nfc-manager

 
 

Repository files navigation

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!

Install

# RN >= 0.60
npm i --save react-native-nfc-manager
# RN < 0.60 (without the latest iOS 13 feature)
npm i --save [email protected]

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:

IMPORTANT: For the new NFC capabilities available on iOS 13 to work, the entitlements file mentioned in the previous guide should look like this:

<key>com.apple.developer.nfc.readersession.formats</key>
<array>
  <string>NDEF</string>
  <string>TAG</string>
</array>

Example

Look into example for the features you need.

v2 examples

v1 examples

API Document

About

React Native NFC module for Android & iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 45.2%
  • Java 34.0%
  • Objective-C 20.6%
  • Ruby 0.2%