- import { getMatches } from "@tauri-apps/plugin-cli";
+ import { getMatches } from '@tauri-apps/plugin-cli'
- export let onMessage;
+ export let onMessage
function cliMatches() {
- getMatches().then(onMessage).catch(onMessage);
+ getMatches().then(onMessage).catch(onMessage)
}
-
+
This binary can be run from the terminal and takes the following arguments:
@@ -17,7 +17,7 @@
--verbose
Additionally, it has a
update --background
subcommand.
-
+
Note that the arguments are only parsed, not implemented.
diff --git a/examples/api/src/views/Clipboard.svelte b/examples/api/src/views/Clipboard.svelte
index c86282d9..f16a7d71 100644
--- a/examples/api/src/views/Clipboard.svelte
+++ b/examples/api/src/views/Clipboard.svelte
@@ -1,59 +1,59 @@
@@ -65,6 +65,5 @@
/>
-
diff --git a/examples/api/src/views/Geolocation.svelte b/examples/api/src/views/Geolocation.svelte
new file mode 100644
index 00000000..cd181dfb
--- /dev/null
+++ b/examples/api/src/views/Geolocation.svelte
@@ -0,0 +1,29 @@
+
+
+
diff --git a/examples/api/src/views/Haptics.svelte b/examples/api/src/views/Haptics.svelte
new file mode 100644
index 00000000..9ddf15c1
--- /dev/null
+++ b/examples/api/src/views/Haptics.svelte
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Depending on your device settings for haptic feedback some of the buttons may
+ not work.
+
diff --git a/examples/api/src/views/Http.svelte b/examples/api/src/views/Http.svelte
index e1848803..5c7c3c49 100644
--- a/examples/api/src/views/Http.svelte
+++ b/examples/api/src/views/Http.svelte
@@ -1,69 +1,69 @@
@@ -82,7 +82,7 @@
placeholder="Request body"
rows="5"
bind:value={httpBody}
- />
+ >
diff --git a/examples/api/src/views/Opener.svelte b/examples/api/src/views/Opener.svelte
new file mode 100644
index 00000000..eca634ac
--- /dev/null
+++ b/examples/api/src/views/Opener.svelte
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
diff --git a/examples/api/src/views/Scanner.svelte b/examples/api/src/views/Scanner.svelte
index 57ff904c..ea0609e3 100644
--- a/examples/api/src/views/Scanner.svelte
+++ b/examples/api/src/views/Scanner.svelte
@@ -1,38 +1,44 @@
@@ -59,11 +65,12 @@
Aim your camera at a QR code
-
+
@@ -111,7 +118,7 @@
transition: 0.3s;
}
.square:after {
- content: "";
+ content: '';
top: 0;
display: block;
padding-bottom: 100%;
@@ -141,7 +148,8 @@
width: 100%;
margin: 1rem;
border: 2px solid #fff;
- box-shadow: 0px 0px 2px 1px rgb(0 0 0 / 0.5),
+ box-shadow:
+ 0px 0px 2px 1px rgb(0 0 0 / 0.5),
inset 0px 0px 2px 1px rgb(0 0 0 / 0.5);
border-radius: 1rem;
}
diff --git a/examples/api/src/views/Store.svelte b/examples/api/src/views/Store.svelte
index d8e6653b..6248b009 100644
--- a/examples/api/src/views/Store.svelte
+++ b/examples/api/src/views/Store.svelte
@@ -1,5 +1,5 @@
@@ -44,7 +81,12 @@
-
diff --git a/examples/api/src/views/Updater.svelte b/examples/api/src/views/Updater.svelte
index 819c65e0..2fa5e436 100644
--- a/examples/api/src/views/Updater.svelte
+++ b/examples/api/src/views/Updater.svelte
@@ -1,56 +1,56 @@
@@ -61,7 +61,7 @@
{:else}
{/if}
diff --git a/examples/api/unocss.config.js b/examples/api/unocss.config.js
index 44d926cd..d2069a49 100644
--- a/examples/api/unocss.config.js
+++ b/examples/api/unocss.config.js
@@ -2,43 +2,43 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { defineConfig, presetIcons, presetUno, presetWebFonts } from "unocss";
-import extractorSvelte from "@unocss/extractor-svelte";
+import { defineConfig, presetIcons, presetUno, presetWebFonts } from 'unocss'
+import extractorSvelte from '@unocss/extractor-svelte'
export default defineConfig({
theme: {
colors: {
- primary: "#FFFFFF",
- primaryLighter: "#e9ecef",
- darkPrimary: "#1B1B1D",
- darkPrimaryLighter: "#242526",
- primaryText: "#1C1E21",
- darkPrimaryText: "#E3E3E3",
- secondaryText: "#858A91",
- darkSecondaryText: "#C2C5CA",
- accent: "#3578E5",
- accentDark: "#306cce",
- accentDarker: "#2d66c3",
- accentDarkest: "#2554a0",
- accentLight: "#538ce9",
- accentLighter: "#72a1ed",
- accentLightest: "#9abcf2",
- accentText: "#FFFFFF",
- darkAccent: "#67d6ed",
- darkAccentDark: "#49cee9",
- darkAccentDarker: "#39cae8",
- darkAccentDarkest: "#19b5d5",
- darkAccentLight: "#85def1",
- darkAccentLighter: "#95e2f2",
- darkAccentLightest: "#c2eff8",
- darkAccentText: "#1C1E21",
- code: "#d6d8da",
- codeDark: "#282a2e",
- hoverOverlay: "rgba(0,0,0,.05)",
- hoverOverlayDarker: "rgba(0,0,0,.1)",
- darkHoverOverlay: "hsla(0,0%,100%,.05)",
- darkHoverOverlayDarker: "hsla(0,0%,100%,.1)",
- },
+ primary: '#FFFFFF',
+ primaryLighter: '#e9ecef',
+ darkPrimary: '#1B1B1D',
+ darkPrimaryLighter: '#242526',
+ primaryText: '#1C1E21',
+ darkPrimaryText: '#E3E3E3',
+ secondaryText: '#858A91',
+ darkSecondaryText: '#C2C5CA',
+ accent: '#3578E5',
+ accentDark: '#306cce',
+ accentDarker: '#2d66c3',
+ accentDarkest: '#2554a0',
+ accentLight: '#538ce9',
+ accentLighter: '#72a1ed',
+ accentLightest: '#9abcf2',
+ accentText: '#FFFFFF',
+ darkAccent: '#67d6ed',
+ darkAccentDark: '#49cee9',
+ darkAccentDarker: '#39cae8',
+ darkAccentDarkest: '#19b5d5',
+ darkAccentLight: '#85def1',
+ darkAccentLighter: '#95e2f2',
+ darkAccentLightest: '#c2eff8',
+ darkAccentText: '#1C1E21',
+ code: '#d6d8da',
+ codeDark: '#282a2e',
+ hoverOverlay: 'rgba(0,0,0,.05)',
+ hoverOverlayDarker: 'rgba(0,0,0,.1)',
+ darkHoverOverlay: 'hsla(0,0%,100%,.05)',
+ darkHoverOverlayDarker: 'hsla(0,0%,100%,.1)'
+ }
},
preflights: [
{
@@ -54,7 +54,7 @@ export default defineConfig({
code {
font-size: ${theme.fontSize.xs[0]};
font-family: ${theme.fontFamily.mono};
- border-radius: ${theme.borderRadius["DEFAULT"]};
+ border-radius: ${theme.borderRadius['DEFAULT']};
background-color: ${theme.colors.code};
}
@@ -66,8 +66,8 @@ export default defineConfig({
.dark code {
background-color: ${theme.colors.codeDark};
}
- `,
- },
+ `
+ }
],
shortcuts: {
btn: `select-none outline-none shadow-md p-2 rd-1 text-primaryText border-none font-400 dark:font-600
@@ -81,20 +81,20 @@ export default defineConfig({
note: `decoration-none flex-inline items-center relative p-2 rd-1
border-l-4 border-accent dark:border-darkAccent
bg-accent/10 dark:bg-darkAccent/10`,
- "note-red":
- "note bg-red-700/10 dark:bg-red-700/10 after:bg-red-700 dark:after:bg-red-700",
+ 'note-red':
+ 'note bg-red-700/10 dark:bg-red-700/10 after:bg-red-700 dark:after:bg-red-700',
input:
- "h-10 flex items-center outline-none border-none p-2 rd-1 shadow-md bg-primaryLighter dark:bg-darkPrimaryLighter text-primaryText dark:text-darkPrimaryText",
+ 'h-10 flex items-center outline-none border-none p-2 rd-1 shadow-md bg-primaryLighter dark:bg-darkPrimaryLighter text-primaryText dark:text-darkPrimaryText'
},
presets: [
presetUno(),
presetIcons(),
presetWebFonts({
fonts: {
- sans: "Rubik",
- mono: ["Fira Code", "Fira Mono:400,700"],
- },
- }),
+ sans: 'Rubik',
+ mono: ['Fira Code', 'Fira Mono:400,700']
+ }
+ })
],
- extractors: [extractorSvelte],
-});
+ extractors: [extractorSvelte]
+})
diff --git a/examples/api/vite.config.js b/examples/api/vite.config.js
index 508238eb..f7d87db8 100644
--- a/examples/api/vite.config.js
+++ b/examples/api/vite.config.js
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { defineConfig } from "vite";
-import Unocss from "unocss/vite";
-import { svelte } from "@sveltejs/vite-plugin-svelte";
-import process from "process";
+import { defineConfig } from 'vite'
+import Unocss from 'unocss/vite'
+import { svelte } from '@sveltejs/vite-plugin-svelte'
+import process from 'process'
-const host = process.env.TAURI_DEV_HOST;
+const host = process.env.TAURI_DEV_HOST
// https://vitejs.dev/config/
export default defineConfig(async () => {
@@ -18,24 +18,17 @@ export default defineConfig(async () => {
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: `assets/[name].js`,
- assetFileNames: `assets/[name].[ext]`,
- },
- },
+ assetFileNames: `assets/[name].[ext]`
+ }
+ }
},
server: {
host: host || false,
port: 5173,
strictPort: true,
- hmr: host
- ? {
- protocol: "ws",
- host,
- port: 5183,
- }
- : undefined,
fs: {
- allow: [".", "../../tooling/api/dist"],
- },
- },
- };
-});
+ allow: ['.', '../../tooling/api/dist']
+ }
+ }
+ }
+})
diff --git a/package.json b/package.json
index f25d2013..eef6a233 100644
--- a/package.json
+++ b/package.json
@@ -1,29 +1,30 @@
{
"name": "plugins-workspace",
"private": true,
- "license": "MIT or APACHE-2.0",
+ "license": "MIT OR Apache-2.0",
"type": "module",
"scripts": {
"build": "pnpm run -r --parallel --filter !plugins-workspace --filter !\"./plugins/*/examples/**\" --filter !\"./examples/*\" build",
"lint": "eslint .",
- "format": "prettier --write \"./**/*.{cjs,mjs,js,jsx,mts,ts,tsx,html,css,json}\" --ignore-path .prettierignore",
- "format-check": "prettier --check \"./**/*.{cjs,mjs,js,jsx,mts,ts,tsx,html,css,json}\" --ignore-path .prettierignore"
+ "format": "prettier --write .",
+ "format:check": "prettier --check .",
+ "example:api:dev": "pnpm run --filter \"api\" tauri dev"
},
"devDependencies": {
- "@eslint/js": "9.9.0",
- "@rollup/plugin-node-resolve": "15.2.3",
+ "@eslint/js": "9.18.0",
+ "@rollup/plugin-node-resolve": "16.0.0",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@types/eslint__js": "8.42.3",
- "covector": "^0.12.0",
- "eslint": "9.9.0",
+ "covector": "^0.12.3",
+ "eslint": "9.18.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-security": "3.0.1",
- "prettier": "3.3.3",
- "rollup": "4.21.0",
- "tslib": "2.6.3",
- "typescript": "5.5.4",
- "typescript-eslint": "8.1.0"
+ "prettier": "3.4.2",
+ "rollup": "4.30.1",
+ "tslib": "2.8.1",
+ "typescript": "5.7.3",
+ "typescript-eslint": "8.19.1"
},
"resolutions": {
"semver": ">=7.5.2",
diff --git a/plugins/authenticator/.gitignore b/plugins/authenticator/.gitignore
deleted file mode 100644
index b512c09d..00000000
--- a/plugins/authenticator/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
\ No newline at end of file
diff --git a/plugins/authenticator/CHANGELOG.md b/plugins/authenticator/CHANGELOG.md
deleted file mode 100644
index f263b9c8..00000000
--- a/plugins/authenticator/CHANGELOG.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# Changelog
-
-## \[2.0.0-rc.0]
-
-- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
-
-## \[2.0.0-beta.8]
-
-- [`99d6ac0f`](https://github.com/tauri-apps/plugins-workspace/commit/99d6ac0f9506a6a4a1aa59c728157190a7441af6) ([#1606](https://github.com/tauri-apps/plugins-workspace/pull/1606) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) The JS packages now specify the *minimum* `@tauri-apps/api` version instead of a single exact version.
-- [`6de87966`](https://github.com/tauri-apps/plugins-workspace/commit/6de87966ecc00ad9d91c25be452f1f46bd2b7e1f) ([#1597](https://github.com/tauri-apps/plugins-workspace/pull/1597) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Update to tauri beta.25.
-
-## \[2.0.0-beta.7]
-
-- [`22a17980`](https://github.com/tauri-apps/plugins-workspace/commit/22a17980ff4f6f8c40adb1b8f4ffc6dae2fe7e30) ([#1537](https://github.com/tauri-apps/plugins-workspace/pull/1537) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri beta.24.
-
-## \[2.0.0-beta.6]
-
-- [`76daee7a`](https://github.com/tauri-apps/plugins-workspace/commit/76daee7aafece34de3092c86e531cf9eb1138989) ([#1512](https://github.com/tauri-apps/plugins-workspace/pull/1512) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Update to tauri beta.23.
-
-## \[2.0.0-beta.5]
-
-- [`9013854f`](https://github.com/tauri-apps/plugins-workspace/commit/9013854f42a49a230b9dbb9d02774765528a923f)([#1382](https://github.com/tauri-apps/plugins-workspace/pull/1382)) Update to tauri beta.22.
-
-## \[2.0.0-beta.4]
-
-- [`430bd6f4`](https://github.com/tauri-apps/plugins-workspace/commit/430bd6f4f379bee5d232ae6b098ae131db7f178a)([#1363](https://github.com/tauri-apps/plugins-workspace/pull/1363)) Update to tauri beta.20.
-
-## \[2.0.0-beta.3]
-
-- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17.
-
-## \[2.0.0-beta.4]
-
-- [`7e2fcc5`](https://github.com/tauri-apps/plugins-workspace/commit/7e2fcc5e74df7c3c718e40f75bfb0eafc7d69d8d)([#1146](https://github.com/tauri-apps/plugins-workspace/pull/1146)) Update dependencies to align with tauri 2.0.0-beta.14.
-
-## \[2.0.0-beta.3]
-
-- [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true.
-
-## \[2.0.0-beta.2]
-
-- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
-
-## \[2.0.0-beta.1]
-
-- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
-
-## \[2.0.0-beta.0]
-
-- [`d198c01`](https://github.com/tauri-apps/plugins-workspace/commit/d198c014863ee260cb0de88a14b7fc4356ef7474)([#862](https://github.com/tauri-apps/plugins-workspace/pull/862)) Update to tauri beta.
-
-## \[2.0.0-alpha.5]
-
-- [`387c2f9`](https://github.com/tauri-apps/plugins-workspace/commit/387c2f9e0ce4c75c07ffa3fd76391a25b58f5daf)([#802](https://github.com/tauri-apps/plugins-workspace/pull/802)) Update to @tauri-apps/api v2.0.0-alpha.13.
-
-## \[2.0.0-alpha.4]
-
-- [`387c2f9`](https://github.com/tauri-apps/plugins-workspace/commit/387c2f9e0ce4c75c07ffa3fd76391a25b58f5daf)([#802](https://github.com/tauri-apps/plugins-workspace/pull/802)) Update to @tauri-apps/api v2.0.0-alpha.12.
-
-## \[2.0.0-alpha.3]
-
-- [`e438e0a`](https://github.com/tauri-apps/plugins-workspace/commit/e438e0a62d4b430a5159f05f13ecd397dd891a0d)([#676](https://github.com/tauri-apps/plugins-workspace/pull/676)) Update to @tauri-apps/api v2.0.0-alpha.11.
-
-## \[2.0.0-alpha.2]
-
-- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9.
-
-## \[2.0.0-alpha.2]
-
-- [`4e2cef9`](https://github.com/tauri-apps/plugins-workspace/commit/4e2cef9b702bbbb9cf4ee17de50791cb21f1b2a4)([#593](https://github.com/tauri-apps/plugins-workspace/pull/593)) Update to alpha.12.
-
-## \[2.0.0-alpha.1]
-
-- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- te to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- \-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
diff --git a/plugins/authenticator/Cargo.toml b/plugins/authenticator/Cargo.toml
deleted file mode 100644
index 4f51cc8d..00000000
--- a/plugins/authenticator/Cargo.toml
+++ /dev/null
@@ -1,41 +0,0 @@
-[package]
-name = "tauri-plugin-authenticator"
-version = "2.0.0-rc.0"
-description = "Use hardware security-keys in your Tauri App."
-authors = { workspace = true }
-license = { workspace = true }
-edition = { workspace = true }
-rust-version = { workspace = true }
-repository = { workspace = true }
-links = "tauri-plugin-authenticator"
-
-[package.metadata.docs.rs]
-rustc-args = [ "--cfg", "docsrs" ]
-rustdoc-args = [ "--cfg", "docsrs" ]
-
-[build-dependencies]
-tauri-plugin = { workspace = true, features = [ "build" ] }
-
-[dependencies]
-serde = { workspace = true }
-serde_json = { workspace = true }
-tauri = { workspace = true }
-log = { workspace = true }
-thiserror = { workspace = true }
-
-[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
-authenticator = "0.3.1"
-once_cell = "1"
-sha2 = "0.10"
-base64 = "0.22"
-chrono = "0.4"
-bytes = "1"
-byteorder = "1"
-openssl = "0.10"
-
-[target."cfg(target_os = \"windows\")".dependencies]
-winapi-util = "=0.1.6"
-
-[dev-dependencies]
-rand = "0.8"
-rusty-fork = "0.3"
diff --git a/plugins/authenticator/README.md b/plugins/authenticator/README.md
deleted file mode 100644
index a4128555..00000000
--- a/plugins/authenticator/README.md
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-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.75**_
-
-There are three general methods of installation that we can recommend.
-
-1. Use crates.io and npm (easiest and requires you to trust that our publishing pipeline worked)
-2. Pull sources directly from Github using git tags / revision hashes (most secure)
-3. Git submodule install this repo in your tauri project and then use the file protocol to ingest the source (most secure, but inconvenient to use)
-
-Install the authenticator plugin by adding the following lines to your `Cargo.toml` file:
-
-`src-tauri/Cargo.toml`
-
-```toml
-# 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-rc"
-# alternatively with Git:
-tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
-```
-
-You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
-
-> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
-
-```sh
-pnpm add @tauri-apps/plugin-authenticator
-# or
-npm add @tauri-apps/plugin-authenticator
-# or
-yarn add @tauri-apps/plugin-authenticator
-```
-
-Alternatively with Git:
-
-```sh
-pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#v2
-# or
-npm add https://github.com/tauri-apps/tauri-plugin-authenticator#v2
-# or
-yarn add https://github.com/tauri-apps/tauri-plugin-authenticator#v2
-```
-
-## Usage
-
-First, you need to register the authenticator plugin with Tauri:
-
-`src-tauri/src/main.rs`
-
-```rust
-fn main() {
- tauri::Builder::default()
- .setup(|app| {
- #[cfg(desktop)]
- app.handle().plugin(tauri_plugin_authenticator::init())?;
- Ok(())
- })
- .run(tauri::generate_context!())
- .expect("error while running tauri application");
-}
-```
-
-Afterwards, all the plugin's APIs are available through the JavaScript guest bindings:
-
-```javascript
-import { Authenticator } from "@tauri-apps/plugin-authenticator";
-
-const auth = new Authenticator();
-auth.init(); // initialize transports
-
-// generate a 32-bytes long random challenge
-const arr = new Uint32Array(32);
-window.crypto.getRandomValues(arr);
-const b64 = btoa(String.fromCharCode.apply(null, arr));
-// web-safe base64
-const challenge = b64.replace(/\+/g, "-").replace(/\//g, "_");
-
-const domain = "https://tauri.app";
-
-// attempt to register with the security key
-const json = await auth.register(challenge, domain);
-const registerResult = JSON.parse(json);
-
-// verify the registration was successful
-const r2 = await auth.verifyRegistration(
- challenge,
- app,
- registerResult.registerData,
- registerResult.clientData,
-);
-const j2 = JSON.parse(r2);
-
-// sign some data
-const json = await auth.sign(challenge, app, keyHandle);
-const signData = JSON.parse(json);
-
-// verify the signature again
-const counter = await auth.verifySignature(
- challenge,
- app,
- signData.signData,
- clientData,
- keyHandle,
- pubkey,
-);
-
-if (counter && counter > 0) {
- console.log("SUCCESS!");
-}
-```
-
-## Contributing
-
-PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
-
-## Partners
-
-
-
-
-
-
-
-
- |
-
-
-
-
-For the complete list of sponsors please visit our [website](https://tauri.app#sponsors) and [Open Collective](https://opencollective.com/tauri).
-
-## License
-
-Code: (c) 2015 - Present - The Tauri Programme within The Commons Conservancy.
-
-MIT or MIT/Apache 2.0 where applicable.
diff --git a/plugins/authenticator/api-iife.js b/plugins/authenticator/api-iife.js
deleted file mode 100644
index 7732dcff..00000000
--- a/plugins/authenticator/api-iife.js
+++ /dev/null
@@ -1 +0,0 @@
-if("__TAURI__"in window){var __TAURI_PLUGIN_AUTHENTICATOR__=function(t){"use strict";async function i(t,i={},a){return window.__TAURI_INTERNALS__.invoke(t,i,a)}"function"==typeof SuppressedError&&SuppressedError;return t.Authenticator=class{async init(){await i("plugin:authenticator|init_auth")}async register(t,a){return await i("plugin:authenticator|register",{timeout:1e4,challenge:t,application:a})}async verifyRegistration(t,a,e,n){return await i("plugin:authenticator|verify_registration",{challenge:t,application:a,registerData:e,clientData:n})}async sign(t,a,e){return await i("plugin:authenticator|sign",{timeout:1e4,challenge:t,application:a,keyHandle:e})}async verifySignature(t,a,e,n,r,u){return await i("plugin:authenticator|verify_signature",{challenge:t,application:a,signData:e,clientData:n,keyHandle:r,pubkey:u})}},t}({});Object.defineProperty(window.__TAURI__,"authenticator",{value:__TAURI_PLUGIN_AUTHENTICATOR__})}
diff --git a/plugins/authenticator/banner.png b/plugins/authenticator/banner.png
deleted file mode 100644
index 405dc601..00000000
Binary files a/plugins/authenticator/banner.png and /dev/null differ
diff --git a/plugins/authenticator/build.rs b/plugins/authenticator/build.rs
deleted file mode 100644
index 8b4c860e..00000000
--- a/plugins/authenticator/build.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-const COMMANDS: &[&str] = &[
- "init_auth",
- "register",
- "verify_registration",
- "sign",
- "verify_signature",
-];
-
-fn main() {
- tauri_plugin::Builder::new(COMMANDS)
- .global_api_script_path("./api-iife.js")
- .build();
-}
diff --git a/plugins/authenticator/guest-js/index.ts b/plugins/authenticator/guest-js/index.ts
deleted file mode 100644
index bbd45e9f..00000000
--- a/plugins/authenticator/guest-js/index.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-import { invoke } from "@tauri-apps/api/core";
-
-export class Authenticator {
- async init(): Promise
{
- await invoke("plugin:authenticator|init_auth");
- }
-
- async register(challenge: string, application: string): Promise {
- return await invoke("plugin:authenticator|register", {
- timeout: 10000,
- challenge,
- application,
- });
- }
-
- async verifyRegistration(
- challenge: string,
- application: string,
- registerData: string,
- clientData: string,
- ): Promise {
- return await invoke("plugin:authenticator|verify_registration", {
- challenge,
- application,
- registerData,
- clientData,
- });
- }
-
- async sign(
- challenge: string,
- application: string,
- keyHandle: string,
- ): Promise {
- return await invoke("plugin:authenticator|sign", {
- timeout: 10000,
- challenge,
- application,
- keyHandle,
- });
- }
-
- async verifySignature(
- challenge: string,
- application: string,
- signData: string,
- clientData: string,
- keyHandle: string,
- pubkey: string,
- ): Promise {
- return await invoke("plugin:authenticator|verify_signature", {
- challenge,
- application,
- signData,
- clientData,
- keyHandle,
- pubkey,
- });
- }
-}
diff --git a/plugins/authenticator/permissions/autogenerated/commands/init_auth.toml b/plugins/authenticator/permissions/autogenerated/commands/init_auth.toml
deleted file mode 100644
index 4781773e..00000000
--- a/plugins/authenticator/permissions/autogenerated/commands/init_auth.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-# Automatically generated - DO NOT EDIT!
-
-"$schema" = "../../schemas/schema.json"
-
-[[permission]]
-identifier = "allow-init-auth"
-description = "Enables the init_auth command without any pre-configured scope."
-commands.allow = ["init_auth"]
-
-[[permission]]
-identifier = "deny-init-auth"
-description = "Denies the init_auth command without any pre-configured scope."
-commands.deny = ["init_auth"]
diff --git a/plugins/authenticator/permissions/autogenerated/commands/register.toml b/plugins/authenticator/permissions/autogenerated/commands/register.toml
deleted file mode 100644
index 4eec17dc..00000000
--- a/plugins/authenticator/permissions/autogenerated/commands/register.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-# Automatically generated - DO NOT EDIT!
-
-"$schema" = "../../schemas/schema.json"
-
-[[permission]]
-identifier = "allow-register"
-description = "Enables the register command without any pre-configured scope."
-commands.allow = ["register"]
-
-[[permission]]
-identifier = "deny-register"
-description = "Denies the register command without any pre-configured scope."
-commands.deny = ["register"]
diff --git a/plugins/authenticator/permissions/autogenerated/commands/sign.toml b/plugins/authenticator/permissions/autogenerated/commands/sign.toml
deleted file mode 100644
index f8b6a778..00000000
--- a/plugins/authenticator/permissions/autogenerated/commands/sign.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-# Automatically generated - DO NOT EDIT!
-
-"$schema" = "../../schemas/schema.json"
-
-[[permission]]
-identifier = "allow-sign"
-description = "Enables the sign command without any pre-configured scope."
-commands.allow = ["sign"]
-
-[[permission]]
-identifier = "deny-sign"
-description = "Denies the sign command without any pre-configured scope."
-commands.deny = ["sign"]
diff --git a/plugins/authenticator/permissions/autogenerated/commands/verify_registration.toml b/plugins/authenticator/permissions/autogenerated/commands/verify_registration.toml
deleted file mode 100644
index f6b15d58..00000000
--- a/plugins/authenticator/permissions/autogenerated/commands/verify_registration.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-# Automatically generated - DO NOT EDIT!
-
-"$schema" = "../../schemas/schema.json"
-
-[[permission]]
-identifier = "allow-verify-registration"
-description = "Enables the verify_registration command without any pre-configured scope."
-commands.allow = ["verify_registration"]
-
-[[permission]]
-identifier = "deny-verify-registration"
-description = "Denies the verify_registration command without any pre-configured scope."
-commands.deny = ["verify_registration"]
diff --git a/plugins/authenticator/permissions/autogenerated/commands/verify_signature.toml b/plugins/authenticator/permissions/autogenerated/commands/verify_signature.toml
deleted file mode 100644
index 90b24095..00000000
--- a/plugins/authenticator/permissions/autogenerated/commands/verify_signature.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-# Automatically generated - DO NOT EDIT!
-
-"$schema" = "../../schemas/schema.json"
-
-[[permission]]
-identifier = "allow-verify-signature"
-description = "Enables the verify_signature command without any pre-configured scope."
-commands.allow = ["verify_signature"]
-
-[[permission]]
-identifier = "deny-verify-signature"
-description = "Denies the verify_signature command without any pre-configured scope."
-commands.deny = ["verify_signature"]
diff --git a/plugins/authenticator/permissions/autogenerated/reference.md b/plugins/authenticator/permissions/autogenerated/reference.md
deleted file mode 100644
index 1df292f1..00000000
--- a/plugins/authenticator/permissions/autogenerated/reference.md
+++ /dev/null
@@ -1,140 +0,0 @@
-
-## Permission Table
-
-
-
-Identifier |
-Description |
-
-
-
-
-
-
-`authenticator:allow-init-auth`
-
- |
-
-
-Enables the init_auth command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:deny-init-auth`
-
- |
-
-
-Denies the init_auth command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:allow-register`
-
- |
-
-
-Enables the register command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:deny-register`
-
- |
-
-
-Denies the register command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:allow-sign`
-
- |
-
-
-Enables the sign command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:deny-sign`
-
- |
-
-
-Denies the sign command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:allow-verify-registration`
-
- |
-
-
-Enables the verify_registration command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:deny-verify-registration`
-
- |
-
-
-Denies the verify_registration command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:allow-verify-signature`
-
- |
-
-
-Enables the verify_signature command without any pre-configured scope.
-
- |
-
-
-
-
-
-`authenticator:deny-verify-signature`
-
- |
-
-
-Denies the verify_signature command without any pre-configured scope.
-
- |
-
-
diff --git a/plugins/authenticator/rollup.config.js b/plugins/authenticator/rollup.config.js
deleted file mode 100644
index 977dfac8..00000000
--- a/plugins/authenticator/rollup.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-import { createConfig } from "../../shared/rollup.config.js";
-
-export default createConfig();
diff --git a/plugins/authenticator/src/auth.rs b/plugins/authenticator/src/auth.rs
deleted file mode 100644
index 34bc332b..00000000
--- a/plugins/authenticator/src/auth.rs
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-use authenticator::{
- authenticatorservice::AuthenticatorService, statecallback::StateCallback,
- AuthenticatorTransports, KeyHandle, RegisterFlags, SignFlags, StatusUpdate,
-};
-use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
-use once_cell::sync::Lazy;
-use serde::Serialize;
-use sha2::{Digest, Sha256};
-use std::io;
-use std::sync::mpsc::channel;
-use std::{convert::Into, sync::Mutex};
-
-static MANAGER: Lazy> = Lazy::new(|| {
- let manager = AuthenticatorService::new().expect("The auth service should initialize safely");
- Mutex::new(manager)
-});
-
-pub fn init_usb() {
- let mut manager = MANAGER.lock().unwrap();
- // theres also "add_detected_transports()" in the docs?
- manager.add_u2f_usb_hid_platform_transports();
-}
-
-#[derive(Serialize, Clone)]
-#[serde(rename_all = "camelCase")]
-pub struct Registration {
- pub key_handle: String,
- pub pubkey: String,
- pub register_data: String,
- pub client_data: String,
-}
-
-pub fn register(application: String, timeout: u64, challenge: String) -> crate::Result {
- let (chall_bytes, app_bytes, client_data_string) =
- format_client_data(application.as_str(), challenge.as_str());
-
- // log the status rx?
- let (status_tx, _status_rx) = channel::();
-
- let mut manager = MANAGER.lock().unwrap();
-
- let (register_tx, register_rx) = channel();
- let callback = StateCallback::new(Box::new(move |rv| {
- register_tx.send(rv).unwrap();
- }));
-
- let res = manager.register(
- RegisterFlags::empty(),
- timeout,
- chall_bytes,
- app_bytes,
- vec![],
- status_tx,
- callback,
- );
-
- match res {
- Ok(_r) => {
- let register_result = register_rx
- .recv()
- .expect("Problem receiving, unable to continue");
-
- if let Err(e) = register_result {
- return Err(e.into());
- }
-
- let (register_data, device_info) = register_result.unwrap(); // error already has been checked
-
- // println!("Register result: {}", base64::encode(®ister_data));
- println!("Device info: {}", &device_info);
-
- let (key_handle, public_key) =
- _u2f_get_key_handle_and_public_key_from_register_response(®ister_data).unwrap();
- let key_handle_base64 = URL_SAFE_NO_PAD.encode(key_handle);
- let public_key_base64 = URL_SAFE_NO_PAD.encode(public_key);
- let register_data_base64 = URL_SAFE_NO_PAD.encode(®ister_data);
- println!("Key Handle: {}", &key_handle_base64);
- println!("Public Key: {}", &public_key_base64);
-
- // Ok(base64::encode(®ister_data))
- // Ok(key_handle_base64)
- let res = serde_json::to_string(&Registration {
- key_handle: key_handle_base64,
- pubkey: public_key_base64,
- register_data: register_data_base64,
- client_data: client_data_string,
- })?;
- Ok(res)
- }
- Err(e) => Err(e.into()),
- }
-}
-
-#[derive(Serialize, Clone)]
-#[serde(rename_all = "camelCase")]
-pub struct Signature {
- pub key_handle: String,
- pub sign_data: String,
-}
-
-pub fn sign(
- application: String,
- timeout: u64,
- challenge: String,
- key_handle: String,
-) -> crate::Result {
- let credential = match URL_SAFE_NO_PAD.decode(key_handle) {
- Ok(v) => v,
- Err(e) => {
- return Err(e.into());
- }
- };
- let key_handle = KeyHandle {
- credential,
- transports: AuthenticatorTransports::empty(),
- };
-
- let (chall_bytes, app_bytes, _) = format_client_data(application.as_str(), challenge.as_str());
-
- let (sign_tx, sign_rx) = channel();
- let callback = StateCallback::new(Box::new(move |rv| {
- sign_tx.send(rv).unwrap();
- }));
-
- // log the status rx?
- let (status_tx, _status_rx) = channel::();
-
- let mut manager = MANAGER.lock().unwrap();
-
- let res = manager.sign(
- SignFlags::empty(),
- timeout,
- chall_bytes,
- vec![app_bytes],
- vec![key_handle],
- status_tx,
- callback,
- );
- match res {
- Ok(_v) => {
- let sign_result = sign_rx
- .recv()
- .expect("Problem receiving, unable to continue");
-
- if let Err(e) = sign_result {
- return Err(e.into());
- }
-
- let (_, handle_used, sign_data, device_info) = sign_result.unwrap();
-
- let sig = URL_SAFE_NO_PAD.encode(sign_data);
-
- println!("Sign result: {sig}");
- println!("Key handle used: {}", URL_SAFE_NO_PAD.encode(&handle_used));
- println!("Device info: {}", &device_info);
- println!("Done.");
-
- let res = serde_json::to_string(&Signature {
- sign_data: sig,
- key_handle: URL_SAFE_NO_PAD.encode(&handle_used),
- })?;
- Ok(res)
- }
- Err(e) => Err(e.into()),
- }
-}
-
-fn format_client_data(application: &str, challenge: &str) -> (Vec, Vec, String) {
- let d =
- format!(r#"{{"challenge": "{challenge}", "version": "U2F_V2", "appId": "{application}"}}"#);
- let mut challenge = Sha256::new();
- challenge.update(d.as_bytes());
- let chall_bytes = challenge.finalize().to_vec();
-
- let mut app = Sha256::new();
- app.update(application.as_bytes());
- let app_bytes = app.finalize().to_vec();
-
- (chall_bytes, app_bytes, d)
-}
-
-fn _u2f_get_key_handle_and_public_key_from_register_response(
- register_response: &[u8],
-) -> io::Result<(Vec, Vec)> {
- if register_response[0] != 0x05 {
- return Err(io::Error::new(
- io::ErrorKind::InvalidData,
- "Reserved byte not set correctly",
- ));
- }
-
- // 1: reserved
- // 65: public key
- // 1: key handle length
- // key handle
- // x.509 cert
- // sig
-
- let key_handle_len = register_response[66] as usize;
- let mut public_key = register_response.to_owned();
- let mut key_handle = public_key.split_off(67);
- let _attestation = key_handle.split_off(key_handle_len);
-
- // remove fist (reserved) and last (handle len) bytes
- let pk: Vec = public_key[1..public_key.len() - 1].to_vec();
-
- Ok((key_handle, pk))
-}
diff --git a/plugins/authenticator/src/lib.rs b/plugins/authenticator/src/lib.rs
deleted file mode 100644
index 0e3e9f05..00000000
--- a/plugins/authenticator/src/lib.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/authenticator)
-//!
-//! Use hardware security-keys in your Tauri App.
-//!
-//! - Supported platforms: Windows, Linux, FreeBSD, NetBSD, OpenBSD, and macOS.
-
-#![doc(
- html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
- html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
-)]
-#![cfg(not(any(target_os = "android", target_os = "ios")))]
-
-mod auth;
-mod error;
-mod u2f;
-mod u2f_crate;
-
-use tauri::{
- plugin::{Builder as PluginBuilder, TauriPlugin},
- Runtime,
-};
-
-pub use error::Error;
-type Result = std::result::Result;
-
-#[tauri::command]
-fn init_auth() {
- auth::init_usb();
-}
-
-#[tauri::command]
-fn register(timeout: u64, challenge: String, application: String) -> crate::Result {
- auth::register(application, timeout, challenge)
-}
-
-#[tauri::command]
-fn verify_registration(
- challenge: String,
- application: String,
- register_data: String,
- client_data: String,
-) -> crate::Result {
- u2f::verify_registration(application, challenge, register_data, client_data)
-}
-
-#[tauri::command]
-fn sign(
- timeout: u64,
- challenge: String,
- application: String,
- key_handle: String,
-) -> crate::Result {
- auth::sign(application, timeout, challenge, key_handle)
-}
-
-#[tauri::command]
-fn verify_signature(
- challenge: String,
- application: String,
- sign_data: String,
- client_data: String,
- key_handle: String,
- pubkey: String,
-) -> crate::Result {
- u2f::verify_signature(
- application,
- challenge,
- sign_data,
- client_data,
- key_handle,
- pubkey,
- )
-}
-
-pub fn init() -> TauriPlugin {
- PluginBuilder::new("authenticator")
- .invoke_handler(tauri::generate_handler![
- init_auth,
- register,
- verify_registration,
- sign,
- verify_signature
- ])
- .build()
-}
diff --git a/plugins/authenticator/src/u2f.rs b/plugins/authenticator/src/u2f.rs
deleted file mode 100644
index 9e246094..00000000
--- a/plugins/authenticator/src/u2f.rs
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-use crate::u2f_crate::messages::*;
-use crate::u2f_crate::protocol::*;
-use crate::u2f_crate::register::*;
-use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
-use chrono::prelude::*;
-use serde::Serialize;
-use std::convert::Into;
-
-static VERSION: &str = "U2F_V2";
-
-pub fn make_challenge(app_id: &str, challenge_bytes: Vec) -> Challenge {
- let utc: DateTime = Utc::now();
- Challenge {
- challenge: URL_SAFE_NO_PAD.encode(challenge_bytes),
- timestamp: format!("{utc:?}"),
- app_id: app_id.to_string(),
- }
-}
-
-#[derive(Serialize, Clone)]
-#[serde(rename_all = "camelCase")]
-pub struct RegistrationVerification {
- pub key_handle: String,
- pub pubkey: String,
- pub device_name: Option,
-}
-
-pub fn verify_registration(
- app_id: String,
- challenge: String,
- register_data: String,
- client_data: String,
-) -> crate::Result {
- let challenge_bytes = URL_SAFE_NO_PAD.decode(challenge)?;
- let challenge = make_challenge(&app_id, challenge_bytes);
- let client_data_bytes: Vec = client_data.as_bytes().into();
- let client_data_base64 = URL_SAFE_NO_PAD.encode(client_data_bytes);
- let client = U2f::new(app_id);
- match client.register_response(
- challenge,
- RegisterResponse {
- registration_data: register_data,
- client_data: client_data_base64,
- version: VERSION.to_string(),
- },
- ) {
- Ok(v) => {
- let rv = RegistrationVerification {
- key_handle: URL_SAFE_NO_PAD.encode(&v.key_handle),
- pubkey: URL_SAFE_NO_PAD.encode(&v.pub_key),
- device_name: v.device_name,
- };
- Ok(serde_json::to_string(&rv)?)
- }
- Err(e) => Err(e.into()),
- }
-}
-
-#[derive(Serialize, Clone)]
-#[serde(rename_all = "camelCase")]
-pub struct SignatureVerification {
- pub counter: u8,
-}
-
-pub fn verify_signature(
- app_id: String,
- challenge: String,
- sign_data: String,
- client_data: String,
- key_handle: String,
- pub_key: String,
-) -> crate::Result {
- let challenge_bytes = URL_SAFE_NO_PAD.decode(challenge)?;
- let chal = make_challenge(&app_id, challenge_bytes);
- let client_data_bytes: Vec = client_data.as_bytes().into();
- let client_data_base64 = URL_SAFE_NO_PAD.encode(client_data_bytes);
- let key_handle_bytes = URL_SAFE_NO_PAD.decode(&key_handle)?;
- let pubkey_bytes = URL_SAFE_NO_PAD.decode(pub_key)?;
- let client = U2f::new(app_id);
- let mut _counter: u32 = 0;
- match client.sign_response(
- chal,
- Registration {
- // here only needs pubkey and keyhandle
- key_handle: key_handle_bytes,
- pub_key: pubkey_bytes,
- attestation_cert: None,
- device_name: None,
- },
- SignResponse {
- // here needs client data and sig data and key_handle
- signature_data: sign_data,
- client_data: client_data_base64,
- key_handle,
- },
- _counter,
- ) {
- Ok(v) => Ok(v),
- Err(e) => Err(e.into()),
- }
-}
diff --git a/plugins/authenticator/src/u2f_crate/LICENSE b/plugins/authenticator/src/u2f_crate/LICENSE
deleted file mode 100644
index d26d5f6c..00000000
--- a/plugins/authenticator/src/u2f_crate/LICENSE
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) 2017
-
-Licensed under either of
-
- * Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license (http://opensource.org/licenses/MIT)
-
-at your option.
\ No newline at end of file
diff --git a/plugins/authenticator/src/u2f_crate/authorization.rs b/plugins/authenticator/src/u2f_crate/authorization.rs
deleted file mode 100644
index 0e667ea6..00000000
--- a/plugins/authenticator/src/u2f_crate/authorization.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-use bytes::{Buf, BufMut};
-use openssl::sha::sha256;
-use serde::Serialize;
-use std::io::Cursor;
-
-use crate::u2f_crate::u2ferror::U2fError;
-
-/// The `Result` type used in this crate.
-type Result = ::std::result::Result;
-
-#[derive(Serialize, Clone)]
-#[serde(rename_all = "camelCase")]
-pub struct Authorization {
- pub counter: u32,
- pub user_presence: bool,
-}
-
-pub fn parse_sign_response(
- app_id: String,
- client_data: Vec,
- public_key: Vec,
- sign_data: Vec,
-) -> Result {
- if sign_data.len() <= 5 {
- return Err(U2fError::InvalidSignatureData);
- }
-
- let user_presence_flag = &sign_data[0];
- let counter = &sign_data[1..=4];
- let signature = &sign_data[5..];
-
- // Let's build the msg to verify the signature
- let app_id_hash = sha256(&app_id.into_bytes());
- let client_data_hash = sha256(&client_data[..]);
-
- let mut msg = vec![];
- msg.put(app_id_hash.as_ref());
- msg.put_u8(*user_presence_flag);
- msg.put(counter);
- msg.put(client_data_hash.as_ref());
-
- let public_key = super::crypto::NISTP256Key::from_bytes(&public_key)?;
-
- // The signature is to be verified by the relying party using the public key obtained during registration.
- let verified = public_key.verify_signature(signature, msg.as_ref())?;
- if !verified {
- return Err(U2fError::BadSignature);
- }
-
- let authorization = Authorization {
- counter: get_counter(counter),
- user_presence: true,
- };
-
- Ok(authorization)
-}
-
-fn get_counter(counter: &[u8]) -> u32 {
- let mut buf = Cursor::new(counter);
- buf.get_u32()
-}
diff --git a/plugins/authenticator/src/u2f_crate/crypto.rs b/plugins/authenticator/src/u2f_crate/crypto.rs
deleted file mode 100644
index ddcdf1b6..00000000
--- a/plugins/authenticator/src/u2f_crate/crypto.rs
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-//! Cryptographic operation wrapper for Webauthn. This module exists to
-//! allow ease of auditing, safe operation wrappers for the webauthn library,
-//! and cryptographic provider abstraction. This module currently uses OpenSSL
-//! as the cryptographic primitive provider.
-
-// Source can be found here: https://github.com/Firstyear/webauthn-rs/blob/master/src/crypto.rs
-
-#![allow(non_camel_case_types)]
-
-use openssl::{bn, ec, hash, nid, sign, x509};
-use std::convert::TryFrom;
-
-// use super::constants::*;
-use crate::u2f_crate::u2ferror::U2fError;
-use openssl::pkey::Public;
-
-// use super::proto::*;
-
-// Why OpenSSL over another rust crate?
-// - Well, the openssl crate allows us to reconstruct a public key from the
-// x/y group coords, where most others want a pkcs formatted structure. As
-// a result, it's easiest to use openssl as it gives us exactly what we need
-// for these operations, and despite it's many challenges as a library, it
-// has resources and investment into it's maintenance, so we can a least
-// assert a higher level of confidence in it that .
-
-// Object({Integer(-3): Bytes([48, 185, 178, 204, 113, 186, 105, 138, 190, 33, 160, 46, 131, 253, 100, 177, 91, 243, 126, 128, 245, 119, 209, 59, 186, 41, 215, 196, 24, 222, 46, 102]), Integer(-2): Bytes([158, 212, 171, 234, 165, 197, 86, 55, 141, 122, 253, 6, 92, 242, 242, 114, 158, 221, 238, 163, 127, 214, 120, 157, 145, 226, 232, 250, 144, 150, 218, 138]), Integer(-1): U64(1), Integer(1): U64(2), Integer(3): I64(-7)})
-//
-
-/// An X509PublicKey. This is what is otherwise known as a public certificate
-/// which comprises a public key and other signed metadata related to the issuer
-/// of the key.
-pub struct X509PublicKey {
- pubk: x509::X509,
-}
-
-impl std::fmt::Debug for X509PublicKey {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- write!(f, "X509PublicKey")
- }
-}
-
-impl TryFrom<&[u8]> for X509PublicKey {
- type Error = U2fError;
-
- // Must be DER bytes. If you have PEM, base64decode first!
- fn try_from(d: &[u8]) -> Result {
- let pubk = x509::X509::from_der(d)?;
- Ok(X509PublicKey { pubk })
- }
-}
-
-impl X509PublicKey {
- pub(crate) fn common_name(&self) -> Option {
- let cert = &self.pubk;
-
- let subject = cert.subject_name();
- let common = subject
- .entries_by_nid(openssl::nid::Nid::COMMONNAME)
- .next()
- .map(|b| b.data().as_slice());
-
- if let Some(common) = common {
- std::str::from_utf8(common).ok().map(|s| s.to_string())
- } else {
- None
- }
- }
-
- pub(crate) fn is_secp256r1(&self) -> Result {
- // Can we get the public key?
- let pk = self.pubk.public_key()?;
-
- let ec_key = pk.ec_key()?;
-
- ec_key.check_key()?;
-
- let ec_grpref = ec_key.group();
-
- let ec_curve = ec_grpref.curve_name().ok_or(U2fError::OpenSSLNoCurveName)?;
-
- Ok(ec_curve == nid::Nid::X9_62_PRIME256V1)
- }
-
- pub(crate) fn verify_signature(
- &self,
- signature: &[u8],
- verification_data: &[u8],
- ) -> Result {
- let pkey = self.pubk.public_key()?;
-
- // TODO: Should this determine the hash type from the x509 cert? Or other?
- let mut verifier = sign::Verifier::new(hash::MessageDigest::sha256(), &pkey)?;
- verifier.update(verification_data)?;
- Ok(verifier.verify(signature)?)
- }
-}
-
-pub struct NISTP256Key {
- /// The key's public X coordinate.
- pub x: [u8; 32],
- /// The key's public Y coordinate.
- pub y: [u8; 32],
-}
-
-impl NISTP256Key {
- pub fn from_bytes(public_key_bytes: &[u8]) -> Result {
- if public_key_bytes.len() != 65 {
- return Err(U2fError::InvalidPublicKey);
- }
-
- if public_key_bytes[0] != 0x04 {
- return Err(U2fError::InvalidPublicKey);
- }
-
- let mut x: [u8; 32] = Default::default();
- x.copy_from_slice(&public_key_bytes[1..=32]);
-
- let mut y: [u8; 32] = Default::default();
- y.copy_from_slice(&public_key_bytes[33..=64]);
-
- Ok(NISTP256Key { x, y })
- }
-
- fn get_key(&self) -> Result, U2fError> {
- let ec_group = ec::EcGroup::from_curve_name(openssl::nid::Nid::X9_62_PRIME256V1)?;
-
- let xbn = bn::BigNum::from_slice(&self.x)?;
- let ybn = bn::BigNum::from_slice(&self.y)?;
-
- let ec_key = openssl::ec::EcKey::from_public_key_affine_coordinates(&ec_group, &xbn, &ybn)?;
-
- // Validate the key is sound. IIRC this actually checks the values
- // are correctly on the curve as specified
- ec_key.check_key()?;
-
- Ok(ec_key)
- }
-
- pub fn verify_signature(
- &self,
- signature: &[u8],
- verification_data: &[u8],
- ) -> Result {
- let pkey = self.get_key()?;
-
- let signature = openssl::ecdsa::EcdsaSig::from_der(signature)?;
- let hash = openssl::sha::sha256(verification_data);
-
- Ok(signature.verify(hash.as_ref(), &pkey)?)
- }
-}
diff --git a/plugins/authenticator/src/u2f_crate/messages.rs b/plugins/authenticator/src/u2f_crate/messages.rs
deleted file mode 100644
index fbae9511..00000000
--- a/plugins/authenticator/src/u2f_crate/messages.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-// As defined by FIDO U2F Javascript API.
-// https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-javascript-api.html#registration
-
-use serde::{Deserialize, Serialize};
-
-#[derive(Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct U2fRegisterRequest {
- pub app_id: String,
- pub register_requests: Vec,
- pub registered_keys: Vec,
-}
-
-#[derive(Serialize)]
-pub struct RegisterRequest {
- pub version: String,
- pub challenge: String,
-}
-
-#[derive(Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct RegisteredKey {
- pub version: String,
- pub key_handle: Option,
- pub app_id: String,
-}
-
-#[derive(Deserialize)]
-#[serde(rename_all = "camelCase")]
-pub struct RegisterResponse {
- pub registration_data: String,
- #[allow(unused)]
- pub version: String,
- pub client_data: String,
-}
-
-#[derive(Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct U2fSignRequest {
- pub app_id: String,
- pub challenge: String,
- pub registered_keys: Vec,
-}
-
-#[derive(Clone, Deserialize)]
-#[serde(rename_all = "camelCase")]
-pub struct SignResponse {
- pub key_handle: String,
- pub signature_data: String,
- pub client_data: String,
-}
diff --git a/plugins/authenticator/src/u2f_crate/mod.rs b/plugins/authenticator/src/u2f_crate/mod.rs
deleted file mode 100644
index ab2a1e0c..00000000
--- a/plugins/authenticator/src/u2f_crate/mod.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-mod util;
-
-pub mod authorization;
-mod crypto;
-pub mod messages;
-pub mod protocol;
-pub mod register;
-pub mod u2ferror;
diff --git a/plugins/authenticator/src/u2f_crate/protocol.rs b/plugins/authenticator/src/u2f_crate/protocol.rs
deleted file mode 100644
index aa4259e9..00000000
--- a/plugins/authenticator/src/u2f_crate/protocol.rs
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-use crate::u2f_crate::authorization::*;
-use crate::u2f_crate::messages::*;
-use crate::u2f_crate::register::*;
-use crate::u2f_crate::u2ferror::U2fError;
-use crate::u2f_crate::util::*;
-
-use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
-use chrono::prelude::*;
-use chrono::Duration;
-use serde::{Deserialize, Serialize};
-
-type Result = ::std::result::Result;
-
-#[derive(Clone)]
-pub struct U2f {
- app_id: String,
-}
-
-#[derive(Deserialize, Serialize, Clone)]
-#[serde(rename_all = "camelCase")]
-pub struct Challenge {
- pub app_id: String,
- pub challenge: String,
- pub timestamp: String,
-}
-
-impl Challenge {
- // Not used in this plugin.
- #[allow(dead_code)]
- pub fn new() -> Self {
- Challenge {
- app_id: String::new(),
- challenge: String::new(),
- timestamp: String::new(),
- }
- }
-}
-
-impl U2f {
- // The app ID is a string used to uniquely identify an U2F app
- pub fn new(app_id: String) -> Self {
- U2f { app_id }
- }
-
- // Not used in this plugin.
- #[allow(dead_code)]
- pub fn generate_challenge(&self) -> Result {
- let utc: DateTime = Utc::now();
-
- let challenge_bytes = generate_challenge(32)?;
- let challenge = Challenge {
- challenge: URL_SAFE_NO_PAD.encode(challenge_bytes),
- timestamp: format!("{:?}", utc),
- app_id: self.app_id.clone(),
- };
-
- Ok(challenge.clone())
- }
-
- // Not used in this plugin.
- #[allow(dead_code)]
- pub fn request(
- &self,
- challenge: Challenge,
- registrations: Vec,
- ) -> Result {
- let u2f_request = U2fRegisterRequest {
- app_id: self.app_id.clone(),
- register_requests: self.register_request(challenge),
- registered_keys: self.registered_keys(registrations),
- };
-
- Ok(u2f_request)
- }
-
- fn register_request(&self, challenge: Challenge) -> Vec {
- let mut requests: Vec = vec![];
-
- let request = RegisterRequest {
- version: U2F_V2.into(),
- challenge: challenge.challenge,
- };
- requests.push(request);
-
- requests
- }
-
- pub fn register_response(
- &self,
- challenge: Challenge,
- response: RegisterResponse,
- ) -> Result {
- // Safe to unwrap since 300 is within the constraints of Duration::try_seconds
- if expiration(challenge.timestamp) > Duration::try_seconds(300).unwrap() {
- return Err(U2fError::ChallengeExpired);
- }
-
- let registration_data: Vec = URL_SAFE_NO_PAD
- .decode(&response.registration_data[..])
- .unwrap();
- let client_data: Vec = URL_SAFE_NO_PAD.decode(&response.client_data[..]).unwrap();
-
- parse_registration(challenge.app_id, client_data, registration_data)
- }
-
- fn registered_keys(&self, registrations: Vec) -> Vec {
- let mut keys: Vec = vec![];
-
- for registration in registrations {
- keys.push(get_registered_key(
- self.app_id.clone(),
- registration.key_handle,
- ));
- }
-
- keys
- }
-
- // Not used in this plugin.
- #[allow(dead_code)]
- pub fn sign_request(
- &self,
- challenge: Challenge,
- registrations: Vec,
- ) -> U2fSignRequest {
- let mut keys: Vec = vec![];
-
- for registration in registrations {
- keys.push(get_registered_key(
- self.app_id.clone(),
- registration.key_handle,
- ));
- }
-
- let signed_request = U2fSignRequest {
- app_id: self.app_id.clone(),
- challenge: URL_SAFE_NO_PAD.encode(challenge.challenge.as_bytes()),
- registered_keys: keys,
- };
-
- signed_request
- }
-
- pub fn sign_response(
- &self,
- challenge: Challenge,
- reg: Registration,
- sign_resp: SignResponse,
- counter: u32,
- ) -> Result {
- // Safe to unwrap since 300 is within the constraints of Duration::try_seconds
- if expiration(challenge.timestamp) > Duration::try_seconds(300).unwrap() {
- return Err(U2fError::ChallengeExpired);
- }
-
- if sign_resp.key_handle != get_encoded(®.key_handle[..]) {
- return Err(U2fError::WrongKeyHandler);
- }
-
- let client_data: Vec = URL_SAFE_NO_PAD
- .decode(&sign_resp.client_data[..])
- .map_err(|_e| U2fError::InvalidClientData)?;
- let sign_data: Vec = URL_SAFE_NO_PAD
- .decode(&sign_resp.signature_data[..])
- .map_err(|_e| U2fError::InvalidSignatureData)?;
-
- let public_key = reg.pub_key;
-
- let auth = parse_sign_response(
- self.app_id.clone(),
- client_data.clone(),
- public_key,
- sign_data.clone(),
- );
-
- match auth {
- Ok(ref res) => {
- // CounterTooLow is raised when the counter value received from the device is
- // lower than last stored counter value.
- if res.counter < counter {
- Err(U2fError::CounterTooLow)
- } else {
- Ok(res.counter)
- }
- }
- Err(e) => Err(e),
- }
- }
-}
diff --git a/plugins/authenticator/src/u2f_crate/register.rs b/plugins/authenticator/src/u2f_crate/register.rs
deleted file mode 100644
index 6b47817d..00000000
--- a/plugins/authenticator/src/u2f_crate/register.rs
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-use byteorder::{BigEndian, ByteOrder};
-use bytes::{BufMut, Bytes};
-use openssl::sha::sha256;
-use serde::Serialize;
-
-use crate::u2f_crate::messages::RegisteredKey;
-use crate::u2f_crate::u2ferror::U2fError;
-use crate::u2f_crate::util::*;
-use std::convert::TryFrom;
-
-/// The `Result` type used in this crate.
-type Result = ::std::result::Result;
-
-// Single enrolment or pairing between an application and a token.
-#[derive(Serialize, Clone)]
-#[serde(rename_all = "camelCase")]
-pub struct Registration {
- pub key_handle: Vec,
- pub pub_key: Vec,
-
- // AttestationCert can be null for Authenticate requests.
- pub attestation_cert: Option>,
- pub device_name: Option,
-}
-
-pub fn parse_registration(
- app_id: String,
- client_data: Vec,
- registration_data: Vec,
-) -> Result {
- let reserved_byte = registration_data[0];
- if reserved_byte != 0x05 {
- return Err(U2fError::InvalidReservedByte);
- }
-
- let mut mem = Bytes::from(registration_data);
-
- //Start parsing ... advance the reserved byte.
- let _ = mem.split_to(1);
-
- // P-256 NIST elliptic curve
- let public_key = mem.split_to(65);
-
- // Key Handle
- let key_handle_size = mem.split_to(1);
- let key_len = BigEndian::read_uint(&key_handle_size[..], 1);
- let key_handle = mem.split_to(key_len as usize);
-
- // The certificate length needs to be inferred by parsing.
- let cert_len = asn_length(mem.clone()).unwrap();
- let attestation_certificate = mem.split_to(cert_len);
-
- // Remaining data corresponds to the signature
- let signature = mem;
-
- // Let's build the msg to verify the signature
- let app_id_hash = sha256(&app_id.into_bytes());
- let client_data_hash = sha256(&client_data[..]);
-
- let mut msg = vec![0x00]; // A byte reserved for future use [1 byte] with the value 0x00
- msg.put(app_id_hash.as_ref());
- msg.put(client_data_hash.as_ref());
- msg.put(key_handle.clone());
- msg.put(public_key.clone());
-
- // The signature is to be verified by the relying party using the public key certified
- // in the attestation certificate.
- let cerificate_public_key =
- super::crypto::X509PublicKey::try_from(&attestation_certificate[..])?;
-
- if !(cerificate_public_key.is_secp256r1()?) {
- return Err(U2fError::BadCertificate);
- }
-
- let verified = cerificate_public_key.verify_signature(&signature[..], &msg[..])?;
-
- if !verified {
- return Err(U2fError::BadCertificate);
- }
-
- let registration = Registration {
- key_handle: key_handle[..].to_vec(),
- pub_key: public_key[..].to_vec(),
- attestation_cert: Some(attestation_certificate[..].to_vec()),
- device_name: cerificate_public_key.common_name(),
- };
-
- Ok(registration)
-}
-
-pub fn get_registered_key(app_id: String, key_handle: Vec) -> RegisteredKey {
- RegisteredKey {
- app_id,
- version: U2F_V2.into(),
- key_handle: Some(get_encoded(key_handle.as_slice())),
- }
-}
diff --git a/plugins/authenticator/src/u2f_crate/u2ferror.rs b/plugins/authenticator/src/u2f_crate/u2ferror.rs
deleted file mode 100644
index 377af9d8..00000000
--- a/plugins/authenticator/src/u2f_crate/u2ferror.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-use thiserror::Error;
-
-#[derive(Debug, Error)]
-pub enum U2fError {
- #[error("ASM1 Decoder error")]
- Asm1DecoderError,
- #[error("Not able to verify signature")]
- BadSignature,
- #[error("Not able to generate random bytes")]
- RandomSecureBytesError,
- #[error("Invalid Reserved Byte")]
- InvalidReservedByte,
- #[error("Challenge Expired")]
- ChallengeExpired,
- #[error("Wrong Key Handler")]
- WrongKeyHandler,
- #[error("Invalid Client Data")]
- InvalidClientData,
- #[error("Invalid Signature Data")]
- InvalidSignatureData,
- #[error("Invalid User Presence Byte")]
- InvalidUserPresenceByte,
- #[error("Failed to parse certificate")]
- BadCertificate,
- #[error("Not Trusted Anchor")]
- NotTrustedAnchor,
- #[error("Counter too low")]
- CounterTooLow,
- #[error("Invalid public key")]
- OpenSSLNoCurveName,
- #[error("OpenSSL no curve name")]
- InvalidPublicKey,
- #[error(transparent)]
- OpenSSLError(#[from] openssl::error::ErrorStack),
-}
diff --git a/plugins/authenticator/src/u2f_crate/util.rs b/plugins/authenticator/src/u2f_crate/util.rs
deleted file mode 100644
index 6a7e3fbd..00000000
--- a/plugins/authenticator/src/u2f_crate/util.rs
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2021 Flavio Oliveira
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-use crate::u2f_crate::u2ferror::U2fError;
-use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
-use bytes::Bytes;
-use chrono::prelude::*;
-use chrono::Duration;
-use openssl::rand;
-
-/// The `Result` type used in this crate.
-type Result = ::std::result::Result;
-
-pub const U2F_V2: &str = "U2F_V2";
-
-// Generates a challenge from a secure, random source.
-pub fn generate_challenge(size: usize) -> Result> {
- let mut bytes: Vec = vec![0; size];
- rand::rand_bytes(&mut bytes).map_err(|_e| U2fError::RandomSecureBytesError)?;
- Ok(bytes)
-}
-
-pub fn expiration(timestamp: String) -> Duration {
- let now: DateTime = Utc::now();
-
- let ts = timestamp.parse::>();
-
- now.signed_duration_since(ts.unwrap())
-}
-
-// Decode initial bytes of buffer as ASN and return the length of the encoded structure.
-// http://en.wikipedia.org/wiki/X.690
-pub fn asn_length(mem: Bytes) -> Result {
- let buffer: &[u8] = &mem[..];
-
- if mem.len() < 2 || buffer[0] != 0x30 {
- // Type
- return Err(U2fError::Asm1DecoderError);
- }
-
- let len = buffer[1]; // Len
- if len & 0x80 == 0 {
- return Ok((len & 0x7f) as usize);
- }
-
- let numbem_of_bytes = len & 0x7f;
- if numbem_of_bytes == 0 {
- return Err(U2fError::Asm1DecoderError);
- }
-
- let mut length: usize = 0;
- for num in 0..numbem_of_bytes {
- length = length * 0x100 + (buffer[(2 + num) as usize] as usize);
- }
-
- length += numbem_of_bytes as usize;
-
- Ok(length + 2) // Add the 2 initial bytes: type and length.
-}
-
-pub fn get_encoded(data: &[u8]) -> String {
- let encoded: String = URL_SAFE_NO_PAD.encode(data);
-
- encoded.trim_end_matches('=').to_string()
-}
diff --git a/plugins/autostart/.gitignore b/plugins/autostart/.gitignore
deleted file mode 100644
index b512c09d..00000000
--- a/plugins/autostart/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
\ No newline at end of file
diff --git a/plugins/autostart/CHANGELOG.md b/plugins/autostart/CHANGELOG.md
index 136274b4..85b3d5c1 100644
--- a/plugins/autostart/CHANGELOG.md
+++ b/plugins/autostart/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## \[2.2.0]
+
+- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
+
+## \[2.0.1]
+
+- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
+
+## \[2.0.0]
+
+- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+
+## \[2.0.0-rc.1]
+
+- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+
## \[2.0.0-rc.0]
- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
@@ -76,11 +92,3 @@
## \[2.0.0-alpha.0]
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- te to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
diff --git a/plugins/autostart/Cargo.toml b/plugins/autostart/Cargo.toml
index 52129671..d0a80ddf 100644
--- a/plugins/autostart/Cargo.toml
+++ b/plugins/autostart/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-autostart"
-version = "2.0.0-rc.0"
+version = "2.2.0"
description = "Automatically launch your application at startup."
authors = { workspace = true }
license = { workspace = true }
@@ -10,16 +10,22 @@ repository = { workspace = true }
links = "tauri-plugin-autostart"
[package.metadata.docs.rs]
-rustc-args = [ "--cfg", "docsrs" ]
-rustdoc-args = [ "--cfg", "docsrs" ]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs"]
+
+[package.metadata.platforms.support]
+windows = { level = "full", notes = "" }
+linux = { level = "full", notes = "" }
+macos = { level = "full", notes = "" }
+android = { level = "none", notes = "" }
+ios = { level = "none", notes = "" }
[build-dependencies]
-tauri-plugin = { workspace = true, features = [ "build" ] }
+tauri-plugin = { workspace = true, features = ["build"] }
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true }
-log = { workspace = true }
thiserror = { workspace = true }
auto-launch = "0.5"
diff --git a/plugins/autostart/README.md b/plugins/autostart/README.md
index 58caac0f..76d68f73 100644
--- a/plugins/autostart/README.md
+++ b/plugins/autostart/README.md
@@ -1,10 +1,18 @@

-Automatically launch your application at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
+Automatically launch your application at startup.
+
+| Platform | Supported |
+| -------- | --------- |
+| Linux | ✓ |
+| Windows | ✓ |
+| macOS | ✓ |
+| Android | x |
+| iOS | x |
## Install
-_This plugin requires a Rust version of at least **1.75**_
+_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
-tauri-plugin-autostart = "2.0.0-rc"
+tauri-plugin-autostart = "2.0.0"
# alternatively with Git:
tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -46,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-autostart#v2
First you need to register the core plugin with Tauri:
-`src-tauri/src/main.rs`
+`src-tauri/src/lib.rs`
```rust
use tauri_plugin_autostart::MacosLauncher;
@@ -62,13 +70,13 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
-import { enable, isEnabled, disable } from "@tauri-apps/plugin-autostart";
+import { enable, isEnabled, disable } from '@tauri-apps/plugin-autostart'
-await enable();
+await enable()
-console.log(`registered for autostart? ${await isEnabled()}`);
+console.log(`registered for autostart? ${await isEnabled()}`)
-disable();
+disable()
```
## Contributing
diff --git a/plugins/autostart/SECURITY.md b/plugins/autostart/SECURITY.md
index 67d831fc..4f09bbac 100644
--- a/plugins/autostart/SECURITY.md
+++ b/plugins/autostart/SECURITY.md
@@ -20,4 +20,4 @@ We prefer to receive reports in English.
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
-Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
\ No newline at end of file
+Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
diff --git a/plugins/autostart/guest-js/index.ts b/plugins/autostart/guest-js/index.ts
index 81471b74..fca8344f 100644
--- a/plugins/autostart/guest-js/index.ts
+++ b/plugins/autostart/guest-js/index.ts
@@ -2,16 +2,16 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { invoke } from "@tauri-apps/api/core";
+import { invoke } from '@tauri-apps/api/core'
export async function isEnabled(): Promise {
- return await invoke("plugin:autostart|is_enabled");
+ return await invoke('plugin:autostart|is_enabled')
}
export async function enable(): Promise {
- await invoke("plugin:autostart|enable");
+ await invoke('plugin:autostart|enable')
}
export async function disable(): Promise {
- await invoke("plugin:autostart|disable");
+ await invoke('plugin:autostart|disable')
}
diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json
index 1176bb23..876d9295 100644
--- a/plugins/autostart/package.json
+++ b/plugins/autostart/package.json
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-autostart",
- "version": "2.0.0-rc.0",
- "license": "MIT or APACHE-2.0",
+ "version": "2.2.0",
+ "license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
- "@tauri-apps/api": "^2.0.0-rc.1"
+ "@tauri-apps/api": "^2.0.0"
}
}
diff --git a/plugins/autostart/permissions/autogenerated/reference.md b/plugins/autostart/permissions/autogenerated/reference.md
index b5e37ac1..6e40fdb7 100644
--- a/plugins/autostart/permissions/autogenerated/reference.md
+++ b/plugins/autostart/permissions/autogenerated/reference.md
@@ -15,7 +15,7 @@ disable the automatic start on boot.
- `allow-disable`
- `allow-is-enabled`
-## Permission Table
+## Permission Table
diff --git a/plugins/autostart/permissions/default.toml b/plugins/autostart/permissions/default.toml
index e2f71212..a2ac766f 100644
--- a/plugins/autostart/permissions/default.toml
+++ b/plugins/autostart/permissions/default.toml
@@ -12,8 +12,4 @@ disable the automatic start on boot.
"""
-permissions = [
- "allow-enable",
- "allow-disable",
- "allow-is-enabled",
-]
+permissions = ["allow-enable", "allow-disable", "allow-is-enabled"]
diff --git a/plugins/autostart/permissions/schemas/schema.json b/plugins/autostart/permissions/schemas/schema.json
index 1ecdac9b..59c81f52 100644
--- a/plugins/autostart/permissions/schemas/schema.json
+++ b/plugins/autostart/permissions/schemas/schema.json
@@ -295,53 +295,39 @@
"type": "string",
"oneOf": [
{
- "description": "allow-disable -> Enables the disable command without any pre-configured scope.",
+ "description": "Enables the disable command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-disable"
- ]
+ "const": "allow-disable"
},
{
- "description": "deny-disable -> Denies the disable command without any pre-configured scope.",
+ "description": "Denies the disable command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-disable"
- ]
+ "const": "deny-disable"
},
{
- "description": "allow-enable -> Enables the enable command without any pre-configured scope.",
+ "description": "Enables the enable command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-enable"
- ]
+ "const": "allow-enable"
},
{
- "description": "deny-enable -> Denies the enable command without any pre-configured scope.",
+ "description": "Denies the enable command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-enable"
- ]
+ "const": "deny-enable"
},
{
- "description": "allow-is-enabled -> Enables the is_enabled command without any pre-configured scope.",
+ "description": "Enables the is_enabled command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-is-enabled"
- ]
+ "const": "allow-is-enabled"
},
{
- "description": "deny-is-enabled -> Denies the is_enabled command without any pre-configured scope.",
+ "description": "Denies the is_enabled command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-is-enabled"
- ]
+ "const": "deny-is-enabled"
},
{
- "description": "default -> This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n",
+ "description": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n",
"type": "string",
- "enum": [
- "default"
- ]
+ "const": "default"
}
]
}
diff --git a/plugins/autostart/rollup.config.js b/plugins/autostart/rollup.config.js
index 977dfac8..1f349ec8 100644
--- a/plugins/autostart/rollup.config.js
+++ b/plugins/autostart/rollup.config.js
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { createConfig } from "../../shared/rollup.config.js";
+import { createConfig } from '../../shared/rollup.config.js'
-export default createConfig();
+export default createConfig()
diff --git a/plugins/autostart/src/lib.rs b/plugins/autostart/src/lib.rs
index bd3866b3..5550bfa1 100644
--- a/plugins/autostart/src/lib.rs
+++ b/plugins/autostart/src/lib.rs
@@ -2,8 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/autostart)
-//!
//! Automatically launch your application at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
#![doc(
@@ -13,8 +11,6 @@
#![cfg(not(any(target_os = "android", target_os = "ios")))]
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
-#[cfg(target_os = "macos")]
-use log::info;
use serde::{ser::Serializer, Serialize};
use tauri::{
command,
@@ -135,7 +131,6 @@ pub fn init(
} else {
exe_path
};
- info!("auto_start path {}", &app_path);
builder.set_app_path(&app_path);
}
#[cfg(target_os = "linux")]
diff --git a/plugins/barcode-scanner/.gitignore b/plugins/barcode-scanner/.gitignore
deleted file mode 100644
index 1b0b469d..00000000
--- a/plugins/barcode-scanner/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/.tauri
diff --git a/plugins/barcode-scanner/CHANGELOG.md b/plugins/barcode-scanner/CHANGELOG.md
index f68c4669..3fa878fd 100644
--- a/plugins/barcode-scanner/CHANGELOG.md
+++ b/plugins/barcode-scanner/CHANGELOG.md
@@ -1,5 +1,31 @@
# Changelog
+## \[2.2.0]
+
+- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
+
+## \[2.0.1]
+
+- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
+
+## \[2.0.0]
+
+- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+
+## \[2.0.0-rc.2]
+
+- [`79d6e19c`](https://github.com/tauri-apps/plugins-workspace/commit/79d6e19c4b38bae0cab29eb88df379e2237d9aac) ([#1777](https://github.com/tauri-apps/plugins-workspace/pull/1777)) Fixed an issue which caused checkPermission and requestPermission to be mixed up.
+
+## \[2.0.0-rc.4]
+
+- [`713c54ef`](https://github.com/tauri-apps/plugins-workspace/commit/713c54ef8365d36afd84585dcabed2fbb751223d) ([#1749](https://github.com/tauri-apps/plugins-workspace/pull/1749) by [@olivierlemasle](https://github.com/tauri-apps/plugins-workspace/../../olivierlemasle)) Remove unused Android dependencies.
+- [`8c3a6a25`](https://github.com/tauri-apps/plugins-workspace/commit/8c3a6a253d7029d370659d2102f91a458745d345) ([#1758](https://github.com/tauri-apps/plugins-workspace/pull/1758) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Validate missing `NSCameraUsageDescription` Info.plist value.
+
+## \[2.0.0-rc.1]
+
+- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Use `PermissionState` from the `tauri` crate, which now also includes a "prompt with rationale" variant for Android (returned when your app must explain to the user why it needs the permission).
+- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+
## \[2.0.0-rc.2]
- [`b9147758`](https://github.com/tauri-apps/plugins-workspace/commit/b914775898c2bee7ceb20bd17ee595005cd17a64) ([#1679](https://github.com/tauri-apps/plugins-workspace/pull/1679) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Explicitly set a minimum macOS version for the Swift package.
diff --git a/plugins/barcode-scanner/Cargo.toml b/plugins/barcode-scanner/Cargo.toml
index 369b3999..018b4908 100644
--- a/plugins/barcode-scanner/Cargo.toml
+++ b/plugins/barcode-scanner/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-barcode-scanner"
-version = "2.0.0-rc.2"
+version = "2.2.0"
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
edition = { workspace = true }
authors = { workspace = true }
@@ -10,12 +10,20 @@ repository = { workspace = true }
links = "tauri-plugin-barcode-scanner"
[package.metadata.docs.rs]
-rustc-args = [ "--cfg", "docsrs" ]
-rustdoc-args = [ "--cfg", "docsrs" ]
-targets = [ "x86_64-linux-android" ]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs"]
+targets = ["x86_64-linux-android"]
+
+[package.metadata.platforms.support]
+windows = { level = "none", notes = "" }
+linux = { level = "none", notes = "" }
+macos = { level = "none", notes = "" }
+android = { level = "full", notes = "" }
+ios = { level = "full", notes = "" }
+
[build-dependencies]
-tauri-plugin = { workspace = true, features = [ "build" ] }
+tauri-plugin = { workspace = true, features = ["build"] }
[dependencies]
serde = { workspace = true }
@@ -23,3 +31,6 @@ serde_json = { workspace = true }
tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
+
+[target.'cfg(target_os = "ios")'.dependencies]
+tauri = { workspace = true, features = ["wry"] }
diff --git a/plugins/barcode-scanner/README.md b/plugins/barcode-scanner/README.md
index 57621f28..4abbef0a 100644
--- a/plugins/barcode-scanner/README.md
+++ b/plugins/barcode-scanner/README.md
@@ -1,7 +1,15 @@
-
+
Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes.
+| Platform | Supported |
+| -------- | --------- |
+| Linux | x |
+| Windows | x |
+| macOS | x |
+| Android | ✓ |
+| iOS | ✓ |
+
## Install
_This plugin requires a Rust version of at least **1.64**_
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
-tauri-plugin-barcode-scanner = "2.0.0-rc"
+tauri-plugin-barcode-scanner = "2.0.0"
# alternatively with Git:
tauri-plugin-barcode-scanner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -46,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-barcode-scanner#v2
First you need to register the core plugin with Tauri:
-`src-tauri/src/main.rs`
+`src-tauri/src/lib.rs`
```rust
fn main() {
@@ -60,12 +68,12 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
-import { scan } from "@tauri-apps/plugin-barcode-scanner";
+import { scan } from '@tauri-apps/plugin-barcode-scanner'
// `windowed: true` actually sets the webview to transparent
// instead of opening a separate view for the camera
// make sure your user interface is ready to show what is underneath with a transparent element
-scan({ windowed: true, formats: [""] })
+scan({ windowed: true, formats: [''] })
```
## Contributing
diff --git a/plugins/barcode-scanner/SECURITY.md b/plugins/barcode-scanner/SECURITY.md
index 36a863c6..135504ec 100644
--- a/plugins/barcode-scanner/SECURITY.md
+++ b/plugins/barcode-scanner/SECURITY.md
@@ -54,7 +54,6 @@ The camera has two modes. The first one is where the user can see the background
The second mode allows the developer to assist the user and add a transparent overlay to the image, providing hints or additional information (like a link preview).
The overlay could be made non-transparent by the application frontend and as long as the app is open (and in some cases) it could read QR codes in range of the camera lense.
-
#### Out Of Scope
- Exploits in the operating system QR code parsing functionality
diff --git a/plugins/barcode-scanner/android/build.gradle.kts b/plugins/barcode-scanner/android/build.gradle.kts
index 64e7e865..f3ecd6c7 100644
--- a/plugins/barcode-scanner/android/build.gradle.kts
+++ b/plugins/barcode-scanner/android/build.gradle.kts
@@ -47,9 +47,5 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
- implementation("com.journeyapps:zxing-android-embedded:4.3.0") {
- isTransitive = false
- }
- implementation("com.google.zxing:core:3.3.0")
implementation(project(":tauri-android"))
}
diff --git a/plugins/barcode-scanner/android/src/main/AndroidManifest.xml b/plugins/barcode-scanner/android/src/main/AndroidManifest.xml
index b4050b4f..750a724b 100644
--- a/plugins/barcode-scanner/android/src/main/AndroidManifest.xml
+++ b/plugins/barcode-scanner/android/src/main/AndroidManifest.xml
@@ -2,10 +2,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:hardwareAccelerated="true">
-
-
-
-
-
+
+
+
diff --git a/plugins/barcode-scanner/android/src/main/java/BarcodeScannerPlugin.kt b/plugins/barcode-scanner/android/src/main/java/BarcodeScannerPlugin.kt
index 4728bad0..ef2eeb34 100644
--- a/plugins/barcode-scanner/android/src/main/java/BarcodeScannerPlugin.kt
+++ b/plugins/barcode-scanner/android/src/main/java/BarcodeScannerPlugin.kt
@@ -42,7 +42,6 @@ import app.tauri.annotation.Permission
import app.tauri.annotation.PermissionCallback
import app.tauri.annotation.TauriPlugin
import app.tauri.plugin.Invoke
-import app.tauri.plugin.JSArray
import app.tauri.plugin.JSObject
import app.tauri.plugin.Plugin
import com.google.common.util.concurrent.ListenableFuture
@@ -50,7 +49,6 @@ import com.google.mlkit.vision.barcode.BarcodeScannerOptions
import com.google.mlkit.vision.barcode.BarcodeScanning
import com.google.mlkit.vision.barcode.common.Barcode
import com.google.mlkit.vision.common.InputImage
-import org.json.JSONException
import java.util.Collections
import java.util.concurrent.ExecutionException
diff --git a/plugins/barcode-scanner/api-iife.js b/plugins/barcode-scanner/api-iife.js
index 12841dfe..620b59a7 100644
--- a/plugins/barcode-scanner/api-iife.js
+++ b/plugins/barcode-scanner/api-iife.js
@@ -1 +1 @@
-if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},a){return window.__TAURI_INTERNALS__.invoke(n,e,a)}var a;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(a=n.Format||(n.Format={})).QRCode="QR_CODE",a.UPC_A="UPC_A",a.UPC_E="UPC_E",a.EAN8="EAN_8",a.EAN13="EAN_13",a.Code39="CODE_39",a.Code93="CODE_93",a.Code128="CODE_128",a.Codabar="CODABAR",a.ITF="ITF",a.Aztec="AZTEC",a.DataMatrix="DATA_MATRIX",a.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await e("plugin:barcode-scanner|check_permissions").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await e("plugin:barcode-scanner|request_permissions").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
+if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return e(`plugin:${n}|check_permissions`)}("barcode-scanner").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return e(`plugin:${n}|request_permissions`)}("barcode-scanner").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
diff --git a/plugins/barcode-scanner/guest-js/index.ts b/plugins/barcode-scanner/guest-js/index.ts
index d766e0dc..2f2361be 100644
--- a/plugins/barcode-scanner/guest-js/index.ts
+++ b/plugins/barcode-scanner/guest-js/index.ts
@@ -2,36 +2,40 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { invoke } from "@tauri-apps/api/core";
+import {
+ invoke,
+ requestPermissions as requestPermissions_,
+ checkPermissions as checkPermissions_
+} from '@tauri-apps/api/core'
-export type PermissionState = "granted" | "denied" | "prompt";
+export type { PermissionState } from '@tauri-apps/api/core'
export enum Format {
- QRCode = "QR_CODE",
- UPC_A = "UPC_A",
- UPC_E = "UPC_E",
- EAN8 = "EAN_8",
- EAN13 = "EAN_13",
- Code39 = "CODE_39",
- Code93 = "CODE_93",
- Code128 = "CODE_128",
- Codabar = "CODABAR",
- ITF = "ITF",
- Aztec = "AZTEC",
- DataMatrix = "DATA_MATRIX",
- PDF417 = "PDF_417",
+ QRCode = 'QR_CODE',
+ UPC_A = 'UPC_A',
+ UPC_E = 'UPC_E',
+ EAN8 = 'EAN_8',
+ EAN13 = 'EAN_13',
+ Code39 = 'CODE_39',
+ Code93 = 'CODE_93',
+ Code128 = 'CODE_128',
+ Codabar = 'CODABAR',
+ ITF = 'ITF',
+ Aztec = 'AZTEC',
+ DataMatrix = 'DATA_MATRIX',
+ PDF417 = 'PDF_417'
}
export interface ScanOptions {
- cameraDirection?: "back" | "front";
- formats?: Format[];
- windowed?: boolean;
+ cameraDirection?: 'back' | 'front'
+ formats?: Format[]
+ windowed?: boolean
}
export interface Scanned {
- content: string;
- format: Format;
- bounds: unknown;
+ content: string
+ format: Format
+ bounds: unknown
}
/**
@@ -39,37 +43,37 @@ export interface Scanned {
* @param options
*/
export async function scan(options?: ScanOptions): Promise {
- return await invoke("plugin:barcode-scanner|scan", { ...options });
+ return await invoke('plugin:barcode-scanner|scan', { ...options })
}
/**
* Cancel the current scan process.
*/
export async function cancel(): Promise {
- await invoke("plugin:barcode-scanner|cancel");
+ await invoke('plugin:barcode-scanner|cancel')
}
/**
* Get permission state.
*/
export async function checkPermissions(): Promise {
- return await invoke<{ camera: PermissionState }>(
- "plugin:barcode-scanner|check_permissions",
- ).then((r) => r.camera);
+ return await checkPermissions_<{ camera: PermissionState }>(
+ 'barcode-scanner'
+ ).then((r) => r.camera)
}
/**
* Request permissions to use the camera.
*/
export async function requestPermissions(): Promise {
- return await invoke<{ camera: PermissionState }>(
- "plugin:barcode-scanner|request_permissions",
- ).then((r) => r.camera);
+ return await requestPermissions_<{ camera: PermissionState }>(
+ 'barcode-scanner'
+ ).then((r) => r.camera)
}
/**
* Open application settings. Useful if permission was denied and the user must manually enable it.
*/
export async function openAppSettings(): Promise {
- await invoke("plugin:barcode-scanner|open_app_settings");
+ await invoke('plugin:barcode-scanner|open_app_settings')
}
diff --git a/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift b/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift
index ec16ad59..cde8d680 100644
--- a/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift
+++ b/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift
@@ -9,8 +9,8 @@ import WebKit
struct ScanOptions: Decodable {
var formats: [SupportedFormat]?
- let windowed: Bool?
- let cameraDirection: String?
+ var windowed: Bool?
+ var cameraDirection: String?
}
enum SupportedFormat: String, CaseIterable, Decodable {
@@ -262,6 +262,13 @@ class BarcodeScannerPlugin: Plugin, AVCaptureMetadataOutputObjectsDelegate {
self.invoke = invoke
+ let entry = Bundle.main.infoDictionary?["NSCameraUsageDescription"] as? String
+
+ if entry == nil || entry?.count == 0 {
+ invoke.reject("NSCameraUsageDescription is not in the app Info.plist")
+ return
+ }
+
var iOS14min: Bool = false
if #available(iOS 14.0, *) { iOS14min = true }
if !iOS14min && self.getPermissionState() != "granted" {
diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json
index 7af42638..9e8c8b56 100644
--- a/plugins/barcode-scanner/package.json
+++ b/plugins/barcode-scanner/package.json
@@ -1,8 +1,8 @@
{
"name": "@tauri-apps/plugin-barcode-scanner",
- "version": "2.0.0-rc.0",
+ "version": "2.2.0",
"description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS",
- "license": "MIT or APACHE-2.0",
+ "license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
- "@tauri-apps/api": "^2.0.0-rc.1"
+ "@tauri-apps/api": "^2.0.0"
}
}
diff --git a/plugins/barcode-scanner/permissions/autogenerated/reference.md b/plugins/barcode-scanner/permissions/autogenerated/reference.md
index 6b8739c1..50cbcf99 100644
--- a/plugins/barcode-scanner/permissions/autogenerated/reference.md
+++ b/plugins/barcode-scanner/permissions/autogenerated/reference.md
@@ -16,7 +16,7 @@ It allows all barcode related features.
- `allow-scan`
- `allow-vibrate`
-## Permission Table
+## Permission Table
diff --git a/plugins/barcode-scanner/permissions/schemas/schema.json b/plugins/barcode-scanner/permissions/schemas/schema.json
index 02286fcb..f41214b4 100644
--- a/plugins/barcode-scanner/permissions/schemas/schema.json
+++ b/plugins/barcode-scanner/permissions/schemas/schema.json
@@ -295,95 +295,69 @@
"type": "string",
"oneOf": [
{
- "description": "allow-cancel -> Enables the cancel command without any pre-configured scope.",
+ "description": "Enables the cancel command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-cancel"
- ]
+ "const": "allow-cancel"
},
{
- "description": "deny-cancel -> Denies the cancel command without any pre-configured scope.",
+ "description": "Denies the cancel command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-cancel"
- ]
+ "const": "deny-cancel"
},
{
- "description": "allow-check-permissions -> Enables the check_permissions command without any pre-configured scope.",
+ "description": "Enables the check_permissions command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-check-permissions"
- ]
+ "const": "allow-check-permissions"
},
{
- "description": "deny-check-permissions -> Denies the check_permissions command without any pre-configured scope.",
+ "description": "Denies the check_permissions command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-check-permissions"
- ]
+ "const": "deny-check-permissions"
},
{
- "description": "allow-open-app-settings -> Enables the open_app_settings command without any pre-configured scope.",
+ "description": "Enables the open_app_settings command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-open-app-settings"
- ]
+ "const": "allow-open-app-settings"
},
{
- "description": "deny-open-app-settings -> Denies the open_app_settings command without any pre-configured scope.",
+ "description": "Denies the open_app_settings command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-open-app-settings"
- ]
+ "const": "deny-open-app-settings"
},
{
- "description": "allow-request-permissions -> Enables the request_permissions command without any pre-configured scope.",
+ "description": "Enables the request_permissions command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-request-permissions"
- ]
+ "const": "allow-request-permissions"
},
{
- "description": "deny-request-permissions -> Denies the request_permissions command without any pre-configured scope.",
+ "description": "Denies the request_permissions command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-request-permissions"
- ]
+ "const": "deny-request-permissions"
},
{
- "description": "allow-scan -> Enables the scan command without any pre-configured scope.",
+ "description": "Enables the scan command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-scan"
- ]
+ "const": "allow-scan"
},
{
- "description": "deny-scan -> Denies the scan command without any pre-configured scope.",
+ "description": "Denies the scan command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-scan"
- ]
+ "const": "deny-scan"
},
{
- "description": "allow-vibrate -> Enables the vibrate command without any pre-configured scope.",
+ "description": "Enables the vibrate command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-vibrate"
- ]
+ "const": "allow-vibrate"
},
{
- "description": "deny-vibrate -> Denies the vibrate command without any pre-configured scope.",
+ "description": "Denies the vibrate command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-vibrate"
- ]
+ "const": "deny-vibrate"
},
{
- "description": "default -> This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n",
+ "description": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n",
"type": "string",
- "enum": [
- "default"
- ]
+ "const": "default"
}
]
}
diff --git a/plugins/barcode-scanner/rollup.config.js b/plugins/barcode-scanner/rollup.config.js
index 977dfac8..1f349ec8 100644
--- a/plugins/barcode-scanner/rollup.config.js
+++ b/plugins/barcode-scanner/rollup.config.js
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { createConfig } from "../../shared/rollup.config.js";
+import { createConfig } from '../../shared/rollup.config.js'
-export default createConfig();
+export default createConfig()
diff --git a/plugins/biometric/CHANGELOG.md b/plugins/biometric/CHANGELOG.md
index 40756d7e..4cd2731d 100644
--- a/plugins/biometric/CHANGELOG.md
+++ b/plugins/biometric/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## \[2.2.0]
+
+- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
+
+## \[2.0.1]
+
+- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
+
+## \[2.0.0]
+
+- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+
+## \[2.0.0-rc.1]
+
+- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+
## \[2.0.0-rc.2]
- [`b9147758`](https://github.com/tauri-apps/plugins-workspace/commit/b914775898c2bee7ceb20bd17ee595005cd17a64) ([#1679](https://github.com/tauri-apps/plugins-workspace/pull/1679) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Explicitly set a minimum macOS version for the Swift package.
diff --git a/plugins/biometric/Cargo.toml b/plugins/biometric/Cargo.toml
index 9a9aeaa9..b96f55b3 100644
--- a/plugins/biometric/Cargo.toml
+++ b/plugins/biometric/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-biometric"
-version = "2.0.0-rc.2"
+version = "2.2.0"
description = "Prompt the user for biometric authentication on Android and iOS."
edition = { workspace = true }
authors = { workspace = true }
@@ -9,12 +9,20 @@ repository = { workspace = true }
links = "tauri-plugin-biometric"
[package.metadata.docs.rs]
-rustc-args = [ "--cfg", "docsrs" ]
-rustdoc-args = [ "--cfg", "docsrs" ]
-targets = [ "x86_64-linux-android" ]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs"]
+targets = ["x86_64-linux-android"]
+
+[package.metadata.platforms.support]
+windows = { level = "none", notes = "" }
+linux = { level = "none", notes = "" }
+macos = { level = "none", notes = "" }
+android = { level = "full", notes = "" }
+ios = { level = "full", notes = "" }
+
[build-dependencies]
-tauri-plugin = { workspace = true, features = [ "build" ] }
+tauri-plugin = { workspace = true, features = ["build"] }
[dependencies]
serde = { workspace = true }
diff --git a/plugins/biometric/README.md b/plugins/biometric/README.md
index a7ce1139..c7844f7b 100644
--- a/plugins/biometric/README.md
+++ b/plugins/biometric/README.md
@@ -2,6 +2,14 @@
Prompt the user for biometric authentication on Android and iOS.
+| Platform | Supported |
+| -------- | --------- |
+| Linux | x |
+| Windows | x |
+| macOS | x |
+| Android | ✓ |
+| iOS | ✓ |
+
## Install
_This plugin requires a Rust version of at least **1.65**_
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
-tauri-plugin-biometric = "2.0.0-rc"
+tauri-plugin-biometric = "2.0.0"
# alternatively with Git:
tauri-plugin-biometric = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -48,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-biometric#v2
First you need to register the core plugin with Tauri:
-`src-tauri/src/main.rs`
+`src-tauri/src/lib.rs`
```rust
fn main() {
@@ -62,8 +70,8 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
-import { authenticate } from "@tauri-apps/plugin-biometric";
-await authenticate('Open your wallet');
+import { authenticate } from '@tauri-apps/plugin-biometric'
+await authenticate('Open your wallet')
```
## Contributing
diff --git a/plugins/biometric/SECURITY.md b/plugins/biometric/SECURITY.md
index 67d831fc..4f09bbac 100644
--- a/plugins/biometric/SECURITY.md
+++ b/plugins/biometric/SECURITY.md
@@ -20,4 +20,4 @@ We prefer to receive reports in English.
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
-Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
\ No newline at end of file
+Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
diff --git a/plugins/biometric/guest-js/index.ts b/plugins/biometric/guest-js/index.ts
index 3ff26d0b..5c3eb8df 100644
--- a/plugins/biometric/guest-js/index.ts
+++ b/plugins/biometric/guest-js/index.ts
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { invoke } from "@tauri-apps/api/core";
+import { invoke } from '@tauri-apps/api/core'
export enum BiometryType {
None = 0,
@@ -11,39 +11,39 @@ export enum BiometryType {
// Apple FaceID or Android face authentication
FaceID = 2,
// Android iris authentication
- Iris = 3,
+ Iris = 3
}
export interface Status {
- isAvailable: boolean;
- biometryType: BiometryType;
- error?: string;
+ isAvailable: boolean
+ biometryType: BiometryType
+ error?: string
errorCode?:
- | "appCancel"
- | "authenticationFailed"
- | "invalidContext"
- | "notInteractive"
- | "passcodeNotSet"
- | "systemCancel"
- | "userCancel"
- | "userFallback"
- | "biometryLockout"
- | "biometryNotAvailable"
- | "biometryNotEnrolled";
+ | 'appCancel'
+ | 'authenticationFailed'
+ | 'invalidContext'
+ | 'notInteractive'
+ | 'passcodeNotSet'
+ | 'systemCancel'
+ | 'userCancel'
+ | 'userFallback'
+ | 'biometryLockout'
+ | 'biometryNotAvailable'
+ | 'biometryNotEnrolled'
}
export interface AuthOptions {
- allowDeviceCredential?: boolean;
- cancelTitle?: string;
+ allowDeviceCredential?: boolean
+ cancelTitle?: string
// iOS options
- fallbackTitle?: string;
+ fallbackTitle?: string
// android options
- title?: string;
- subtitle?: string;
- confirmationRequired?: boolean;
- maxAttemps?: number;
+ title?: string
+ subtitle?: string
+ confirmationRequired?: boolean
+ maxAttemps?: number
}
/**
@@ -51,7 +51,7 @@ export interface AuthOptions {
* @returns a promise resolving to an object containing all the information about the status of the biometry.
*/
export async function checkStatus(): Promise {
- return await invoke("plugin:biometric|status");
+ return await invoke('plugin:biometric|status')
}
/**
@@ -68,10 +68,10 @@ export async function checkStatus(): Promise {
*/
export async function authenticate(
reason: string,
- options?: AuthOptions,
+ options?: AuthOptions
): Promise {
- await invoke("plugin:biometric|authenticate", {
+ await invoke('plugin:biometric|authenticate', {
reason,
- ...options,
- });
+ ...options
+ })
}
diff --git a/plugins/biometric/ios/Sources/BiometricPlugin.swift b/plugins/biometric/ios/Sources/BiometricPlugin.swift
index 7e3e8bbd..3c9a192a 100644
--- a/plugins/biometric/ios/Sources/BiometricPlugin.swift
+++ b/plugins/biometric/ios/Sources/BiometricPlugin.swift
@@ -25,8 +25,8 @@ class BiometricStatus {
struct AuthOptions: Decodable {
let reason: String
var allowDeviceCredential: Bool?
- let fallbackTitle: String?
- let cancelTitle: String?
+ var fallbackTitle: String?
+ var cancelTitle: String?
}
class BiometricPlugin: Plugin {
diff --git a/plugins/biometric/package.json b/plugins/biometric/package.json
index fb89ada8..fe689d45 100644
--- a/plugins/biometric/package.json
+++ b/plugins/biometric/package.json
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-biometric",
- "version": "2.0.0-rc.0",
- "license": "MIT or APACHE-2.0",
+ "version": "2.2.0",
+ "license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
- "@tauri-apps/api": "^2.0.0-rc.1"
+ "@tauri-apps/api": "^2.0.0"
}
}
diff --git a/plugins/biometric/permissions/autogenerated/reference.md b/plugins/biometric/permissions/autogenerated/reference.md
index 8b3b58c2..37a9fa07 100644
--- a/plugins/biometric/permissions/autogenerated/reference.md
+++ b/plugins/biometric/permissions/autogenerated/reference.md
@@ -12,7 +12,7 @@ It allows acccess to all biometric commands.
- `allow-authenticate`
- `allow-status`
-## Permission Table
+## Permission Table
diff --git a/plugins/biometric/permissions/default.toml b/plugins/biometric/permissions/default.toml
index f50061b7..651990ef 100644
--- a/plugins/biometric/permissions/default.toml
+++ b/plugins/biometric/permissions/default.toml
@@ -10,7 +10,4 @@ It allows acccess to all biometric commands.
"""
-permissions = [
- "allow-authenticate",
- "allow-status",
-]
+permissions = ["allow-authenticate", "allow-status"]
diff --git a/plugins/biometric/permissions/schemas/schema.json b/plugins/biometric/permissions/schemas/schema.json
index 8dbd1179..cc4d04d5 100644
--- a/plugins/biometric/permissions/schemas/schema.json
+++ b/plugins/biometric/permissions/schemas/schema.json
@@ -295,39 +295,29 @@
"type": "string",
"oneOf": [
{
- "description": "allow-authenticate -> Enables the authenticate command without any pre-configured scope.",
+ "description": "Enables the authenticate command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-authenticate"
- ]
+ "const": "allow-authenticate"
},
{
- "description": "deny-authenticate -> Denies the authenticate command without any pre-configured scope.",
+ "description": "Denies the authenticate command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-authenticate"
- ]
+ "const": "deny-authenticate"
},
{
- "description": "allow-status -> Enables the status command without any pre-configured scope.",
+ "description": "Enables the status command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-status"
- ]
+ "const": "allow-status"
},
{
- "description": "deny-status -> Denies the status command without any pre-configured scope.",
+ "description": "Denies the status command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-status"
- ]
+ "const": "deny-status"
},
{
- "description": "default -> This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n",
+ "description": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n",
"type": "string",
- "enum": [
- "default"
- ]
+ "const": "default"
}
]
}
diff --git a/plugins/biometric/rollup.config.js b/plugins/biometric/rollup.config.js
index 977dfac8..1f349ec8 100644
--- a/plugins/biometric/rollup.config.js
+++ b/plugins/biometric/rollup.config.js
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { createConfig } from "../../shared/rollup.config.js";
+import { createConfig } from '../../shared/rollup.config.js'
-export default createConfig();
+export default createConfig()
diff --git a/plugins/cli/CHANGELOG.md b/plugins/cli/CHANGELOG.md
index 44e753d5..c2c011e2 100644
--- a/plugins/cli/CHANGELOG.md
+++ b/plugins/cli/CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog
+## \[2.2.0]
+
+- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
+
+## \[2.0.1]
+
+- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
+
+## \[2.0.0]
+
+- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+
+## \[2.0.0-rc.2]
+
+- [`68579934`](https://github.com/tauri-apps/plugins-workspace/commit/68579934c93f6ed2edbc97474560d6a8a00e8f70) ([#1856](https://github.com/tauri-apps/plugins-workspace/pull/1856) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Expose `Matches`, `SubcommandMatches` and `ArgData` structs.
+
+## \[2.0.0-rc.1]
+
+- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+
## \[2.0.0-rc.0]
- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
@@ -73,10 +93,3 @@
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
te to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- om/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
diff --git a/plugins/cli/Cargo.toml b/plugins/cli/Cargo.toml
index eee384de..500ba957 100644
--- a/plugins/cli/Cargo.toml
+++ b/plugins/cli/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-cli"
-version = "2.0.0-rc.0"
+version = "2.2.0"
description = "Parse arguments from your Tauri application's command line interface."
edition = { workspace = true }
authors = { workspace = true }
@@ -10,11 +10,19 @@ repository = { workspace = true }
links = "tauri-plugin-cli"
[package.metadata.docs.rs]
-rustc-args = [ "--cfg", "docsrs" ]
-rustdoc-args = [ "--cfg", "docsrs" ]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs"]
+
+[package.metadata.platforms.support]
+windows = { level = "full", notes = "" }
+linux = { level = "full", notes = "" }
+macos = { level = "full", notes = "" }
+android = { level = "none", notes = "" }
+ios = { level = "none", notes = "" }
+
[build-dependencies]
-tauri-plugin = { workspace = true, features = [ "build" ] }
+tauri-plugin = { workspace = true, features = ["build"] }
[dependencies]
serde = { workspace = true }
diff --git a/plugins/cli/README.md b/plugins/cli/README.md
index b186f359..91a8080b 100644
--- a/plugins/cli/README.md
+++ b/plugins/cli/README.md
@@ -2,11 +2,17 @@
Parse arguments from your Command Line Interface.
-- Supported platforms: Windows, Linux and macOS.
+| Platform | Supported |
+| -------- | --------- |
+| Linux | ✓ |
+| Windows | ✓ |
+| macOS | ✓ |
+| Android | x |
+| iOS | x |
## Install
-_This plugin requires a Rust version of at least **1.75**_
+_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
@@ -21,7 +27,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
# 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-rc"
+tauri-plugin-cli = "2.0.0"
# alternatively with Git:
tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -49,7 +55,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-cli#v2
First you need to register the core plugin with Tauri:
-`src-tauri/src/main.rs`
+`src-tauri/src/lib.rs`
```rust
fn main() {
@@ -67,16 +73,16 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
-import { getMatches } from "@tauri-apps/plugin-cli";
-const matches = await getMatches();
-if (matches.subcommand?.name === "run") {
+import { getMatches } from '@tauri-apps/plugin-cli'
+const matches = await getMatches()
+if (matches.subcommand?.name === 'run') {
// `./your-app run $ARGS` was executed
- const args = matches.subcommand?.matches.args;
- if ("debug" in args) {
+ const args = matches.subcommand?.matches.args
+ if ('debug' in args) {
// `./your-app run --debug` was executed
}
} else {
- const args = matches.args;
+ const args = matches.args
// `./your-app $ARGS` was executed
}
```
diff --git a/plugins/cli/SECURITY.md b/plugins/cli/SECURITY.md
index 67d831fc..4f09bbac 100644
--- a/plugins/cli/SECURITY.md
+++ b/plugins/cli/SECURITY.md
@@ -20,4 +20,4 @@ We prefer to receive reports in English.
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
-Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
\ No newline at end of file
+Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
diff --git a/plugins/cli/guest-js/index.ts b/plugins/cli/guest-js/index.ts
index 0ab7868e..7a7f4acf 100644
--- a/plugins/cli/guest-js/index.ts
+++ b/plugins/cli/guest-js/index.ts
@@ -8,7 +8,7 @@
* @module
*/
-import { invoke } from "@tauri-apps/api/core";
+import { invoke } from '@tauri-apps/api/core'
/**
* @since 2.0.0
@@ -19,27 +19,27 @@ interface ArgMatch {
* boolean if flag
* string[] or null if takes multiple values
*/
- value: string | boolean | string[] | null;
+ value: string | boolean | string[] | null
/**
* Number of occurrences
*/
- occurrences: number;
+ occurrences: number
}
/**
* @since 2.0.0
*/
interface SubcommandMatch {
- name: string;
- matches: CliMatches;
+ name: string
+ matches: CliMatches
}
/**
* @since 2.0.0
*/
interface CliMatches {
- args: Record;
- subcommand: SubcommandMatch | null;
+ args: Record
+ subcommand: SubcommandMatch | null
}
/**
@@ -64,9 +64,9 @@ interface CliMatches {
* @since 2.0.0
*/
async function getMatches(): Promise {
- return await invoke("plugin:cli|cli_matches");
+ return await invoke('plugin:cli|cli_matches')
}
-export type { ArgMatch, SubcommandMatch, CliMatches };
+export type { ArgMatch, SubcommandMatch, CliMatches }
-export { getMatches };
+export { getMatches }
diff --git a/plugins/cli/package.json b/plugins/cli/package.json
index ead7c3b0..e5ff8b73 100644
--- a/plugins/cli/package.json
+++ b/plugins/cli/package.json
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-cli",
- "version": "2.0.0-rc.0",
- "license": "MIT or APACHE-2.0",
+ "version": "2.2.0",
+ "license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
- "@tauri-apps/api": "^2.0.0-rc.1"
+ "@tauri-apps/api": "^2.0.0"
}
}
diff --git a/plugins/cli/permissions/autogenerated/reference.md b/plugins/cli/permissions/autogenerated/reference.md
index 48434cea..a920b749 100644
--- a/plugins/cli/permissions/autogenerated/reference.md
+++ b/plugins/cli/permissions/autogenerated/reference.md
@@ -4,7 +4,7 @@ Allows reading the CLI matches
- `allow-cli-matches`
-## Permission Table
+## Permission Table
diff --git a/plugins/cli/permissions/schemas/schema.json b/plugins/cli/permissions/schemas/schema.json
index 045c7197..b376890e 100644
--- a/plugins/cli/permissions/schemas/schema.json
+++ b/plugins/cli/permissions/schemas/schema.json
@@ -295,25 +295,19 @@
"type": "string",
"oneOf": [
{
- "description": "allow-cli-matches -> Enables the cli_matches command without any pre-configured scope.",
+ "description": "Enables the cli_matches command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-cli-matches"
- ]
+ "const": "allow-cli-matches"
},
{
- "description": "deny-cli-matches -> Denies the cli_matches command without any pre-configured scope.",
+ "description": "Denies the cli_matches command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-cli-matches"
- ]
+ "const": "deny-cli-matches"
},
{
- "description": "default -> Allows reading the CLI matches",
+ "description": "Allows reading the CLI matches",
"type": "string",
- "enum": [
- "default"
- ]
+ "const": "default"
}
]
}
diff --git a/plugins/cli/rollup.config.js b/plugins/cli/rollup.config.js
index 977dfac8..1f349ec8 100644
--- a/plugins/cli/rollup.config.js
+++ b/plugins/cli/rollup.config.js
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { createConfig } from "../../shared/rollup.config.js";
+import { createConfig } from '../../shared/rollup.config.js'
-export default createConfig();
+export default createConfig()
diff --git a/plugins/cli/src/error.rs b/plugins/cli/src/error.rs
index b4bd2872..2b5e1602 100644
--- a/plugins/cli/src/error.rs
+++ b/plugins/cli/src/error.rs
@@ -18,3 +18,5 @@ impl Serialize for Error {
serializer.serialize_str(self.to_string().as_ref())
}
}
+
+pub type Result = std::result::Result;
diff --git a/plugins/cli/src/lib.rs b/plugins/cli/src/lib.rs
index 0e65409e..3e144376 100644
--- a/plugins/cli/src/lib.rs
+++ b/plugins/cli/src/lib.rs
@@ -2,8 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/cli)
-//!
//! Parse arguments from your Command Line Interface.
//!
//! - Supported platforms: Windows, Linux and macOS.
@@ -23,8 +21,9 @@ mod error;
mod parser;
use config::{Arg, Config};
-pub use error::Error;
-type Result = std::result::Result;
+
+pub use error::{Error, Result};
+pub use parser::{ArgData, Matches, SubcommandMatches};
pub struct Cli(PluginApi);
diff --git a/plugins/clipboard-manager/.gitignore b/plugins/clipboard-manager/.gitignore
deleted file mode 100644
index 1b0b469d..00000000
--- a/plugins/clipboard-manager/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/.tauri
diff --git a/plugins/clipboard-manager/CHANGELOG.md b/plugins/clipboard-manager/CHANGELOG.md
index 44bb9049..1bc629f0 100644
--- a/plugins/clipboard-manager/CHANGELOG.md
+++ b/plugins/clipboard-manager/CHANGELOG.md
@@ -1,5 +1,33 @@
# Changelog
+## \[2.2.0]
+
+- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
+
+## \[2.0.1]
+
+- [`3fa0fc09`](https://github.com/tauri-apps/plugins-workspace/commit/3fa0fc09bbee0d619801e5757af9fb3c09883c97) ([#2099](https://github.com/tauri-apps/plugins-workspace/pull/2099) by [@rasteiner](https://github.com/tauri-apps/plugins-workspace/../../rasteiner)) Fix clipboard manager client side api not copying fallback alternative text when calling `writeHtml`.
+
+## \[2.0.2]
+
+- [`d57df4de`](https://github.com/tauri-apps/plugins-workspace/commit/d57df4debe7c75cfbd6d6558fff1beb07dbee54c) ([#1986](https://github.com/tauri-apps/plugins-workspace/pull/1986) by [@RikaKagurasaka](https://github.com/tauri-apps/plugins-workspace/../../RikaKagurasaka)) Fix that `read_image` wrongly set the image rgba data with binary PNG data.
+
+## \[2.0.1]
+
+- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
+
+## \[2.0.0]
+
+- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+
+## \[2.0.0-rc.2]
+
+- [`341a5320`](https://github.com/tauri-apps/plugins-workspace/commit/341a5320c33d3c7b041abf7eb0ab7ad8009e6c3f) ([#1771](https://github.com/tauri-apps/plugins-workspace/pull/1771)) Fix warnings and clear implementation on Android below SDK 28.
+
+## \[2.0.0-rc.1]
+
+- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+
## \[2.0.0-rc.2]
- [`b9147758`](https://github.com/tauri-apps/plugins-workspace/commit/b914775898c2bee7ceb20bd17ee595005cd17a64) ([#1679](https://github.com/tauri-apps/plugins-workspace/pull/1679) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Explicitly set a minimum macOS version for the Swift package.
@@ -92,38 +120,3 @@
## \[2.0.0-alpha.0]
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- te to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- \`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- te to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- hub.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- \`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- te to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- te to alpha.11.
-
-## \[2.0.0-alpha.0]
-
-- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- !
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- ps/plugins-workspace/pull/371)) First v2 alpha release!
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- !
- 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
- om/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
diff --git a/plugins/clipboard-manager/Cargo.toml b/plugins/clipboard-manager/Cargo.toml
index 28e598ef..7e0c5131 100644
--- a/plugins/clipboard-manager/Cargo.toml
+++ b/plugins/clipboard-manager/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-clipboard-manager"
-version = "2.0.0-rc.2"
+version = "2.2.0"
description = "Read and write to the system clipboard."
edition = { workspace = true }
authors = { workspace = true }
@@ -10,12 +10,20 @@ repository = { workspace = true }
links = "tauri-plugin-clipboard-manager"
[package.metadata.docs.rs]
-rustc-args = [ "--cfg", "docsrs" ]
-rustdoc-args = [ "--cfg", "docsrs" ]
-targets = [ "x86_64-unknown-linux-gnu", "x86_64-linux-android" ]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs"]
+targets = ["x86_64-unknown-linux-gnu", "x86_64-linux-android"]
+
+[package.metadata.platforms.support]
+windows = { level = "full", notes = "" }
+linux = { level = "full", notes = "" }
+macos = { level = "full", notes = "" }
+android = { level = "partial", notes = "Only plain-text content support" }
+ios = { level = "partial", notes = "Only plain-text content support" }
+
[build-dependencies]
-tauri-plugin = { workspace = true, features = [ "build" ] }
+tauri-plugin = { workspace = true, features = ["build"] }
[dependencies]
serde = { workspace = true }
@@ -29,4 +37,3 @@ tauri = { workspace = true, features = ["wry"] }
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
arboard = "3"
-image = "0.24"
diff --git a/plugins/clipboard-manager/README.md b/plugins/clipboard-manager/README.md
index f1b3d327..57b89526 100644
--- a/plugins/clipboard-manager/README.md
+++ b/plugins/clipboard-manager/README.md
@@ -2,9 +2,17 @@
Read and write to the system clipboard.
+| Platform | Supported |
+| -------- | --------- |
+| Linux | ✓ |
+| Windows | ✓ |
+| macOS | ✓ |
+| Android | ✓ |
+| iOS | ✓ |
+
## Install
-_This plugin requires a Rust version of at least **1.75**_
+_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
-tauri-plugin-clipboard-manager = "2.0.0-rc"
+tauri-plugin-clipboard-manager = "2.0.0"
# alternatively with Git:
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -46,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-clipboard-manager#v2
First you need to register the core plugin with Tauri:
-`src-tauri/src/main.rs`
+`src-tauri/src/lib.rs`
```rust
fn main() {
@@ -60,9 +68,14 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
-import { writeText, readText, writeHtml, readHtml, clear } from "@tauri-apps/plugin-clipboard-manager";
-await writeText("Tauri is awesome!");
-assert(await readText(), "Tauri is awesome!");
+import {
+ writeText,
+ readText,
+ writeHtml,
+ clear
+} from '@tauri-apps/plugin-clipboard-manager'
+await writeText('Tauri is awesome!')
+assert(await readText(), 'Tauri is awesome!')
```
## Contributing
diff --git a/plugins/clipboard-manager/SECURITY.md b/plugins/clipboard-manager/SECURITY.md
index 67d831fc..4f09bbac 100644
--- a/plugins/clipboard-manager/SECURITY.md
+++ b/plugins/clipboard-manager/SECURITY.md
@@ -20,4 +20,4 @@ We prefer to receive reports in English.
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
-Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
\ No newline at end of file
+Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
diff --git a/plugins/clipboard-manager/android/src/main/java/ClipboardPlugin.kt b/plugins/clipboard-manager/android/src/main/java/ClipboardPlugin.kt
index 942a8317..ebb931b4 100644
--- a/plugins/clipboard-manager/android/src/main/java/ClipboardPlugin.kt
+++ b/plugins/clipboard-manager/android/src/main/java/ClipboardPlugin.kt
@@ -4,12 +4,12 @@
package app.tauri.clipboard
-import android.R.attr.value
import android.app.Activity
import android.content.ClipData
import android.content.ClipDescription
import android.content.ClipboardManager
import android.content.Context
+import android.os.Build
import app.tauri.annotation.Command
import app.tauri.annotation.InvokeArg
import app.tauri.annotation.TauriPlugin
@@ -59,6 +59,9 @@ internal class ReadClipDataSerializer @JvmOverloads constructor(t: Class {
+ throw Exception("unimplemented ReadClipData")
+ }
}
jgen.writeEndObject()
@@ -93,7 +96,7 @@ class ClipboardPlugin(private val activity: Activity) : Plugin(activity) {
is WriteOptions.PlainText -> {
ClipData.newPlainText(args.label, args.text)
} else -> {
- invoke.reject("Invalid write options provided")
+ invoke.reject("unimplemented WriteOptions")
return
}
@@ -128,7 +131,11 @@ class ClipboardPlugin(private val activity: Activity) : Plugin(activity) {
@Command
fun clear(invoke: Invoke) {
if (manager.hasPrimaryClip()) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
manager.clearPrimaryClip()
+ } else {
+ manager.setPrimaryClip(ClipData.newPlainText("", ""))
+ }
}
invoke.resolve()
}
diff --git a/plugins/clipboard-manager/api-iife.js b/plugins/clipboard-manager/api-iife.js
index 82c20f1c..fb245a4e 100644
--- a/plugins/clipboard-manager/api-iife.js
+++ b/plugins/clipboard-manager/api-iife.js
@@ -1 +1 @@
-if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARD_MANAGER__=function(e){"use strict";var r;async function t(e,r={},t){return window.__TAURI_INTERNALS__.invoke(e,r,t)}"function"==typeof SuppressedError&&SuppressedError;class n{get rid(){return function(e,r,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}(this,r,"f")}constructor(e){r.set(this,void 0),function(e,r,t,n,a){if("function"==typeof r?e!==r||!a:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");r.set(e,t)}(this,r,e)}async close(){return t("plugin:resources|close",{rid:this.rid})}}r=new WeakMap;class a extends n{constructor(e){super(e)}static async new(e,r,n){return t("plugin:image|new",{rgba:i(e),width:r,height:n}).then((e=>new a(e)))}static async fromBytes(e){return t("plugin:image|from_bytes",{bytes:i(e)}).then((e=>new a(e)))}static async fromPath(e){return t("plugin:image|from_path",{path:e}).then((e=>new a(e)))}async rgba(){return t("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return t("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof Uint8Array?Array.from(e):e instanceof ArrayBuffer?Array.from(new Uint8Array(e)):e instanceof a?e.rid:e}return e.clear=async function(){await t("plugin:clipboard-manager|clear")},e.readImage=async function(){return await t("plugin:clipboard-manager|read_image").then((e=>new a(e)))},e.readText=async function(){return await t("plugin:clipboard-manager|read_text")},e.writeHtml=async function(e,r){await t("plugin:clipboard-manager|write_html",{html:e,altHtml:r})},e.writeImage=async function(e){await t("plugin:clipboard-manager|write_image",{image:i(e)})},e.writeText=async function(e,r){await t("plugin:clipboard-manager|write_text",{label:r?.label,text:e})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARD_MANAGER__})}
+if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARD_MANAGER__=function(e){"use strict";var t;async function r(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}"function"==typeof SuppressedError&&SuppressedError;class n{get rid(){return function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}(this,t,"f")}constructor(e){t.set(this,void 0),function(e,t,r){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");t.set(e,r)}(this,t,e)}async close(){return r("plugin:resources|close",{rid:this.rid})}}t=new WeakMap;class a extends n{constructor(e){super(e)}static async new(e,t,n){return r("plugin:image|new",{rgba:i(e),width:t,height:n}).then((e=>new a(e)))}static async fromBytes(e){return r("plugin:image|from_bytes",{bytes:i(e)}).then((e=>new a(e)))}static async fromPath(e){return r("plugin:image|from_path",{path:e}).then((e=>new a(e)))}async rgba(){return r("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return r("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof a?e.rid:e}return e.clear=async function(){await r("plugin:clipboard-manager|clear")},e.readImage=async function(){return await r("plugin:clipboard-manager|read_image").then((e=>new a(e)))},e.readText=async function(){return await r("plugin:clipboard-manager|read_text")},e.writeHtml=async function(e,t){await r("plugin:clipboard-manager|write_html",{html:e,altText:t})},e.writeImage=async function(e){await r("plugin:clipboard-manager|write_image",{image:i(e)})},e.writeText=async function(e,t){await r("plugin:clipboard-manager|write_text",{label:t?.label,text:e})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARD_MANAGER__})}
diff --git a/plugins/clipboard-manager/guest-js/index.ts b/plugins/clipboard-manager/guest-js/index.ts
index ad261cbe..19851fe0 100644
--- a/plugins/clipboard-manager/guest-js/index.ts
+++ b/plugins/clipboard-manager/guest-js/index.ts
@@ -8,8 +8,8 @@
* @module
*/
-import { invoke } from "@tauri-apps/api/core";
-import { Image, transformImage } from "@tauri-apps/api/image";
+import { invoke } from '@tauri-apps/api/core'
+import { Image, transformImage } from '@tauri-apps/api/image'
/**
* Writes plain text to the clipboard.
@@ -26,12 +26,12 @@ import { Image, transformImage } from "@tauri-apps/api/image";
*/
async function writeText(
text: string,
- opts?: { label?: string },
+ opts?: { label?: string }
): Promise {
- await invoke("plugin:clipboard-manager|write_text", {
+ await invoke('plugin:clipboard-manager|write_text', {
label: opts?.label,
- text,
- });
+ text
+ })
}
/**
@@ -44,11 +44,16 @@ async function writeText(
* @since 2.0.0
*/
async function readText(): Promise {
- return await invoke("plugin:clipboard-manager|read_text");
+ return await invoke('plugin:clipboard-manager|read_text')
}
/**
* Writes image buffer to the clipboard.
+ *
+ * #### Platform-specific
+ *
+ * - **Android / iOS:** Not supported.
+ *
* @example
* ```typescript
* import { writeImage } from '@tauri-apps/plugin-clipboard-manager';
@@ -60,44 +65,57 @@ async function readText(): Promise {
* 0, 255, 0, 255,
* ];
* await writeImage(buffer);
+ * ```
*
* @returns A promise indicating the success or failure of the operation.
*
* @since 2.0.0
*/
async function writeImage(
- image: string | Image | Uint8Array | ArrayBuffer | number[],
+ image: string | Image | Uint8Array | ArrayBuffer | number[]
): Promise {
- await invoke("plugin:clipboard-manager|write_image", {
- image: transformImage(image),
- });
+ await invoke('plugin:clipboard-manager|write_image', {
+ image: transformImage(image)
+ })
}
/**
* Gets the clipboard content as Uint8Array image.
+ *
+ * #### Platform-specific
+ *
+ * - **Android / iOS:** Not supported.
+ *
* @example
* ```typescript
* import { readImage } from '@tauri-apps/plugin-clipboard-manager';
*
* const clipboardImage = await readImage();
- * const blob = new Blob([clipboardImage.bytes], { type: 'image' })
+ * const blob = new Blob([await clipboardImage.rbga()], { type: 'image' })
* const url = URL.createObjectURL(blob)
* ```
* @since 2.0.0
*/
async function readImage(): Promise {
- return await invoke("plugin:clipboard-manager|read_image").then(
- (rid) => new Image(rid),
- );
+ return await invoke('plugin:clipboard-manager|read_image').then(
+ (rid) => new Image(rid)
+ )
}
/**
* * Writes HTML or fallbacks to write provided plain text to the clipboard.
+ *
+ * #### Platform-specific
+ *
+ * - **Android / iOS:** Not supported.
+ *
* @example
* ```typescript
- * import { writeHtml, readHtml } from '@tauri-apps/plugin-clipboard-manager';
+ * import { writeHtml } from '@tauri-apps/plugin-clipboard-manager';
* await writeHtml('Tauri is awesome!
', 'plaintext');
- * await writeHtml('Tauri is awesome!
', 'Tauri is awesome
'); // Will write "Tauri is awesome
" as plain text
+ * // The following will write "Tauri is awesome
" as plain text
+ * await writeHtml('Tauri is awesome!
', 'Tauri is awesome
');
+ * // we can read html data only as a string so there's just readText(), no readHtml()
* assert(await readText(), 'Tauri is awesome!
');
* ```
*
@@ -105,15 +123,20 @@ async function readImage(): Promise {
*
* @since 2.0.0
*/
-async function writeHtml(html: string, altHtml?: string): Promise {
- await invoke("plugin:clipboard-manager|write_html", {
+async function writeHtml(html: string, altText?: string): Promise {
+ await invoke('plugin:clipboard-manager|write_html', {
html,
- altHtml,
- });
+ altText
+ })
}
/**
* Clears the clipboard.
+ *
+ * #### Platform-specific
+ *
+ * - **Android:** Only supported on SDK 28+. For older releases we write an empty string to the clipboard instead.
+ *
* @example
* ```typescript
* import { clear } from '@tauri-apps/plugin-clipboard-manager';
@@ -122,7 +145,7 @@ async function writeHtml(html: string, altHtml?: string): Promise {
* @since 2.0.0
*/
async function clear(): Promise {
- await invoke("plugin:clipboard-manager|clear");
+ await invoke('plugin:clipboard-manager|clear')
}
-export { writeText, readText, writeHtml, clear, readImage, writeImage };
+export { writeText, readText, writeHtml, clear, readImage, writeImage }
diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json
index 7f661aac..241206e3 100644
--- a/plugins/clipboard-manager/package.json
+++ b/plugins/clipboard-manager/package.json
@@ -1,7 +1,7 @@
{
"name": "@tauri-apps/plugin-clipboard-manager",
- "version": "2.0.0-rc.0",
- "license": "MIT or APACHE-2.0",
+ "version": "2.2.0",
+ "license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
- "@tauri-apps/api": "^2.0.0-rc.1"
+ "@tauri-apps/api": "^2.0.0"
}
}
diff --git a/plugins/clipboard-manager/permissions/autogenerated/reference.md b/plugins/clipboard-manager/permissions/autogenerated/reference.md
index 88c90e41..6b8bf14f 100644
--- a/plugins/clipboard-manager/permissions/autogenerated/reference.md
+++ b/plugins/clipboard-manager/permissions/autogenerated/reference.md
@@ -8,7 +8,7 @@ Clipboard interaction needs to be explicitly enabled.
-## Permission Table
+## Permission Table
diff --git a/plugins/clipboard-manager/permissions/schemas/schema.json b/plugins/clipboard-manager/permissions/schemas/schema.json
index d579bae8..c2763492 100644
--- a/plugins/clipboard-manager/permissions/schemas/schema.json
+++ b/plugins/clipboard-manager/permissions/schemas/schema.json
@@ -295,95 +295,69 @@
"type": "string",
"oneOf": [
{
- "description": "allow-clear -> Enables the clear command without any pre-configured scope.",
+ "description": "Enables the clear command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-clear"
- ]
+ "const": "allow-clear"
},
{
- "description": "deny-clear -> Denies the clear command without any pre-configured scope.",
+ "description": "Denies the clear command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-clear"
- ]
+ "const": "deny-clear"
},
{
- "description": "allow-read-image -> Enables the read_image command without any pre-configured scope.",
+ "description": "Enables the read_image command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-read-image"
- ]
+ "const": "allow-read-image"
},
{
- "description": "deny-read-image -> Denies the read_image command without any pre-configured scope.",
+ "description": "Denies the read_image command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-read-image"
- ]
+ "const": "deny-read-image"
},
{
- "description": "allow-read-text -> Enables the read_text command without any pre-configured scope.",
+ "description": "Enables the read_text command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-read-text"
- ]
+ "const": "allow-read-text"
},
{
- "description": "deny-read-text -> Denies the read_text command without any pre-configured scope.",
+ "description": "Denies the read_text command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-read-text"
- ]
+ "const": "deny-read-text"
},
{
- "description": "allow-write-html -> Enables the write_html command without any pre-configured scope.",
+ "description": "Enables the write_html command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-write-html"
- ]
+ "const": "allow-write-html"
},
{
- "description": "deny-write-html -> Denies the write_html command without any pre-configured scope.",
+ "description": "Denies the write_html command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-write-html"
- ]
+ "const": "deny-write-html"
},
{
- "description": "allow-write-image -> Enables the write_image command without any pre-configured scope.",
+ "description": "Enables the write_image command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-write-image"
- ]
+ "const": "allow-write-image"
},
{
- "description": "deny-write-image -> Denies the write_image command without any pre-configured scope.",
+ "description": "Denies the write_image command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-write-image"
- ]
+ "const": "deny-write-image"
},
{
- "description": "allow-write-text -> Enables the write_text command without any pre-configured scope.",
+ "description": "Enables the write_text command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-write-text"
- ]
+ "const": "allow-write-text"
},
{
- "description": "deny-write-text -> Denies the write_text command without any pre-configured scope.",
+ "description": "Denies the write_text command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-write-text"
- ]
+ "const": "deny-write-text"
},
{
- "description": "default -> No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n",
+ "description": "No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n",
"type": "string",
- "enum": [
- "default"
- ]
+ "const": "default"
}
]
}
diff --git a/plugins/clipboard-manager/rollup.config.js b/plugins/clipboard-manager/rollup.config.js
index 977dfac8..1f349ec8 100644
--- a/plugins/clipboard-manager/rollup.config.js
+++ b/plugins/clipboard-manager/rollup.config.js
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { createConfig } from "../../shared/rollup.config.js";
+import { createConfig } from '../../shared/rollup.config.js'
-export default createConfig();
+export default createConfig()
diff --git a/plugins/clipboard-manager/src/desktop.rs b/plugins/clipboard-manager/src/desktop.rs
index 899a5b1c..5edd4934 100644
--- a/plugins/clipboard-manager/src/desktop.rs
+++ b/plugins/clipboard-manager/src/desktop.rs
@@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT
use arboard::ImageData;
-use image::ImageEncoder;
use serde::de::DeserializeOwned;
use tauri::{image::Image, plugin::PluginApi, AppHandle, Runtime};
@@ -85,16 +84,11 @@ impl Clipboard {
match &self.clipboard {
Ok(clipboard) => {
let image = clipboard.lock().unwrap().get_image()?;
-
- let mut buffer: Vec = Vec::new();
- image::codecs::png::PngEncoder::new(&mut buffer).write_image(
- &image.bytes,
+ let image = Image::new_owned(
+ image.bytes.to_vec(),
image.width as u32,
image.height as u32,
- image::ColorType::Rgba8,
- )?;
-
- let image = Image::new_owned(buffer, image.width as u32, image.height as u32);
+ );
Ok(image)
}
Err(e) => Err(crate::Error::Clipboard(e.to_string())),
diff --git a/plugins/clipboard-manager/src/error.rs b/plugins/clipboard-manager/src/error.rs
index 7e36a11b..1b8cf482 100644
--- a/plugins/clipboard-manager/src/error.rs
+++ b/plugins/clipboard-manager/src/error.rs
@@ -15,9 +15,6 @@ pub enum Error {
Clipboard(String),
#[error(transparent)]
Tauri(#[from] tauri::Error),
- #[cfg(desktop)]
- #[error("invalid image: {0}")]
- Image(#[from] image::ImageError),
}
impl Serialize for Error {
diff --git a/plugins/clipboard-manager/src/lib.rs b/plugins/clipboard-manager/src/lib.rs
index 3924d7f1..133020d9 100644
--- a/plugins/clipboard-manager/src/lib.rs
+++ b/plugins/clipboard-manager/src/lib.rs
@@ -2,8 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/clipboard-manager)
-//!
//! Read and write to the system clipboard.
#![doc(
diff --git a/plugins/deep-link/.gitignore b/plugins/deep-link/.gitignore
deleted file mode 100644
index 1b0b469d..00000000
--- a/plugins/deep-link/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/.tauri
diff --git a/plugins/deep-link/.test-server/.well-known/apple-app-site-association b/plugins/deep-link/.test-server/.well-known/apple-app-site-association
new file mode 100644
index 00000000..da5d0a77
--- /dev/null
+++ b/plugins/deep-link/.test-server/.well-known/apple-app-site-association
@@ -0,0 +1,17 @@
+{
+ "applinks": {
+ "details": [
+ {
+ "appIDs": [
+ "Q93MBH6S2F.com.tauri.deep-link-example"
+ ],
+ "components": [
+ {
+ "/": "/open/*",
+ "comment": "Matches any URL whose path starts with /open/"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/plugins/deep-link/.test-server/server.js b/plugins/deep-link/.test-server/server.js
new file mode 100644
index 00000000..0e2fec50
--- /dev/null
+++ b/plugins/deep-link/.test-server/server.js
@@ -0,0 +1,27 @@
+// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+import http from 'http'
+import fs from 'fs'
+
+const hostname = 'localhost'
+const port = 8080
+
+const server = http.createServer(function (req, res) {
+ console.log(req.url)
+ if (req.url == '/.well-known/apple-app-site-association') {
+ const association = fs.readFileSync(
+ '.well-known/apple-app-site-association'
+ )
+ res.writeHead(200, { 'Content-Type': 'application/json' })
+ res.end(association)
+ } else {
+ res.writeHead(404)
+ res.end('404 NOT FOUND')
+ }
+})
+
+server.listen(port, hostname, () => {
+ console.log('Server started on port', port)
+})
diff --git a/plugins/deep-link/CHANGELOG.md b/plugins/deep-link/CHANGELOG.md
index bf5d4e9e..4c3c9b9a 100644
--- a/plugins/deep-link/CHANGELOG.md
+++ b/plugins/deep-link/CHANGELOG.md
@@ -1,5 +1,47 @@
# Changelog
+## \[2.2.0]
+
+- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
+
+## \[2.0.1]
+
+- [`b2aea045`](https://github.com/tauri-apps/plugins-workspace/commit/b2aea0456799775a7243706fdd7a5abf9a193992) ([#2008](https://github.com/tauri-apps/plugins-workspace/pull/2008) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) `onOpenUrl()` will now not call `getCurrent()` anymore, matching the documented behavior.
+
+## \[2.0.1]
+
+- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
+
+## \[2.0.0]
+
+- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+
+## \[2.0.0-rc.7]
+
+- [`3168e176`](https://github.com/tauri-apps/plugins-workspace/commit/3168e176031a61215be542595ba90ca51f8f2d97) ([#1806](https://github.com/tauri-apps/plugins-workspace/pull/1806) by [@auggiebennett](https://github.com/tauri-apps/plugins-workspace/../../auggiebennett)) Fix fails to start when having spaces in the main binary path on Windows
+
+## \[2.0.0-rc.6]
+
+- [`6f3f6679`](https://github.com/tauri-apps/plugins-workspace/commit/6f3f66794a87ef9d1c16667c425d5ad7091a9c2f) ([#1780](https://github.com/tauri-apps/plugins-workspace/pull/1780)) Added `DeepLink::on_open_url` function to match the JavaScript API implementation,
+ which wraps the `deep-link://new-url` event and also send the current deep link if there's any.
+
+## \[2.0.0-rc.5]
+
+- [`984110a9`](https://github.com/tauri-apps/plugins-workspace/commit/984110a978774712bad4d746ed06134d54debcd0) ([#1770](https://github.com/tauri-apps/plugins-workspace/pull/1770) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Emit the `deep-link://new-url` event on Linux and Windows when the app is executed with a deep link CLI argument,
+ matching the iOS and macOS behavior.
+
+## \[2.0.0-rc.2]
+
+- [`64a6240f`](https://github.com/tauri-apps/plugins-workspace/commit/64a6240f79fcd52267c8d721b727ae695055d7ff) ([#1759](https://github.com/tauri-apps/plugins-workspace/pull/1759) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Implement `get_current` on Linux and Windows.
+
+## \[2.0.0-rc.3]
+
+- [`4654591d`](https://github.com/tauri-apps/plugins-workspace/commit/4654591d820403d6fa1a007fd55bb0d85947a6cc) ([#1732](https://github.com/tauri-apps/plugins-workspace/pull/1732) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Allow empty configuration values.
+
+## \[2.0.0-rc.1]
+
+- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+
## \[2.0.0-rc.1]
- [`2c00c029`](https://github.com/tauri-apps/plugins-workspace/commit/2c00c0292c9127b81567de46691e8c0f73557261) ([#1630](https://github.com/tauri-apps/plugins-workspace/pull/1630) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Fixed an issue that caused multi-word IIFE names to not be formatted correctly. For example the `barcode-scanner` was defined as `window.__TAURI_PLUGIN_CLIPBOARDMANAGER__` instead of `window.__TAURI_PLUGIN_CLIPBOARD_MANAGER__`.
@@ -96,3 +138,6 @@
- [`eccd6f9`](https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
ithub.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
+ ]\(https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
+ commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
+ ithub.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
diff --git a/plugins/deep-link/Cargo.toml b/plugins/deep-link/Cargo.toml
index 0077fc55..b43b1dfa 100644
--- a/plugins/deep-link/Cargo.toml
+++ b/plugins/deep-link/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-deep-link"
-version = "2.0.0-rc.1"
+version = "2.2.0"
description = "Set your Tauri application as the default handler for an URL"
authors = { workspace = true }
license = { workspace = true }
@@ -10,29 +10,36 @@ repository = { workspace = true }
links = "tauri-plugin-deep-link"
[package.metadata.docs.rs]
-rustc-args = [ "--cfg", "docsrs" ]
-rustdoc-args = [ "--cfg", "docsrs" ]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-linux-android"]
+[package.metadata.platforms.support]
+windows = { level = "full", notes = "" }
+linux = { level = "full", notes = "" }
+macos = { level = "partial", notes = "Runtime deep link registration is not supported" }
+android = { level = "partial", notes = "Runtime deep link registration is not supported" }
+ios = { level = "partial", notes = "Runtime deep link registration is not supported" }
+
[build-dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri-utils = { workspace = true }
-tauri-plugin = { workspace = true, features = [ "build" ] }
+tauri-plugin = { workspace = true, features = ["build"] }
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true }
tauri-utils = { workspace = true }
-log = { workspace = true }
+tracing = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }
[target."cfg(windows)".dependencies]
dunce = "1"
-windows-registry = "0.2"
-windows-result = "0.2"
+windows-registry = "0.4"
+windows-result = "0.3"
[target."cfg(target_os = \"linux\")".dependencies]
rust-ini = "0.21"
diff --git a/plugins/deep-link/README.md b/plugins/deep-link/README.md
index 9f62cf70..61a36a80 100644
--- a/plugins/deep-link/README.md
+++ b/plugins/deep-link/README.md
@@ -2,9 +2,17 @@
Set your Tauri application as the default handler for an URL.
+| Platform | Supported |
+| -------- | --------- |
+| Linux | ✓ |
+| Windows | ✓ |
+| macOS | ✓ |
+| Android | ✓ |
+| iOS | ✓ |
+
## Install
-_This plugin requires a Rust version of at least **1.75**_
+_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
-tauri-plugin-deep-link = "2.0.0-rc"
+tauri-plugin-deep-link = "2.0.0"
# alternatively with Git:
tauri-plugin-deep-link = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -63,7 +71,7 @@ For [app links](https://developer.android.com/training/app-links#android-app-lin
]
```
-Where `$APP_BUNDLE_ID` is the value defined on `tauri.conf.json > tauri > bundle > identifier` with `-` replaced with `_` and `$CERT_FINGERPRINT` is a list of SHA256 fingerprints of your app's signing certificates, see [verify android applinks](https://developer.android.com/training/app-links/verify-android-applinks#web-assoc) for more information.
+Where `$APP_BUNDLE_ID` is the value defined on `tauri.conf.json > identifier` with `-` replaced with `_` and `$CERT_FINGERPRINT` is a list of SHA256 fingerprints of your app's signing certificates, see [verify android applinks](https://developer.android.com/training/app-links/verify-android-applinks#web-assoc) for more information.
### iOS
@@ -87,7 +95,17 @@ For [universal links](https://developer.apple.com/documentation/xcode/allowing-a
}
```
-Where `$DEVELOPMENT_TEAM_ID` is the value defined on `tauri.conf.json > tauri > bundle > iOS > developmentTeam` or the `TAURI_APPLE_DEVELOPMENT_TEAM` environment variable and `$APP_BUNDLE_ID` is the value defined on `tauri.conf.json > tauri > bundle > identifier`. See [applinks.details](https://developer.apple.com/documentation/bundleresources/applinks/details) for more information.
+Where `$DEVELOPMENT_TEAM_ID` is the value defined on `tauri.conf.json > bundle > iOS > developmentTeam` or the `APPLE_DEVELOPMENT_TEAM` environment variable and `$APP_BUNDLE_ID` is the value defined on `tauri.conf.json > identifier`. See [applinks.details](https://developer.apple.com/documentation/bundleresources/applinks/details) for more information.
+
+To verify if your domain has been properly configured to expose the app associations, you can run the following command:
+
+```sh
+curl -v https://app-site-association.cdn-apple.com/a/v1/
+```
+
+**The apple-app-site-association file must be served over HTTPS and the response must include the `Content-Type: application/json` header.**
+
+To quickly open an app link on the iOS simulator you can execute `xcrun simctl openurl booted `.
See [supporting associated domains](https://developer.apple.com/documentation/xcode/supporting-associated-domains?language=objc) for more information.
@@ -115,7 +133,7 @@ Under `tauri.conf.json > plugins > deep-link`, configure the domains (mobile) an
First you need to register the core plugin with Tauri:
-`src-tauri/src/main.rs`
+`src-tauri/src/lib.rs`
```rust
fn main() {
@@ -129,13 +147,13 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
-import { onOpenUrl } from "@tauri-apps/plugin-deep-link";
+import { onOpenUrl } from '@tauri-apps/plugin-deep-link'
await onOpenUrl((urls) => {
- console.log("deep link:", urls);
-});
+ console.log('deep link:', urls)
+})
```
-Note that the Plugin will only emit events on macOS, iOS and Android. On Windows and Linux the OS will spawn a new instance of your app with the URL as a CLI argument. If you want your app to behave on Windows & Linux similar to the other platforms you can use the [single-instance](../single-instance/) plugin.
+Note that the Plugin will only emit events on macOS, iOS and Android. On Windows and Linux the OS will spawn a new instance of your app with the URL as a CLI argument. If you want your app to behave on Windows & Linux similar to the other platforms you can use the [single-instance](../single-instance/) plugin with the `deep-link` feature enabled.
## Contributing
diff --git a/plugins/deep-link/SECURITY.md b/plugins/deep-link/SECURITY.md
index 67d831fc..4f09bbac 100644
--- a/plugins/deep-link/SECURITY.md
+++ b/plugins/deep-link/SECURITY.md
@@ -20,4 +20,4 @@ We prefer to receive reports in English.
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
-Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
\ No newline at end of file
+Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
diff --git a/plugins/deep-link/api-iife.js b/plugins/deep-link/api-iife.js
index eba7152f..6d9e3e18 100644
--- a/plugins/deep-link/api-iife.js
+++ b/plugins/deep-link/api-iife.js
@@ -1 +1 @@
-if("__TAURI__"in window){var __TAURI_PLUGIN_DEEP_LINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function i(e,t,i){const a={kind:"Any"};return r("plugin:event|listen",{event:e,target:a,handler:n(t)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function a(){return await r("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(t||(t={})),e.getCurrent=a,e.isRegistered=async function(e){return await r("plugin:deep-link|is_registered",{protocol:e})},e.onOpenUrl=async function(e){const n=await a();return n&&e(n),await i("deep-link://new-url",(n=>{e(n.payload)}))},e.register=async function(e){return await r("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await r("plugin:deep-link|unregister",{protocol:e})},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEP_LINK__})}
+if("__TAURI__"in window){var __TAURI_PLUGIN_DEEP_LINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function i(e,t,i){const a={kind:"Any"};return r("plugin:event|listen",{event:e,target:a,handler:n(t)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(t||(t={})),e.getCurrent=async function(){return await r("plugin:deep-link|get_current")},e.isRegistered=async function(e){return await r("plugin:deep-link|is_registered",{protocol:e})},e.onOpenUrl=async function(e){return await i("deep-link://new-url",(n=>{e(n.payload)}))},e.register=async function(e){return await r("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await r("plugin:deep-link|unregister",{protocol:e})},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEP_LINK__})}
diff --git a/plugins/deep-link/examples/app/.gitignore b/plugins/deep-link/examples/app/.gitignore
index 251ce6d2..c9b61864 100644
--- a/plugins/deep-link/examples/app/.gitignore
+++ b/plugins/deep-link/examples/app/.gitignore
@@ -21,3 +21,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
+
+dist/
diff --git a/plugins/deep-link/examples/app/CHANGELOG.md b/plugins/deep-link/examples/app/CHANGELOG.md
index 182d7399..5e89d0f4 100644
--- a/plugins/deep-link/examples/app/CHANGELOG.md
+++ b/plugins/deep-link/examples/app/CHANGELOG.md
@@ -1,5 +1,37 @@
# Changelog
+## \[2.2.0]
+
+### Dependencies
+
+- Upgraded to `deep-link-js@2.1.0`
+
+## \[2.0.1]
+
+### Dependencies
+
+- Upgraded to `deep-link-js@2.0.1`
+
+## \[2.0.0]
+
+- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+
+### Dependencies
+
+- Upgraded to `deep-link-js@2.0.0`
+
+## \[2.0.0-rc.1]
+
+### Dependencies
+
+- Upgraded to `deep-link-js@2.0.0-rc.2`
+
+## \[2.0.0-rc.0]
+
+### Dependencies
+
+- Upgraded to `deep-link-js@2.0.0-rc.1`
+
## \[2.0.0-beta.11]
### Dependencies
diff --git a/plugins/deep-link/examples/app/package.json b/plugins/deep-link/examples/app/package.json
index 5fac24a2..65b3b7b7 100644
--- a/plugins/deep-link/examples/app/package.json
+++ b/plugins/deep-link/examples/app/package.json
@@ -1,7 +1,7 @@
{
"name": "deep-link-example",
"private": true,
- "version": "2.0.0-beta.11",
+ "version": "2.2.0",
"type": "module",
"scripts": {
"dev": "vite",
@@ -10,12 +10,12 @@
"tauri": "tauri"
},
"dependencies": {
- "@tauri-apps/api": "2.0.0-rc.1",
- "@tauri-apps/plugin-deep-link": "2.0.0-rc.0"
+ "@tauri-apps/api": "2.2.0",
+ "@tauri-apps/plugin-deep-link": "2.2.0"
},
"devDependencies": {
- "@tauri-apps/cli": "2.0.0-rc.6",
+ "@tauri-apps/cli": "2.2.4",
"typescript": "^5.2.2",
- "vite": "^5.0.13"
+ "vite": "^6.0.0"
}
}
diff --git a/plugins/deep-link/examples/app/src-tauri/Cargo.toml b/plugins/deep-link/examples/app/src-tauri/Cargo.toml
index 4b8e7a7d..11e7c41f 100644
--- a/plugins/deep-link/examples/app/src-tauri/Cargo.toml
+++ b/plugins/deep-link/examples/app/src-tauri/Cargo.toml
@@ -6,7 +6,7 @@ authors = ["you"]
license = ""
repository = ""
edition = "2021"
-rust-version = "1.75"
+rust-version = "1.77.2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -21,6 +21,11 @@ serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true, features = ["wry", "compression"] }
tauri-plugin-deep-link = { path = "../../../" }
+tauri-plugin-log = { path = "../../../../log" }
+tauri-plugin-single-instance = { path = "../../../../single-instance", features = [
+ "deep-link",
+] }
+log = "0.4"
[features]
# this feature is used for production builds or when `devUrl` points to the filesystem and the built-in dev server is disabled.
diff --git a/plugins/deep-link/examples/app/src-tauri/capabilities/app.json b/plugins/deep-link/examples/app/src-tauri/capabilities/app.json
new file mode 100644
index 00000000..a4bc7b4c
--- /dev/null
+++ b/plugins/deep-link/examples/app/src-tauri/capabilities/app.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "../gen/schemas/desktop-schema.json",
+ "identifier": "run-app-base",
+ "description": "Base permissions to run the app",
+ "windows": ["main"],
+ "permissions": [
+ "core:default",
+ "deep-link:allow-get-current",
+ "deep-link:default"
+ ]
+}
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/app/.gitignore b/plugins/deep-link/examples/app/src-tauri/gen/android/app/.gitignore
index 6d888c10..1efb55bd 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/app/.gitignore
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/app/.gitignore
@@ -2,4 +2,5 @@
/src/main/jniLibs/**/*.so
/src/main/assets/tauri.conf.json
/tauri.build.gradle.kts
-/proguard-tauri.pro
\ No newline at end of file
+/proguard-tauri.pro
+/tauri.properties
\ No newline at end of file
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/app/build.gradle.kts b/plugins/deep-link/examples/app/src-tauri/gen/android/app/build.gradle.kts
index 2209a939..f434bbfb 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/app/build.gradle.kts
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/app/build.gradle.kts
@@ -1,18 +1,28 @@
+import java.util.Properties
+
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("rust")
}
+val tauriProperties = Properties().apply {
+ val propFile = file("tauri.properties")
+ if (propFile.exists()) {
+ propFile.inputStream().use { load(it) }
+ }
+}
+
android {
compileSdk = 34
namespace = "com.tauri.deep_link_example"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "com.tauri.deep_link_example"
- minSdk = 24
- versionCode = 1
- versionName = "1.0"
+ minSdk = 24
+ targetSdk = 34
+ versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
+ versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
}
buildTypes {
getByName("debug") {
@@ -38,6 +48,9 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
+ buildFeatures {
+ buildConfig = true
+ }
}
rust {
@@ -53,4 +66,4 @@ dependencies {
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
}
-apply(from = "tauri.build.gradle.kts")
+apply(from = "tauri.build.gradle.kts")
\ No newline at end of file
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/app/src/main/AndroidManifest.xml b/plugins/deep-link/examples/app/src-tauri/gen/android/app/src/main/AndroidManifest.xml
index 68c05a37..05265e32 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/app/src/main/AndroidManifest.xml
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/app/src/main/AndroidManifest.xml
@@ -1,6 +1,10 @@
+
+
+
+
+
+
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/build.gradle.kts b/plugins/deep-link/examples/app/src-tauri/gen/android/build.gradle.kts
index 9afefe17..c5ef452a 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/build.gradle.kts
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/build.gradle.kts
@@ -4,8 +4,8 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath("com.android.tools.build:gradle:8.3.2")
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
+ classpath("com.android.tools.build:gradle:8.5.1")
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
}
}
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/build.gradle.kts b/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/build.gradle.kts
index 5d4cf37e..39e90b05 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/build.gradle.kts
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/build.gradle.kts
@@ -18,6 +18,6 @@ repositories {
dependencies {
compileOnly(gradleApi())
- implementation("com.android.tools.build:gradle:8.3.2")
+ implementation("com.android.tools.build:gradle:8.5.1")
}
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/BuildTask.kt b/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/BuildTask.kt
index b9e83018..f9874825 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/BuildTask.kt
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/BuildTask.kt
@@ -1,7 +1,3 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
import java.io.File
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.DefaultTask
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/RustPlugin.kt b/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/RustPlugin.kt
index cad2d877..4aa7fcaf 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/RustPlugin.kt
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/buildSrc/src/main/java/com/tauri/deep_link_example/kotlin/RustPlugin.kt
@@ -1,7 +1,3 @@
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
import com.android.build.api.dsl.ApplicationExtension
import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/gradle.properties b/plugins/deep-link/examples/app/src-tauri/gen/android/gradle.properties
index 022338b7..2a7ec695 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/gradle.properties
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/gradle.properties
@@ -21,5 +21,4 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
-android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
\ No newline at end of file
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties b/plugins/deep-link/examples/app/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties
index a03ce6aa..0df10d55 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Tue May 10 19:22:52 CST 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/android/gradlew.bat b/plugins/deep-link/examples/app/src-tauri/gen/android/gradlew.bat
index ac1b06f9..107acd32 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/android/gradlew.bat
+++ b/plugins/deep-link/examples/app/src-tauri/gen/android/gradlew.bat
@@ -1,89 +1,89 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png
index f8b128e3..a6ac2a8c 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png
index 6bbd9e3c..2869541f 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png
index 6bbd9e3c..2869541f 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png
index f702cc04..cf265a45 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png
index c5e92f78..29c9746c 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png
index 1c607d5c..a4e68c8d 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png
index 1c607d5c..a4e68c8d 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png
index 60e93a6a..e4adcbce 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png
index 6bbd9e3c..2869541f 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png
index 819410f9..a414e65b 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png
index 819410f9..a414e65b 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png
index e00ae5a6..a0807e5d 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
index f5301f37..704c9291 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512x512@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512x512@2x.png
deleted file mode 100644
index 5e9add73..00000000
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512x512@2x.png and /dev/null differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png
index e00ae5a6..a0807e5d 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png
index 3546ca10..2a9fbc26 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png
index d8367101..2cdf1848 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png
index 29925f2a..4723e4b4 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png
index dfd22619..f26fee45 100644
Binary files a/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png and b/plugins/deep-link/examples/app/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png differ
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/ExportOptions.plist b/plugins/deep-link/examples/app/src-tauri/gen/apple/ExportOptions.plist
index b69cf1de..0428a171 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/apple/ExportOptions.plist
+++ b/plugins/deep-link/examples/app/src-tauri/gen/apple/ExportOptions.plist
@@ -3,6 +3,6 @@
method
- development
+ debugging
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/LaunchScreen.storyboard b/plugins/deep-link/examples/app/src-tauri/gen/apple/LaunchScreen.storyboard
new file mode 100644
index 00000000..dd79351e
--- /dev/null
+++ b/plugins/deep-link/examples/app/src-tauri/gen/apple/LaunchScreen.storyboard
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/assets/.gitkeep b/plugins/deep-link/examples/app/src-tauri/gen/apple/assets/.gitkeep
deleted file mode 100644
index e69de29b..00000000
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/project.pbxproj b/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/project.pbxproj
index c2e4090c..450bd847 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/project.pbxproj
+++ b/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 51;
+ objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
@@ -17,26 +17,28 @@
D01EC573029B7BEC701F6012 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BDF5DBBA740DA7D86791DEC /* WebKit.framework */; };
D4D232DBB85C5C1594FACC3D /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = D99665C1C3247732C6BF25F4 /* main.mm */; };
D7A9EBD47413746EDE96BDF8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B18865218362A4BE07527DBD /* CoreGraphics.framework */; };
- FBB3FE3EDDEAF717E61F2AD4 /* libdeep_link_example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DCAEEC42BAB5E4A4757C89C2 /* libdeep_link_example.a */; };
+ E26F7FA923DA1EABEE42B63A /* libapp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 403FB4BAE59F74EE98EF1EC6 /* libapp.a */; };
+ E6992F2651B864B15ED14925 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1846ADCEDC2C208E1037ADC6 /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 1846ADCEDC2C208E1037ADC6 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; };
1C21C8B4A18EC7D0B5808C10 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
- 1CAAFA750FD735A285DC1238 /* deep-link-example_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = "deep-link-example_iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1CAAFA750FD735A285DC1238 /* deep-link-example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "deep-link-example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2F316D1CD78DD2E070DA5C17 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
3DD32303BEC377C10162CF69 /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = ""; };
+ 403FB4BAE59F74EE98EF1EC6 /* libapp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapp.a; sourceTree = ""; };
486CAFD81CB14F9A2DF72FDF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 4A33212233BFAA738F6A46FC /* lib.rs */ = {isa = PBXFileReference; path = lib.rs; sourceTree = ""; };
+ 4A33212233BFAA738F6A46FC /* lib.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = lib.rs; sourceTree = ""; };
4BDECB1ED2EEEB5A6A8B8372 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
6BDF5DBBA740DA7D86791DEC /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
8AB0099573FE8BF1DC82CDBA /* deep-link-example_iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "deep-link-example_iOS.entitlements"; sourceTree = ""; };
9435FC7E183EA6260CE76637 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
- AEA78299D25FEC31E2988090 /* main.rs */ = {isa = PBXFileReference; path = main.rs; sourceTree = ""; };
+ AEA78299D25FEC31E2988090 /* main.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = main.rs; sourceTree = ""; };
B005488D1B56B657AB52E28C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
B18865218362A4BE07527DBD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
BF7ECB9AB55B71692A21D5F7 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = SOURCE_ROOT; };
D99665C1C3247732C6BF25F4 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = ""; };
- DCAEEC42BAB5E4A4757C89C2 /* libdeep_link_example.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libdeep_link_example.a; sourceTree = ""; };
ED2B1BC06DFE0498ECDEEE51 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
@@ -45,7 +47,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FBB3FE3EDDEAF717E61F2AD4 /* libdeep_link_example.a in Frameworks */,
+ E26F7FA923DA1EABEE42B63A /* libapp.a in Frameworks */,
D7A9EBD47413746EDE96BDF8 /* CoreGraphics.framework in Frameworks */,
017AE826151E36372534A964 /* Metal.framework in Frameworks */,
BC36958BBBA7FE61066213D7 /* MetalKit.framework in Frameworks */,
@@ -81,6 +83,7 @@
children = (
BF7ECB9AB55B71692A21D5F7 /* assets */,
486CAFD81CB14F9A2DF72FDF /* Assets.xcassets */,
+ 1846ADCEDC2C208E1037ADC6 /* LaunchScreen.storyboard */,
7D12035C470ED9DAF55A709E /* deep-link-example_iOS */,
84EADC52DA26583ACE816A6D /* Externals */,
146BAF1D709F8A0FE5B07709 /* Sources */,
@@ -94,7 +97,7 @@
isa = PBXGroup;
children = (
B18865218362A4BE07527DBD /* CoreGraphics.framework */,
- DCAEEC42BAB5E4A4757C89C2 /* libdeep_link_example.a */,
+ 403FB4BAE59F74EE98EF1EC6 /* libapp.a */,
ED2B1BC06DFE0498ECDEEE51 /* Metal.framework */,
1C21C8B4A18EC7D0B5808C10 /* MetalKit.framework */,
9435FC7E183EA6260CE76637 /* QuartzCore.framework */,
@@ -142,7 +145,7 @@
F9EEBB3248B74B1D6CDA4D84 /* Products */ = {
isa = PBXGroup;
children = (
- 1CAAFA750FD735A285DC1238 /* deep-link-example_iOS.app */,
+ 1CAAFA750FD735A285DC1238 /* deep-link-example.app */,
);
name = Products;
sourceTree = "";
@@ -165,7 +168,7 @@
);
name = "deep-link-example_iOS";
productName = "deep-link-example_iOS";
- productReference = 1CAAFA750FD735A285DC1238 /* deep-link-example_iOS.app */;
+ productReference = 1CAAFA750FD735A285DC1238 /* deep-link-example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -174,15 +177,11 @@
BCB4BA6E81088C5B470E3436 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1200;
- TargetAttributes = {
- A1C635908C823A89928264CD = {
- DevelopmentTeam = Q93MBH6S2F;
- };
- };
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1430;
};
buildConfigurationList = 8FCB58B8ADB9F9CB9ECE01FA /* Build configuration list for PBXProject "deep-link-example" */;
- compatibilityVersion = "Xcode 11.0";
+ compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
@@ -204,6 +203,7 @@
buildActionMask = 2147483647;
files = (
65A8D948440EDAA7F62BA1F4 /* Assets.xcassets in Resources */,
+ E6992F2651B864B15ED14925 /* LaunchScreen.storyboard in Resources */,
C384FB77F116B05F8E642CA8 /* assets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -225,8 +225,9 @@
outputFileListPaths = (
);
outputPaths = (
- "$(SRCROOT)/target/aarch64-apple-ios/${CONFIGURATION}/deps/libdeep_link_example.a",
- "$(SRCROOT)/target/x86_64-apple-ios/${CONFIGURATION}/deps/libdeep_link_example.a",
+ "$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a",
+ "$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a",
+ "$(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -320,8 +321,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "deep-link-example_iOS/deep-link-example_iOS.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = Q93MBH6S2F;
ENABLE_BITCODE = NO;
+ "EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
+ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\".\"",
@@ -331,10 +335,28 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- "LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
- "LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
- "LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
- PRODUCT_BUNDLE_IDENTIFIER = "com.tauri.deep-link-example";
+ "LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
+ "$(SDKROOT)/usr/lib/swift",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
+ );
+ "LIBRARY_SEARCH_PATHS[arch=arm64]" = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
+ "$(SDKROOT)/usr/lib/swift",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
+ );
+ "LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
+ "$(SDKROOT)/usr/lib/swift",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.tauri.deep-link-example;
PRODUCT_NAME = "deep-link-example";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -409,8 +431,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "deep-link-example_iOS/deep-link-example_iOS.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = Q93MBH6S2F;
ENABLE_BITCODE = NO;
+ "EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
+ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\".\"",
@@ -420,10 +445,28 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- "LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
- "LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
- "LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
- PRODUCT_BUNDLE_IDENTIFIER = "com.tauri.deep-link-example";
+ "LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
+ "$(SDKROOT)/usr/lib/swift",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
+ );
+ "LIBRARY_SEARCH_PATHS[arch=arm64]" = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
+ "$(SDKROOT)/usr/lib/swift",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
+ );
+ "LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
+ "$(SDKROOT)/usr/lib/swift",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
+ "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.tauri.deep-link-example;
PRODUCT_NAME = "deep-link-example";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/xcshareddata/xcschemes/deep-link-example_iOS.xcscheme b/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/xcshareddata/xcschemes/deep-link-example_iOS.xcscheme
index 7c19e933..a8fbc97e 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/xcshareddata/xcschemes/deep-link-example_iOS.xcscheme
+++ b/plugins/deep-link/examples/app/src-tauri/gen/apple/deep-link-example.xcodeproj/xcshareddata/xcschemes/deep-link-example_iOS.xcscheme
@@ -1,6 +1,6 @@
CFBundleShortVersionString
0.0.0
CFBundleVersion
- 0.0.0
+ 0.1.0
LSRequiresIPhoneOS
UILaunchStoryboardName
@@ -41,4 +41,4 @@
UIInterfaceOrientationLandscapeRight
-
+
\ No newline at end of file
diff --git a/plugins/deep-link/examples/app/src-tauri/gen/apple/project.yml b/plugins/deep-link/examples/app/src-tauri/gen/apple/project.yml
index d369b8dc..c924ca77 100644
--- a/plugins/deep-link/examples/app/src-tauri/gen/apple/project.yml
+++ b/plugins/deep-link/examples/app/src-tauri/gen/apple/project.yml
@@ -4,7 +4,7 @@
name: deep-link-example
options:
- bundleIdPrefix: com.tauri
+ bundleIdPrefix: com.tauri.deep-link-example
deploymentTarget:
iOS: 13.0
fileGroups: [../../src]
@@ -40,6 +40,7 @@ targets:
- path: assets
buildPhase: resources
type: folder
+ - path: LaunchScreen.storyboard
info:
path: deep-link-example_iOS/Info.plist
properties:
@@ -68,13 +69,15 @@ targets:
ENABLE_BITCODE: false
ARCHS: [arm64, arm64-sim]
VALID_ARCHS: arm64 arm64-sim
- LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
- LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
- LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
+ LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
+ LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
+ LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
+ EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64
+ EXCLUDED_ARCHS[sdk=iphoneos*]: arm64-sim x86_64
groups: [app]
dependencies:
- - framework: libdeep_link_example.a
+ - framework: libapp.a
embed: false
- sdk: CoreGraphics.framework
- sdk: Metal.framework
@@ -88,5 +91,6 @@ targets:
name: Build Rust Code
basedOnDependencyAnalysis: false
outputFiles:
- - $(SRCROOT)/target/aarch64-apple-ios/${CONFIGURATION}/deps/libdeep_link_example.a
- - $(SRCROOT)/target/x86_64-apple-ios/${CONFIGURATION}/deps/libdeep_link_example.a
+ - $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a
+ - $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
+ - $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a
diff --git a/plugins/deep-link/examples/app/src-tauri/server.js b/plugins/deep-link/examples/app/src-tauri/server.js
index c8686631..24a6ac6f 100644
--- a/plugins/deep-link/examples/app/src-tauri/server.js
+++ b/plugins/deep-link/examples/app/src-tauri/server.js
@@ -2,30 +2,30 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import http from "http";
-import fs from "fs";
-import path from "path";
-import * as url from "url";
-const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
+import http from 'http'
+import fs from 'fs'
+import path from 'path'
+import * as url from 'url'
+const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
-const port = 8125;
+const port = 8125
http
.createServer(function (request, response) {
- if (request.url === "/.well-known/apple-app-site-association") {
+ if (request.url === '/.well-known/apple-app-site-association') {
// eslint-disable-next-line
fs.readFile(
- path.resolve(__dirname, "apple-app-site-association"),
+ path.resolve(__dirname, 'apple-app-site-association'),
function (_error, content) {
- response.writeHead(200);
- response.end(content, "utf-8");
- },
- );
+ response.writeHead(200)
+ response.end(content, 'utf-8')
+ }
+ )
} else {
- response.writeHead(404);
- response.end();
+ response.writeHead(404)
+ response.end()
}
})
- .listen(port);
+ .listen(port)
-console.log(`Server running at http://127.0.0.1:${port}/`);
+console.log(`Server running at http://127.0.0.1:${port}/`)
diff --git a/plugins/deep-link/examples/app/src-tauri/src/lib.rs b/plugins/deep-link/examples/app/src-tauri/src/lib.rs
index 32dc9853..f85527d9 100644
--- a/plugins/deep-link/examples/app/src-tauri/src/lib.rs
+++ b/plugins/deep-link/examples/app/src-tauri/src/lib.rs
@@ -2,22 +2,45 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-use tauri::Listener;
+use tauri_plugin_deep_link::DeepLinkExt;
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn greet(name: &str) -> String {
- format!("Hello, {}! You've been greeted from Rust!", name)
+ format!("Hello, {name}! You've been greeted from Rust!")
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
- tauri::Builder::default()
+ #[allow(unused_mut)]
+ let mut builder = tauri::Builder::default();
+
+ #[cfg(desktop)]
+ {
+ builder = builder.plugin(tauri_plugin_single_instance::init(|_app, argv, _cwd| {
+ println!("single instance triggered: {argv:?}");
+ }));
+ }
+
+ builder
.plugin(tauri_plugin_deep_link::init())
+ .plugin(
+ tauri_plugin_log::Builder::default()
+ .level(log::LevelFilter::Info)
+ .build(),
+ )
.setup(|app| {
- app.listen("deep-link://new-url", |url| {
- dbg!(url);
+ // ensure deep links are registered on the system
+ // this is useful because AppImages requires additional setup to be available in the system
+ // and calling register() makes the deep links immediately available - without any user input
+ // additionally, we manually register on Windows on debug builds for development
+ #[cfg(any(target_os = "linux", all(debug_assertions, windows)))]
+ app.deep_link().register_all()?;
+
+ app.deep_link().on_open_url(|event| {
+ dbg!(event.urls());
});
+
Ok(())
})
.invoke_handler(tauri::generate_handler![greet])
diff --git a/plugins/deep-link/examples/app/src-tauri/tauri.conf.json b/plugins/deep-link/examples/app/src-tauri/tauri.conf.json
index fab85cb7..ac1c292b 100644
--- a/plugins/deep-link/examples/app/src-tauri/tauri.conf.json
+++ b/plugins/deep-link/examples/app/src-tauri/tauri.conf.json
@@ -1,6 +1,6 @@
{
"productName": "deep-link-example",
- "version": "0.0.0",
+ "version": "0.1.0",
"identifier": "com.tauri.deep-link-example",
"build": {
"devUrl": "http://localhost:1420",
@@ -29,8 +29,13 @@
},
"deep-link": {
"mobile": [
- { "host": "fabianlars.de", "pathPrefix": ["/intent"] },
- { "host": "tauri.app" }
+ {
+ "host": "fabianlars.de",
+ "pathPrefix": ["/intent"]
+ },
+ {
+ "host": "tauri.app"
+ }
],
"desktop": {
"schemes": ["fabianlars", "my-tauri-app"]
diff --git a/plugins/deep-link/examples/app/src/main.ts b/plugins/deep-link/examples/app/src/main.ts
index f87a6afd..550e0aaa 100644
--- a/plugins/deep-link/examples/app/src/main.ts
+++ b/plugins/deep-link/examples/app/src/main.ts
@@ -4,35 +4,35 @@
import {
onOpenUrl,
- getCurrent as getCurrentDeepLinkUrls,
-} from "@tauri-apps/plugin-deep-link";
+ getCurrent as getCurrentDeepLinkUrls
+} from '@tauri-apps/plugin-deep-link'
function handler(urls: string[]) {
- console.log(urls);
+ console.log(urls)
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const updateIntentEl = document.querySelector("#event-intent")!;
- updateIntentEl.textContent = JSON.stringify(urls);
+ const updateIntentEl = document.querySelector('#event-intent')!
+ updateIntentEl.textContent = JSON.stringify(urls)
}
-window.addEventListener("DOMContentLoaded", () => {
- onOpenUrl(handler);
+window.addEventListener('DOMContentLoaded', () => {
+ onOpenUrl(handler)
- document.querySelector("#intent-form")?.addEventListener("submit", (e) => {
- e.preventDefault();
+ document.querySelector('#intent-form')?.addEventListener('submit', (e) => {
+ e.preventDefault()
getCurrentDeepLinkUrls()
.then((res) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const updateIntentEl = document.querySelector("#update-intent")!;
- updateIntentEl.textContent = res ? JSON.stringify(res) : "none";
+ const updateIntentEl = document.querySelector('#update-intent')!
+ updateIntentEl.textContent = res ? JSON.stringify(res) : 'none'
})
- .catch(console.error);
- });
+ .catch(console.error)
+ })
getCurrentDeepLinkUrls()
.then((res) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const initialIntentEl = document.querySelector("#initial-intent")!;
- initialIntentEl.textContent = res ? JSON.stringify(res) : "none";
+ const initialIntentEl = document.querySelector('#initial-intent')!
+ initialIntentEl.textContent = res ? JSON.stringify(res) : 'none'
})
- .catch(console.error);
-});
+ .catch(console.error)
+})
diff --git a/plugins/deep-link/examples/app/vite.config.ts b/plugins/deep-link/examples/app/vite.config.ts
index 82cc0885..b54dc99a 100644
--- a/plugins/deep-link/examples/app/vite.config.ts
+++ b/plugins/deep-link/examples/app/vite.config.ts
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { defineConfig } from "vite";
+import { defineConfig } from 'vite'
-const host = process.env.TAURI_DEV_HOST;
+const host = process.env.TAURI_DEV_HOST
// https://vitejs.dev/config/
export default defineConfig({
@@ -17,22 +17,22 @@ export default defineConfig({
port: 1420,
hmr: host
? {
- protocol: "ws",
+ protocol: 'ws',
host,
- port: 1421,
+ port: 1421
}
: undefined,
- strictPort: true,
+ strictPort: true
},
// to make use of `TAURI_DEBUG` and other env variables
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
- envPrefix: ["VITE_", "TAURI_"],
+ envPrefix: ['VITE_', 'TAURI_'],
build: {
// Tauri supports es2021
- target: process.env.TAURI_PLATFORM == "windows" ? "chrome105" : "safari13",
+ target: process.env.TAURI_PLATFORM == 'windows' ? 'chrome105' : 'safari13',
// don't minify for debug builds
- minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
+ minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
// produce sourcemaps for debug builds
- sourcemap: !!process.env.TAURI_DEBUG,
- },
-});
+ sourcemap: !!process.env.TAURI_DEBUG
+ }
+})
diff --git a/plugins/deep-link/guest-js/index.ts b/plugins/deep-link/guest-js/index.ts
index 8e78a66e..461bec8a 100644
--- a/plugins/deep-link/guest-js/index.ts
+++ b/plugins/deep-link/guest-js/index.ts
@@ -2,8 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { invoke } from "@tauri-apps/api/core";
-import { type UnlistenFn, listen } from "@tauri-apps/api/event";
+import { invoke } from '@tauri-apps/api/core'
+import { type UnlistenFn, listen } from '@tauri-apps/api/event'
/**
* Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link.
@@ -14,12 +14,14 @@ import { type UnlistenFn, listen } from "@tauri-apps/api/event";
* const urls = await getCurrent();
* ```
*
- * #### - **Windows / Linux**: Unsupported.
+ * #### - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
+ * Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
+ * Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect..
*
* @since 2.0.0
*/
export async function getCurrent(): Promise {
- return await invoke("plugin:deep-link|get_current");
+ return await invoke('plugin:deep-link|get_current')
}
/**
@@ -38,7 +40,7 @@ export async function getCurrent(): Promise {
* @since 2.0.0
*/
export async function register(protocol: string): Promise {
- return await invoke("plugin:deep-link|register", { protocol });
+ return await invoke('plugin:deep-link|register', { protocol })
}
/**
@@ -57,7 +59,7 @@ export async function register(protocol: string): Promise {
* @since 2.0.0
*/
export async function unregister(protocol: string): Promise {
- return await invoke("plugin:deep-link|unregister", { protocol });
+ return await invoke('plugin:deep-link|unregister', { protocol })
}
/**
@@ -71,12 +73,12 @@ export async function unregister(protocol: string): Promise {
* await isRegistered("my-scheme");
* ```
*
- * #### - **macOS / Android / iOS**: Unsupported, always returns `true`.
+ * #### - **macOS / Android / iOS**: Unsupported.
*
* @since 2.0.0
*/
export async function isRegistered(protocol: string): Promise {
- return await invoke("plugin:deep-link|is_registered", { protocol });
+ return await invoke('plugin:deep-link|is_registered', { protocol })
}
/**
@@ -90,19 +92,14 @@ export async function isRegistered(protocol: string): Promise {
* await onOpenUrl((urls) => { console.log(urls) });
* ```
*
- * #### - **Windows / Linux**: Unsupported, the OS will spawn a new app instance passing the URL as a CLI argument.
+ * #### - **Windows / Linux**: Unsupported without the single-instance plugin. The OS will spawn a new app instance passing the URL as a CLI argument.
*
* @since 2.0.0
*/
export async function onOpenUrl(
- handler: (urls: string[]) => void,
+ handler: (urls: string[]) => void
): Promise {
- const current = await getCurrent();
- if (current) {
- handler(current);
- }
-
- return await listen("deep-link://new-url", (event) => {
- handler(event.payload);
- });
+ return await listen('deep-link://new-url', (event) => {
+ handler(event.payload)
+ })
}
diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json
index 8b30276e..0b05dd86 100644
--- a/plugins/deep-link/package.json
+++ b/plugins/deep-link/package.json
@@ -1,8 +1,8 @@
{
"name": "@tauri-apps/plugin-deep-link",
- "version": "2.0.0-rc.0",
+ "version": "2.2.0",
"description": "Set your Tauri application as the default handler for an URL",
- "license": "MIT or APACHE-2.0",
+ "license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
- "@tauri-apps/api": "^2.0.0-rc.1"
+ "@tauri-apps/api": "^2.0.0"
}
}
diff --git a/plugins/deep-link/permissions/autogenerated/reference.md b/plugins/deep-link/permissions/autogenerated/reference.md
index 460960c8..3b84f1c5 100644
--- a/plugins/deep-link/permissions/autogenerated/reference.md
+++ b/plugins/deep-link/permissions/autogenerated/reference.md
@@ -4,7 +4,7 @@ Allows reading the opened deep link via the get_current command
- `allow-get-current`
-## Permission Table
+## Permission Table
diff --git a/plugins/deep-link/permissions/schemas/schema.json b/plugins/deep-link/permissions/schemas/schema.json
index 32a07945..7d887dc2 100644
--- a/plugins/deep-link/permissions/schemas/schema.json
+++ b/plugins/deep-link/permissions/schemas/schema.json
@@ -295,67 +295,49 @@
"type": "string",
"oneOf": [
{
- "description": "allow-get-current -> Enables the get_current command without any pre-configured scope.",
+ "description": "Enables the get_current command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-get-current"
- ]
+ "const": "allow-get-current"
},
{
- "description": "deny-get-current -> Denies the get_current command without any pre-configured scope.",
+ "description": "Denies the get_current command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-get-current"
- ]
+ "const": "deny-get-current"
},
{
- "description": "allow-is-registered -> Enables the is_registered command without any pre-configured scope.",
+ "description": "Enables the is_registered command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-is-registered"
- ]
+ "const": "allow-is-registered"
},
{
- "description": "deny-is-registered -> Denies the is_registered command without any pre-configured scope.",
+ "description": "Denies the is_registered command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-is-registered"
- ]
+ "const": "deny-is-registered"
},
{
- "description": "allow-register -> Enables the register command without any pre-configured scope.",
+ "description": "Enables the register command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-register"
- ]
+ "const": "allow-register"
},
{
- "description": "deny-register -> Denies the register command without any pre-configured scope.",
+ "description": "Denies the register command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-register"
- ]
+ "const": "deny-register"
},
{
- "description": "allow-unregister -> Enables the unregister command without any pre-configured scope.",
+ "description": "Enables the unregister command without any pre-configured scope.",
"type": "string",
- "enum": [
- "allow-unregister"
- ]
+ "const": "allow-unregister"
},
{
- "description": "deny-unregister -> Denies the unregister command without any pre-configured scope.",
+ "description": "Denies the unregister command without any pre-configured scope.",
"type": "string",
- "enum": [
- "deny-unregister"
- ]
+ "const": "deny-unregister"
},
{
- "description": "default -> Allows reading the opened deep link via the get_current command",
+ "description": "Allows reading the opened deep link via the get_current command",
"type": "string",
- "enum": [
- "default"
- ]
+ "const": "default"
}
]
}
diff --git a/plugins/deep-link/rollup.config.js b/plugins/deep-link/rollup.config.js
index 977dfac8..1f349ec8 100644
--- a/plugins/deep-link/rollup.config.js
+++ b/plugins/deep-link/rollup.config.js
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-import { createConfig } from "../../shared/rollup.config.js";
+import { createConfig } from '../../shared/rollup.config.js'
-export default createConfig();
+export default createConfig()
diff --git a/plugins/deep-link/src/config.rs b/plugins/deep-link/src/config.rs
index 1796aa63..d7bad5b4 100644
--- a/plugins/deep-link/src/config.rs
+++ b/plugins/deep-link/src/config.rs
@@ -7,7 +7,7 @@
use serde::{Deserialize, Deserializer};
use tauri_utils::config::DeepLinkProtocol;
-#[derive(Deserialize)]
+#[derive(Deserialize, Clone)]
pub struct AssociatedDomain {
#[serde(deserialize_with = "deserialize_associated_host")]
pub host: String,
@@ -29,20 +29,51 @@ where
}
}
-#[derive(Deserialize)]
+#[derive(Deserialize, Clone)]
pub struct Config {
/// Mobile requires `https://` urls.
+ #[serde(default)]
pub mobile: Vec,
/// Desktop requires urls starting with `://`.
/// These urls are also active in dev mode on Android.
#[allow(unused)] // Used in tauri-bundler
+ #[serde(default)]
pub desktop: DesktopProtocol,
}
-#[derive(Deserialize)]
+#[derive(Deserialize, Clone)]
#[serde(untagged)]
#[allow(unused)] // Used in tauri-bundler
pub enum DesktopProtocol {
One(DeepLinkProtocol),
List(Vec),
}
+
+impl Default for DesktopProtocol {
+ fn default() -> Self {
+ Self::List(Vec::new())
+ }
+}
+
+impl DesktopProtocol {
+ #[allow(dead_code)]
+ pub fn contains_scheme(&self, scheme: &String) -> bool {
+ match self {
+ Self::One(protocol) => protocol.schemes.contains(scheme),
+ Self::List(protocols) => protocols
+ .iter()
+ .any(|protocol| protocol.schemes.contains(scheme)),
+ }
+ }
+
+ #[allow(dead_code)]
+ pub fn schemes(&self) -> Vec {
+ match self {
+ Self::One(protocol) => protocol.schemes.clone(),
+ Self::List(protocols) => protocols
+ .iter()
+ .flat_map(|protocol| protocol.schemes.clone())
+ .collect(),
+ }
+ }
+}
diff --git a/plugins/deep-link/src/lib.rs b/plugins/deep-link/src/lib.rs
index 52e37cd1..c259e6b2 100644
--- a/plugins/deep-link/src/lib.rs
+++ b/plugins/deep-link/src/lib.rs
@@ -2,10 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
-use serde::de::DeserializeOwned;
use tauri::{
plugin::{Builder, PluginApi, TauriPlugin},
- AppHandle, Manager, Runtime,
+ AppHandle, EventId, Listener, Manager, Runtime,
};
mod commands;
@@ -17,12 +16,14 @@ pub use error::{Error, Result};
#[cfg(target_os = "android")]
const PLUGIN_IDENTIFIER: &str = "app.tauri.deep_link";
-fn init_deep_link(
+fn init_deep_link(
app: &AppHandle,
- _api: PluginApi,
+ api: PluginApi>,
) -> crate::Result> {
#[cfg(target_os = "android")]
{
+ let _api = api;
+
use tauri::{
ipc::{Channel, InvokeResponseBody},
Emitter,
@@ -56,22 +57,38 @@ fn init_deep_link(
},
)?;
- return Ok(DeepLink(handle));
+ return Ok(DeepLink {
+ app: app.clone(),
+ plugin_handle: handle,
+ });
}
- #[cfg(not(target_os = "android"))]
- Ok(DeepLink {
+ #[cfg(target_os = "ios")]
+ return Ok(DeepLink {
app: app.clone(),
current: Default::default(),
- })
+ config: api.config().clone(),
+ });
+
+ #[cfg(desktop)]
+ {
+ let args = std::env::args();
+ let deep_link = DeepLink {
+ app: app.clone(),
+ current: Default::default(),
+ config: api.config().clone(),
+ };
+ deep_link.handle_cli_arguments(args);
+
+ Ok(deep_link)
+ }
}
#[cfg(target_os = "android")]
mod imp {
- use tauri::{plugin::PluginHandle, Runtime};
+ use tauri::{ipc::Channel, plugin::PluginHandle, AppHandle, Runtime};
use serde::{Deserialize, Serialize};
- use tauri::ipc::Channel;
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
@@ -86,16 +103,21 @@ mod imp {
}
/// Access to the deep-link APIs.
- pub struct DeepLink(pub(crate) PluginHandle);
+ pub struct DeepLink {
+ pub(crate) app: AppHandle,
+ pub(crate) plugin_handle: PluginHandle,
+ }
impl DeepLink {
/// Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link.
///
/// ## Platform-specific:
///
- /// - **Windows / Linux**: Unsupported, will return [`Error::UnsupportedPlatform`](`crate::Error::UnsupportedPlatform`).
+ /// - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
+ /// Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
+ /// Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect.
pub fn get_current(&self) -> crate::Result