diff --git a/plugins/authenticator/README.md b/plugins/authenticator/README.md index ed18fae7..bcdedeab 100644 --- a/plugins/authenticator/README.md +++ b/plugins/authenticator/README.md @@ -2,6 +2,8 @@ Use hardware security-keys in your Tauri App. +- Supported platforms: Windows, Linux, FreeBSD, NetBSD, OpenBSD, and macOS. + ## Install _This plugin requires a Rust version of at least **1.65**_ @@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: `src-tauri/Cargo.toml` ```toml -[dependencies] +# you can add the dependencies on the `[dependencies]` section if you do not target mobile +[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] tauri-plugin-authenticator = "2.0.0-alpha" # alternatively with Git: tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } @@ -54,7 +57,11 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin(tauri_plugin_authenticator::init()) + .setup(|app| { + #[cfg(desktop)] + app.handle().plugin(tauri_plugin_authenticator::init())?; + Ok(()) + }) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/cli/README.md b/plugins/cli/README.md index de13cfef..5de6c9e8 100644 --- a/plugins/cli/README.md +++ b/plugins/cli/README.md @@ -2,6 +2,8 @@ Parse arguments from your Command Line Interface. +- Supported platforms: Windows, Linux and macOS. + ## Install _This plugin requires a Rust version of at least **1.65**_ @@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: `src-tauri/Cargo.toml` ```toml -[dependencies] +# you can add the dependencies on the `[dependencies]` section if you do not target mobile +[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] tauri-plugin-cli = "2.0.0-alpha" # alternatively with Git: tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } @@ -51,7 +54,11 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin(tauri_plugin_cli::init()) + .setup(|app| { + #[cfg(desktop)] + app.handle().plugin(tauri_plugin_cli::init())?; + Ok(()) + }) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/global-shortcut/README.md b/plugins/global-shortcut/README.md index 5d46b9b0..7c151730 100644 --- a/plugins/global-shortcut/README.md +++ b/plugins/global-shortcut/README.md @@ -2,6 +2,8 @@ Register global shortcuts. +- Supported platforms: Windows, Linux and macOS. + ## Install _This plugin requires a Rust version of at least **1.65**_ @@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: `src-tauri/Cargo.toml` ```toml -[dependencies] +# you can add the dependencies on the `[dependencies]` section if you do not target mobile +[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] tauri-plugin-global-shortcut = "2.0.0-alpha" # alternatively with Git: tauri-plugin-shortcut = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } @@ -51,7 +54,11 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin(tauri_plugin_shortcut::init()) + .setup(|app| { + #[cfg(desktop)] + app.handle().plugin(tauri_plugin_shortcut::init())?; + Ok(()) + }) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/updater/README.md b/plugins/updater/README.md index fc189be3..eb6f3642 100644 --- a/plugins/updater/README.md +++ b/plugins/updater/README.md @@ -2,6 +2,8 @@ In-app updates for Tauri applications. +- Supported platforms: Windows, Linux and macOS. + ## Install _This plugin requires a Rust version of at least **1.65**_ @@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: `src-tauri/Cargo.toml` ```toml -[dependencies] +# you can add the dependencies on the `[dependencies]` section if you do not target mobile +[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] tauri-plugin-updater = "2.0.0-alpha" # alternatively with Git: tauri-plugin-updater = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } @@ -51,7 +54,11 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin(tauri_plugin_updater::Builder::new().build()) + .setup(|app| { + #[cfg(desktop)] + app.handle().plugin(tauri_plugin_updater::Builder::new().build())?; + Ok(()) + }) .run(tauri::generate_context!()) .expect("error while running tauri application"); }