@tauri-apps/plugin-nfc
Enumerations
Section titled “Enumerations”NFCTypeNameFormat
Section titled “NFCTypeNameFormat”Enumeration Members
Section titled “Enumeration Members”AbsoluteURI
Section titled “AbsoluteURI”AbsoluteURI: 3;Empty: 0;Media: 2;NfcExternal
Section titled “NfcExternal”NfcExternal: 4;NfcWellKnown
Section titled “NfcWellKnown”NfcWellKnown: 1;Unchanged
Section titled “Unchanged”Unchanged: 6;Unknown
Section titled “Unknown”Unknown: 5;TechKind
Section titled “TechKind”Enumeration Members
Section titled “Enumeration Members”IsoDep
Section titled “IsoDep”IsoDep: 0;MifareClassic
Section titled “MifareClassic”MifareClassic: 1;MifareUltralight
Section titled “MifareUltralight”MifareUltralight: 2;Ndef: 3;NdefFormatable
Section titled “NdefFormatable”NdefFormatable: 4;NfcA: 5;NfcB: 6;NfcBarcode
Section titled “NfcBarcode”NfcBarcode: 7;NfcF: 8;NfcV: 9;Interfaces
Section titled “Interfaces”NFCRecord
Section titled “NFCRecord”Properties
Section titled “Properties”ScanOptions
Section titled “ScanOptions”Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
keepSessionAlive? |
boolean |
- | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/nfc/guest-js/index.ts#L63 |
message? |
string |
Message displayed in the UI. iOS only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/nfc/guest-js/index.ts#L65 |
successMessage? |
string |
Message displayed in the UI when the message has been read. iOS only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/nfc/guest-js/index.ts#L67 |
Properties
Section titled “Properties”TagRecord
Section titled “TagRecord”Properties
Section titled “Properties”UriFilter
Section titled “UriFilter”Properties
Section titled “Properties”WriteOptions
Section titled “WriteOptions”Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
kind? |
ScanKind |
- | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/nfc/guest-js/index.ts#L71 |
message? |
string |
Message displayed in the UI when reading the tag. iOS only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/nfc/guest-js/index.ts#L73 |
successMessage? |
string |
Message displayed in the UI when the message has been written. iOS only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/nfc/guest-js/index.ts#L77 |
successfulReadMessage? |
string |
Message displayed in the UI when the tag has been read. iOS only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/nfc/guest-js/index.ts#L75 |
Type Aliases
Section titled “Type Aliases”ScanKind
Section titled “ScanKind”type ScanKind: object | object;Variables
Section titled “Variables”RTD_TEXT
Section titled “RTD_TEXT”const RTD_TEXT: number[];RTD_URI
Section titled “RTD_URI”const RTD_URI: number[];Functions
Section titled “Functions”isAvailable()
Section titled “isAvailable()”function isAvailable(): Promise<boolean>Returns
Section titled “Returns”Promise<boolean>
record()
Section titled “record()”function record( format, kind, id, payload): NFCRecordParameters
Section titled “Parameters”| Parameter | Type |
|---|---|
format |
NFCTypeNameFormat |
kind |
string | number[] |
id |
string | number[] |
payload |
string | number[] |
Returns
Section titled “Returns”scan()
Section titled “scan()”function scan(kind, options?): Promise<Tag>Scans an NFC tag.
import { scan } from "@tauri-apps/plugin-nfc";await scan({ type: "tag" });See https://developer.android.com/develop/connectivity/nfc/nfc#ndef for more information.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
kind |
ScanKind |
|
options? |
ScanOptions |
Returns
Section titled “Returns”textRecord()
Section titled “textRecord()”function textRecord( text, id?, language?): NFCRecordParameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
text |
string |
undefined |
id? |
string | number[] |
undefined |
language? |
string |
'en' |
Returns
Section titled “Returns”uriRecord()
Section titled “uriRecord()”function uriRecord(uri, id?): NFCRecordParameters
Section titled “Parameters”| Parameter | Type |
|---|---|
uri |
string |
id? |
string | number[] |
Returns
Section titled “Returns”write()
Section titled “write()”function write(records, options?): Promise<void>Write to an NFC tag.
import { uriRecord, write } from "@tauri-apps/plugin-nfc";await write([uriRecord("https://tauri.app")], { kind: { type: "ndef" } });If you did not previously call scan with ScanOptions.keepSessionAlive set to true, it will first scan the tag then write to it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
records |
NFCRecord[] |
|
options? |
WriteOptions |
Returns
Section titled “Returns”Promise<void>
© 2026 Tauri Contributors. CC-BY / MIT