Contribute
This is a stub and is waiting for contributions. Get involved by visiting us on GitHub or joining us on Discord.
Based on https://github.com/tauri-apps/plugins-workspace/tree/plugins/nfc
Read and write NFC tags on Android and iOS.
This plugin requires a Rust version of at least 1.75
Install the nfc plugin to get started.
Use your project’s package manager to add the dependency:
Run the following command in the src-tauri
folder to add the plugin to the project’s dependencies in Cargo.toml
:
Modify lib.rs
to initialize the plugin:
Install the JavaScript Guest bindings using your preferred JavaScript package manager:
On iOS the NFC plugin requires the NFCReaderUsageDescription
information property list value, which should describe why your app needs to scan or write to NFC tags.
In the src-tauri/Info.ios.plist
file, add the following snippet:
Contribute
This is a stub and is waiting for contributions. Get involved by visiting us on GitHub or joining us on Discord.
Based on https://github.com/tauri-apps/plugins-workspace/tree/plugins/nfc
This permission set configures what kind of operations are available from the nfc plugin.
Checking if the NFC functionality is available and scanning nearby tags is allowed. Writing to tags needs to be manually enabled.
allow-is-available
allow-scan
Identifier | Description |
---|---|
|
Enables the is_available command without any pre-configured scope. |
|
Denies the is_available command without any pre-configured scope. |
|
Enables the scan command without any pre-configured scope. |
|
Denies the scan command without any pre-configured scope. |
|
Enables the write command without any pre-configured scope. |
|
Denies the write command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT