nfc_manager 0.1.0+2 nfc_manager: ^0.1.0+2 copied to clipboard
A Flutter plugin to use NFC. Supported on both Android and iOS.
nfc_manager #
A Flutter plugin to use NFC. Supported on both Android and iOS.
Requirements #
This plugins uses the following API to read the tag:
NfcAdapter#enableReaderMode
(on Android)NFCNDEFReaderSession
(on iOS11/12)NFCTagReaderSession
(on iOS13 or later)
Therefore, Android API level 19 or iOS 11.0 is required. Otherwise, the error will be thrown.
Setup #
Android Setup #
- Add the permission to your
AndroidMenifest.xml
:
<uses-permission android:name="android.permission.NFC" />
iOS Setup #
- Add the Near Field Communication Tag Reader Session Formats Entitlements to your entitlements:
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>NDEF</string>
<string>TAG</string>
</array>
- Add the NFCReaderUsageDescription to your
Info.plist
:
<key>NFCReaderUsageDescription</key>
<string>[YOUR DESCRIPTION]</string>
- Add com.apple.developer.nfc.readersession.iso7816.select-identifiers and com.apple.developer.nfc.readersession.felica.systemcodes to your
Info.plist
as you need:
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>[AID]</string>
</array>
<key>com.apple.developer.nfc.readersession.felica.systemcodes</key>
<array>
<string>[SYSTEM CODE]</string>
</array>