nfc_manager 0.2.0 nfc_manager: ^0.2.0 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.
Note #
This plugin is still under development.
So please use with caution as there may be potential issues and breaking changes.
Feedback is welcome.
Setup #
Android Setup #
- Add permission to your
AndroidMenifest.xml
:
<uses-permission android:name="android.permission.NFC" />
iOS Setup #
- Add NFCReaderUsageDescription to your
Info.plist
:
<key>NFCReaderUsageDescription</key>
<string>[YOUR DESCRIPTION]</string>
- Add 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> <!-- To use `NfcManager#startTagSession` -->
</array>
- To use
NfcManager#startTagSession
, add com.apple.developer.nfc.readersession.iso7816.select-identifiers and com.apple.developer.nfc.readersession.felica.systemcodes to yourInfo.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>