We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tried to follow https://docs.rs/crate/tauri-plugin-nfc/latest
My lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_nfc::init()) .invoke_handler(tauri::generate_handler![greet]) .run(tauri::generate_context!()) .expect("error while running tauri application"); }
But this gives an error
.plugin(tauri_plugin_nfc::init()) | ^^^^ not found in `tauri_plugin_nfc
How do i solve this ?
I tried to import use tauri_plugin_nfc::init; but still same issue.
No response
tauri info
[✔] Environment - OS: Windows 10.0.22621 X64 ✔ WebView2: 123.0.2420.65 ✔ MSVC: Visual Studio Build Tools 2022 ✔ rustc: 1.77.0 (aedd173a2 2024-03-17) ✔ cargo: 1.77.0 (3fe68eabf 2024-02-29) ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08) ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default) - node: 18.16.1 - pnpm: 8.15.4 - npm: 9.5.1 [-] Packages - tauri [RUST]: 2.0.0-beta.13 - tauri-build [RUST]: 2.0.0-beta.10 - wry [RUST]: 0.37.0 - tao [RUST]: 0.26.1 - @tauri-apps/api [NPM]: 2.0.0-beta.5 - @tauri-apps/cli [NPM]: 2.0.0-beta.9 [-] App - build-type: bundle - CSP: unset - frontendDist: ../dist - devUrl: http://localhost:1420/ - framework: Vue.js - bundler: Vite
The text was updated successfully, but these errors were encountered:
Thanks, we will update the readme.
Because the plugin is mobile-only you have to register it like so:
#[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .setup(|app| { #[cfg(mobile)] { app.handle().plugin(tauri_plugin_nfc::init())?; } }) .invoke_handler(tauri::generate_handler![greet]) .run(tauri::generate_context!()) .expect("error while running tauri application"); }
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Tried to follow https://docs.rs/crate/tauri-plugin-nfc/latest
My lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_nfc::init())
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
But this gives an error
.plugin(tauri_plugin_nfc::init())
| ^^^^ not found in `tauri_plugin_nfc
How do i solve this ?
I tried to import use tauri_plugin_nfc::init; but still same issue.
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: