diff --git a/.changes/config.json b/.changes/config.json
index 81a6f4ab..844eaa99 100644
--- a/.changes/config.json
+++ b/.changes/config.json
@@ -68,6 +68,7 @@
"os",
"process",
"shell",
+ "store",
"updater"
]
},
@@ -90,6 +91,7 @@
"os-js",
"process-js",
"shell-js",
+ "store-js",
"updater-js"
],
"postversion": "pnpm install --no-frozen-lockfile"
diff --git a/.changes/dialog-file-response-non-exhaustive.md b/.changes/dialog-file-response-non-exhaustive.md
new file mode 100644
index 00000000..f8d45d80
--- /dev/null
+++ b/.changes/dialog-file-response-non-exhaustive.md
@@ -0,0 +1,5 @@
+---
+"dialog": "patch"
+---
+
+Mark `FileResponse` as `non_exhaustive`.
diff --git a/.changes/dialog-return-path.md b/.changes/dialog-return-path.md
new file mode 100644
index 00000000..2bd7b4db
--- /dev/null
+++ b/.changes/dialog-return-path.md
@@ -0,0 +1,7 @@
+---
+"dialog": patch
+"dialog-js": patch
+---
+
+The `open` function now returns a string representing either the file path or URI instead of an object.
+To read the file data, use the `fs` APIs.
diff --git a/.changes/fs-scope-recursive-allow-read-dir.md b/.changes/fs-scope-recursive-allow-read-dir.md
new file mode 100644
index 00000000..5fdd210a
--- /dev/null
+++ b/.changes/fs-scope-recursive-allow-read-dir.md
@@ -0,0 +1,5 @@
+---
+"fs": patch:enhance
+---
+
+The `scope-*-recursive` permissions now also allow reading the contents of the directory.
diff --git a/.changes/global-shortcut-0.6.md b/.changes/global-shortcut-0.6.md
new file mode 100644
index 00000000..c65d9e1a
--- /dev/null
+++ b/.changes/global-shortcut-0.6.md
@@ -0,0 +1,5 @@
+---
+"global-shortcut": "patch"
+---
+
+Updated `global-hotkey` crate dependency to `0.6`
diff --git a/.changes/pre.json b/.changes/pre.json
index d9dd082a..24bbb4db 100644
--- a/.changes/pre.json
+++ b/.changes/pre.json
@@ -11,6 +11,7 @@
".changes/remove-target-sdk.md",
".changes/shell-open-regex-match-string.md",
".changes/shell-regex-match-string.md",
+ ".changes/swift-build-older-versions.md",
".changes/update-fs-api-docs.md",
".changes/update-tauri-rc-3.md"
]
diff --git a/.changes/resolve-content-uris.md b/.changes/resolve-content-uris.md
new file mode 100644
index 00000000..781eff70
--- /dev/null
+++ b/.changes/resolve-content-uris.md
@@ -0,0 +1,5 @@
+---
+"fs": patch:feat
+---
+
+Resolve `content://` path URIs on Android.
diff --git a/.changes/single-instance-windows-sys.0.59.md b/.changes/single-instance-windows-sys.0.59.md
new file mode 100644
index 00000000..7f7af001
--- /dev/null
+++ b/.changes/single-instance-windows-sys.0.59.md
@@ -0,0 +1,5 @@
+---
+"single-instance": "patch"
+---
+
+Updated `windows-sys` crate to `0.59`
diff --git a/.changes/store-remove-mobile-plugin.md b/.changes/store-remove-mobile-plugin.md
new file mode 100644
index 00000000..64baadec
--- /dev/null
+++ b/.changes/store-remove-mobile-plugin.md
@@ -0,0 +1,5 @@
+---
+"store": patch:breaking
+---
+
+Implement mobile support in Rust directly. This changes the store directories, invalidating all previously generated stores.
diff --git a/.changes/swift-build-older-versions.md b/.changes/swift-build-older-versions.md
new file mode 100644
index 00000000..41666a91
--- /dev/null
+++ b/.changes/swift-build-older-versions.md
@@ -0,0 +1,15 @@
+---
+"barcode-scanner": patch
+"biometric": patch
+"clipboard-manager": patch
+"dialog": patch
+"geolocation": patch
+"haptics": patch
+"log-plugin": patch
+"nfc": patch
+"notification": patch
+"shell": patch
+"store": patch
+---
+
+Explicitly set a minimum macOS version for the Swift package.
diff --git a/Cargo.lock b/Cargo.lock
index fdcb35b7..99c7da52 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -206,7 +206,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "api"
-version = "2.0.0-rc.0"
+version = "2.0.0-rc.1"
dependencies = [
"log",
"serde",
@@ -227,6 +227,7 @@ dependencies = [
"tauri-plugin-os",
"tauri-plugin-process",
"tauri-plugin-shell",
+ "tauri-plugin-store",
"tauri-plugin-updater",
"tiny_http",
"window-shadows",
@@ -2565,19 +2566,19 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "global-hotkey"
-version = "0.5.5"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b436093d1598b05e3b7fddc097b2bad32763f53a1beb25ab6f9718c6a60acd09"
+checksum = "298a7667d6011efe6b35673c6b29001b88677ae1b3d6b2feccfbff4b44892866"
dependencies = [
"bitflags 2.6.0",
- "cocoa 0.25.0",
+ "cocoa 0.26.0",
"crossbeam-channel",
"keyboard-types",
"objc",
"once_cell",
"serde",
"thiserror",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
"x11-dl",
]
@@ -2865,13 +2866,13 @@ dependencies = [
"http",
"hyper",
"hyper-util",
- "rustls 0.23.12",
+ "rustls",
"rustls-native-certs",
"rustls-pki-types",
"tokio",
"tokio-rustls",
"tower-service",
- "webpki-roots 0.26.3",
+ "webpki-roots",
]
[[package]]
@@ -3440,9 +3441,9 @@ dependencies = [
[[package]]
name = "libsqlite3-sys"
-version = "0.28.0"
+version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
+checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
dependencies = [
"cc",
"pkg-config",
@@ -4713,7 +4714,7 @@ dependencies = [
"quinn-proto",
"quinn-udp",
"rustc-hash",
- "rustls 0.23.12",
+ "rustls",
"socket2",
"thiserror",
"tokio",
@@ -4730,7 +4731,7 @@ dependencies = [
"rand 0.8.5",
"ring",
"rustc-hash",
- "rustls 0.23.12",
+ "rustls",
"slab",
"thiserror",
"tinyvec",
@@ -5004,9 +5005,9 @@ dependencies = [
"percent-encoding",
"pin-project-lite",
"quinn",
- "rustls 0.23.12",
+ "rustls",
"rustls-native-certs",
- "rustls-pemfile 2.1.3",
+ "rustls-pemfile",
"rustls-pki-types",
"serde",
"serde_json",
@@ -5024,7 +5025,7 @@ dependencies = [
"wasm-bindgen-futures",
"wasm-streams",
"web-sys",
- "webpki-roots 0.26.3",
+ "webpki-roots",
"winreg 0.52.0",
]
@@ -5222,17 +5223,6 @@ dependencies = [
"windows-sys 0.52.0",
]
-[[package]]
-name = "rustls"
-version = "0.21.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
-dependencies = [
- "ring",
- "rustls-webpki 0.101.7",
- "sct",
-]
-
[[package]]
name = "rustls"
version = "0.23.12"
@@ -5242,7 +5232,7 @@ dependencies = [
"once_cell",
"ring",
"rustls-pki-types",
- "rustls-webpki 0.102.6",
+ "rustls-webpki",
"subtle",
"zeroize",
]
@@ -5254,21 +5244,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba"
dependencies = [
"openssl-probe",
- "rustls-pemfile 2.1.3",
+ "rustls-pemfile",
"rustls-pki-types",
"schannel",
"security-framework",
]
-[[package]]
-name = "rustls-pemfile"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
-dependencies = [
- "base64 0.21.7",
-]
-
[[package]]
name = "rustls-pemfile"
version = "2.1.3"
@@ -5285,16 +5266,6 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0"
-[[package]]
-name = "rustls-webpki"
-version = "0.101.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
-dependencies = [
- "ring",
- "untrusted",
-]
-
[[package]]
name = "rustls-webpki"
version = "0.102.6"
@@ -5406,16 +5377,6 @@ dependencies = [
"sha2",
]
-[[package]]
-name = "sct"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
-dependencies = [
- "ring",
- "untrusted",
-]
-
[[package]]
name = "seahash"
version = "4.1.0"
@@ -5863,9 +5824,9 @@ dependencies = [
[[package]]
name = "sqlx"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27144619c6e5802f1380337a209d2ac1c431002dd74c6e60aebff3c506dc4f0c"
+checksum = "fcfa89bea9500db4a0d038513d7a060566bfc51d46d1c014847049a45cce85e8"
dependencies = [
"sqlx-core",
"sqlx-macros",
@@ -5876,9 +5837,9 @@ dependencies = [
[[package]]
name = "sqlx-core"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a999083c1af5b5d6c071d34a708a19ba3e02106ad82ef7bbd69f5e48266b613b"
+checksum = "d06e2f2bd861719b1f3f0c7dbe1d80c30bf59e76cf019f07d9014ed7eefb8e08"
dependencies = [
"atoi",
"byteorder",
@@ -5901,8 +5862,8 @@ dependencies = [
"once_cell",
"paste",
"percent-encoding",
- "rustls 0.21.12",
- "rustls-pemfile 1.0.4",
+ "rustls",
+ "rustls-pemfile",
"serde",
"serde_json",
"sha2",
@@ -5914,14 +5875,14 @@ dependencies = [
"tokio-stream",
"tracing",
"url",
- "webpki-roots 0.25.4",
+ "webpki-roots",
]
[[package]]
name = "sqlx-macros"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a23217eb7d86c584b8cbe0337b9eacf12ab76fe7673c513141ec42565698bb88"
+checksum = "2f998a9defdbd48ed005a89362bd40dd2117502f15294f61c8d47034107dbbdc"
dependencies = [
"proc-macro2",
"quote",
@@ -5932,9 +5893,9 @@ dependencies = [
[[package]]
name = "sqlx-macros-core"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a099220ae541c5db479c6424bdf1b200987934033c2584f79a0e1693601e776"
+checksum = "3d100558134176a2629d46cec0c8891ba0be8910f7896abfdb75ef4ab6f4e7ce"
dependencies = [
"dotenvy",
"either",
@@ -5958,9 +5919,9 @@ dependencies = [
[[package]]
name = "sqlx-mysql"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5afe4c38a9b417b6a9a5eeffe7235d0a106716495536e7727d1c7f4b1ff3eba6"
+checksum = "936cac0ab331b14cb3921c62156d913e4c15b74fb6ec0f3146bd4ef6e4fb3c12"
dependencies = [
"atoi",
"base64 0.22.1",
@@ -6001,9 +5962,9 @@ dependencies = [
[[package]]
name = "sqlx-postgres"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1dbb157e65f10dbe01f729339c06d239120221c9ad9fa0ba8408c4cc18ecf21"
+checksum = "9734dbce698c67ecf67c442f768a5e90a49b2a4d61a9f1d59f73874bd4cf0710"
dependencies = [
"atoi",
"base64 0.22.1",
@@ -6040,9 +6001,9 @@ dependencies = [
[[package]]
name = "sqlx-sqlite"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b2cdd83c008a622d94499c0006d8ee5f821f36c89b7d625c900e5dc30b5c5ee"
+checksum = "a75b419c3c1b1697833dd927bdc4c6545a620bc1bbafabd44e1efbe9afcd337e"
dependencies = [
"atoi",
"flume",
@@ -6359,9 +6320,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tauri"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79776954e2cd6b6c3b56e2cd99905a3a166017495a39ac8eb4c85dd8ea8704b4"
+checksum = "7d386b956b09cf88301912453829269f3914b3c813020d429ed8110c75e9dded"
dependencies = [
"anyhow",
"bytes",
@@ -6412,9 +6373,9 @@ dependencies = [
[[package]]
name = "tauri-build"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fc103bde77870e08d5fc8765615b9615997827550b626fbc4ebbd7a1fbfe2a2"
+checksum = "1e79aafbbfc8262d7937675cb44c397e975ab8e0cd722db1c37de694fd443570"
dependencies = [
"anyhow",
"cargo_toml",
@@ -6436,9 +6397,9 @@ dependencies = [
[[package]]
name = "tauri-codegen"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea061e6be9b37ab455eadc189f45617deafc85c94f78f9cd584862a6deaa83d1"
+checksum = "5ce4e521130c5d7b377ddfdc43310ece626b67ec07ae74174407ad7e6cd17d20"
dependencies = [
"base64 0.22.1",
"brotli",
@@ -6463,9 +6424,9 @@ dependencies = [
[[package]]
name = "tauri-macros"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e20d6f6f96f55a43339c465b3c8205d71940372d54d7c665c5329e8e4ba35d0"
+checksum = "a5995206394cd30411fc5c8ae195e498357f63e11ed960ea32b53512dcb2a5a5"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -6477,9 +6438,9 @@ dependencies = [
[[package]]
name = "tauri-plugin"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec01af01098a286d3e430c1fa947bfd77bc8011ecb209438af4444b02d82b29e"
+checksum = "0ebbdbf4e6d7328e0c0f2427b4f56d792ee1ae84ab4fb0286b81a2e408836046"
dependencies = [
"anyhow",
"glob",
@@ -6530,7 +6491,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-barcode-scanner"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"log",
"serde",
@@ -6542,7 +6503,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-biometric"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"log",
"serde",
@@ -6568,7 +6529,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-clipboard-manager"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"arboard",
"image 0.24.9",
@@ -6600,7 +6561,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-dialog"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"dunce",
"log",
@@ -6612,6 +6573,7 @@ dependencies = [
"tauri-plugin",
"tauri-plugin-fs",
"thiserror",
+ "url",
]
[[package]]
@@ -6635,7 +6597,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-geolocation"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"log",
"serde",
@@ -6661,7 +6623,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-haptics"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"log",
"serde",
@@ -6707,7 +6669,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-log"
-version = "2.0.0-rc.0"
+version = "2.0.0-rc.1"
dependencies = [
"android_logger",
"byte-unit",
@@ -6727,7 +6689,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-nfc"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"log",
"serde",
@@ -6740,7 +6702,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-notification"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"color-backtrace",
"ctor",
@@ -6813,7 +6775,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-shell"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"encoding_rs",
"log",
@@ -6840,7 +6802,7 @@ dependencies = [
"serde_json",
"tauri",
"thiserror",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
"zbus",
]
@@ -6863,7 +6825,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-store"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
dependencies = [
"dunce",
"log",
@@ -6971,9 +6933,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4e736d3293f8347e5d2c5b250fe0e5b873499f5483578b139445dbbf802e2e5"
+checksum = "6e49398fb1d7736e41099aa7efaf45d599e480a36b3e7f88977b547b662d7253"
dependencies = [
"dpi",
"gtk",
@@ -6990,9 +6952,9 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fead81c1bd0205d5f02580e64f522704618274e784c2d1c127e4ba19acd0b79"
+checksum = "8b2ce1dca90243bd4a77a1020847688590e1ded2f6d190d5a96877b0039f0500"
dependencies = [
"cocoa 0.26.0",
"gtk",
@@ -7014,9 +6976,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
-version = "2.0.0-rc.3"
+version = "2.0.0-rc.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "285af18e09665ea15fdda04cb28fb579a4d71b4e1640628489fecca98838ca9a"
+checksum = "2d702b62eed4cf89034926cb1834e2d13a7d745ea08a457fd336f94cde48f2fb"
dependencies = [
"aes-gcm",
"brotli",
@@ -7265,7 +7227,7 @@ version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
dependencies = [
- "rustls 0.23.12",
+ "rustls",
"rustls-pki-types",
"tokio",
]
@@ -7302,14 +7264,14 @@ dependencies = [
"futures-util",
"log",
"native-tls",
- "rustls 0.23.12",
+ "rustls",
"rustls-native-certs",
"rustls-pki-types",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tungstenite",
- "webpki-roots 0.26.3",
+ "webpki-roots",
]
[[package]]
@@ -7520,7 +7482,7 @@ dependencies = [
"log",
"native-tls",
"rand 0.8.5",
- "rustls 0.23.12",
+ "rustls",
"rustls-pki-types",
"sha1",
"thiserror",
@@ -7962,12 +7924,6 @@ dependencies = [
"system-deps",
]
-[[package]]
-name = "webpki-roots"
-version = "0.25.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1"
-
[[package]]
name = "webpki-roots"
version = "0.26.3"
diff --git a/Cargo.toml b/Cargo.toml
index e24823f7..5ba3f825 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,10 +11,10 @@ resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
-tauri = { version = "2.0.0-rc.3", default-features = false }
-tauri-build = "2.0.0-rc.3"
-tauri-plugin = "2.0.0-rc.3"
-tauri-utils = "2.0.0-rc.3"
+tauri = { version = "2.0.0-rc.5", default-features = false }
+tauri-build = "2.0.0-rc.5"
+tauri-plugin = "2.0.0-rc.5"
+tauri-utils = "2.0.0-rc.5"
serde_json = "1"
thiserror = "1"
url = "2"
diff --git a/examples/api/package.json b/examples/api/package.json
index 6c4d1d4a..51083ba2 100644
--- a/examples/api/package.json
+++ b/examples/api/package.json
@@ -23,6 +23,7 @@
"@tauri-apps/plugin-os": "2.0.0-rc.0",
"@tauri-apps/plugin-process": "2.0.0-rc.0",
"@tauri-apps/plugin-shell": "2.0.0-rc.0",
+ "@tauri-apps/plugin-store": "2.0.0-rc.0",
"@tauri-apps/plugin-updater": "2.0.0-rc.0",
"@zerodevx/svelte-json-view": "1.0.9"
},
@@ -30,7 +31,7 @@
"@iconify-json/codicon": "^1.1.37",
"@iconify-json/ph": "^1.1.8",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
- "@tauri-apps/cli": "2.0.0-rc.4",
+ "@tauri-apps/cli": "2.0.0-rc.6",
"@unocss/extractor-svelte": "^0.62.0",
"svelte": "^4.2.8",
"unocss": "^0.62.0",
diff --git a/examples/api/src-tauri/CHANGELOG.md b/examples/api/src-tauri/CHANGELOG.md
index 994c48cf..e64b6fba 100644
--- a/examples/api/src-tauri/CHANGELOG.md
+++ b/examples/api/src-tauri/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## \[2.0.0-rc.1]
+
+### Dependencies
+
+- Upgraded to `barcode-scanner@2.0.0-rc.2`
+- Upgraded to `biometric@2.0.0-rc.2`
+- Upgraded to `clipboard-manager@2.0.0-rc.2`
+- Upgraded to `dialog@2.0.0-rc.2`
+- Upgraded to `log-plugin@2.0.0-rc.1`
+- Upgraded to `nfc@2.0.0-rc.2`
+- Upgraded to `notification@2.0.0-rc.2`
+- Upgraded to `shell@2.0.0-rc.2`
+
## \[2.0.0-rc.0]
### Dependencies
diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml
index 43641127..8a9eaa98 100644
--- a/examples/api/src-tauri/Cargo.toml
+++ b/examples/api/src-tauri/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "api"
publish = false
-version = "2.0.0-rc.0"
+version = "2.0.0-rc.1"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = { workspace = true }
@@ -19,21 +19,22 @@ serde_json = { workspace = true }
serde = { workspace = true }
tiny_http = "0.12"
log = { workspace = true }
-tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.0" }
+tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.1" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.0", features = [
"watch",
] }
-tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.1" }
-tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.1" }
+tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.2" }
+tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.2" }
tauri-plugin-http = { path = "../../../plugins/http", features = [
"multipart",
], version = "2.0.0-rc.0" }
-tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.1", features = [
+tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.2", features = [
"windows7-compat",
] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.0" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-rc.0" }
-tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.1" }
+tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.2" }
+tauri-plugin-store = { path = "../../../plugins/store", version = "2.0.0-rc.2" }
[dependencies.tauri]
workspace = true
@@ -54,9 +55,9 @@ tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", vers
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.1" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
-tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.1" }
-tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.1" }
-tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.1" }
+tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.2" }
+tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.2" }
+tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.2" }
[target."cfg(target_os = \"windows\")".dependencies]
window-shadows = "0.2"
diff --git a/examples/api/src-tauri/capabilities/base.json b/examples/api/src-tauri/capabilities/base.json
index da21da28..b76e898c 100644
--- a/examples/api/src-tauri/capabilities/base.json
+++ b/examples/api/src-tauri/capabilities/base.json
@@ -61,6 +61,9 @@
"clipboard-manager:allow-write-text",
"clipboard-manager:allow-read-image",
"clipboard-manager:allow-write-image",
+ "fs:allow-open",
+ "fs:allow-write",
+ "fs:allow-read",
"fs:allow-rename",
"fs:allow-mkdir",
"fs:allow-remove",
@@ -75,6 +78,11 @@
}
],
"deny": ["$APPDATA/db/*.stronghold"]
- }
+ },
+ "store:allow-entries",
+ "store:allow-get",
+ "store:allow-set",
+ "store:allow-save",
+ "store:allow-load"
]
}
diff --git a/examples/api/src-tauri/gen/android/.idea/gradle.xml b/examples/api/src-tauri/gen/android/.idea/gradle.xml
index 83b872db..120d2e91 100644
--- a/examples/api/src-tauri/gen/android/.idea/gradle.xml
+++ b/examples/api/src-tauri/gen/android/.idea/gradle.xml
@@ -27,6 +27,7 @@
+
diff --git a/examples/api/src-tauri/gen/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json
index fd3e2e34..ae911020 100644
--- a/examples/api/src-tauri/gen/schemas/desktop-schema.json
+++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json
@@ -7265,6 +7265,181 @@
"shell:deny-stdin-write"
]
},
+ {
+ "description": "store:default -> This permission set configures what kind of\noperations are available from the store plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n",
+ "type": "string",
+ "enum": [
+ "store:default"
+ ]
+ },
+ {
+ "description": "store:allow-clear -> Enables the clear command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-clear"
+ ]
+ },
+ {
+ "description": "store:allow-delete -> Enables the delete command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-delete"
+ ]
+ },
+ {
+ "description": "store:allow-entries -> Enables the entries command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-entries"
+ ]
+ },
+ {
+ "description": "store:allow-get -> Enables the get command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-get"
+ ]
+ },
+ {
+ "description": "store:allow-has -> Enables the has command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-has"
+ ]
+ },
+ {
+ "description": "store:allow-keys -> Enables the keys command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-keys"
+ ]
+ },
+ {
+ "description": "store:allow-length -> Enables the length command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-length"
+ ]
+ },
+ {
+ "description": "store:allow-load -> Enables the load command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-load"
+ ]
+ },
+ {
+ "description": "store:allow-reset -> Enables the reset command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-reset"
+ ]
+ },
+ {
+ "description": "store:allow-save -> Enables the save command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-save"
+ ]
+ },
+ {
+ "description": "store:allow-set -> Enables the set command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-set"
+ ]
+ },
+ {
+ "description": "store:allow-values -> Enables the values command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-values"
+ ]
+ },
+ {
+ "description": "store:deny-clear -> Denies the clear command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-clear"
+ ]
+ },
+ {
+ "description": "store:deny-delete -> Denies the delete command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-delete"
+ ]
+ },
+ {
+ "description": "store:deny-entries -> Denies the entries command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-entries"
+ ]
+ },
+ {
+ "description": "store:deny-get -> Denies the get command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-get"
+ ]
+ },
+ {
+ "description": "store:deny-has -> Denies the has command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-has"
+ ]
+ },
+ {
+ "description": "store:deny-keys -> Denies the keys command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-keys"
+ ]
+ },
+ {
+ "description": "store:deny-length -> Denies the length command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-length"
+ ]
+ },
+ {
+ "description": "store:deny-load -> Denies the load command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-load"
+ ]
+ },
+ {
+ "description": "store:deny-reset -> Denies the reset command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-reset"
+ ]
+ },
+ {
+ "description": "store:deny-save -> Denies the save command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-save"
+ ]
+ },
+ {
+ "description": "store:deny-set -> Denies the set command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-set"
+ ]
+ },
+ {
+ "description": "store:deny-values -> Denies the values command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-values"
+ ]
+ },
{
"description": "updater:default -> This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n",
"type": "string",
diff --git a/examples/api/src-tauri/gen/schemas/mobile-schema.json b/examples/api/src-tauri/gen/schemas/mobile-schema.json
index ba399e4d..1cce6dd1 100644
--- a/examples/api/src-tauri/gen/schemas/mobile-schema.json
+++ b/examples/api/src-tauri/gen/schemas/mobile-schema.json
@@ -7341,6 +7341,181 @@
"enum": [
"shell:deny-stdin-write"
]
+ },
+ {
+ "description": "store:default -> This permission set configures what kind of\noperations are available from the store plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n",
+ "type": "string",
+ "enum": [
+ "store:default"
+ ]
+ },
+ {
+ "description": "store:allow-clear -> Enables the clear command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-clear"
+ ]
+ },
+ {
+ "description": "store:allow-delete -> Enables the delete command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-delete"
+ ]
+ },
+ {
+ "description": "store:allow-entries -> Enables the entries command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-entries"
+ ]
+ },
+ {
+ "description": "store:allow-get -> Enables the get command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-get"
+ ]
+ },
+ {
+ "description": "store:allow-has -> Enables the has command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-has"
+ ]
+ },
+ {
+ "description": "store:allow-keys -> Enables the keys command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-keys"
+ ]
+ },
+ {
+ "description": "store:allow-length -> Enables the length command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-length"
+ ]
+ },
+ {
+ "description": "store:allow-load -> Enables the load command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-load"
+ ]
+ },
+ {
+ "description": "store:allow-reset -> Enables the reset command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-reset"
+ ]
+ },
+ {
+ "description": "store:allow-save -> Enables the save command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-save"
+ ]
+ },
+ {
+ "description": "store:allow-set -> Enables the set command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-set"
+ ]
+ },
+ {
+ "description": "store:allow-values -> Enables the values command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:allow-values"
+ ]
+ },
+ {
+ "description": "store:deny-clear -> Denies the clear command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-clear"
+ ]
+ },
+ {
+ "description": "store:deny-delete -> Denies the delete command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-delete"
+ ]
+ },
+ {
+ "description": "store:deny-entries -> Denies the entries command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-entries"
+ ]
+ },
+ {
+ "description": "store:deny-get -> Denies the get command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-get"
+ ]
+ },
+ {
+ "description": "store:deny-has -> Denies the has command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-has"
+ ]
+ },
+ {
+ "description": "store:deny-keys -> Denies the keys command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-keys"
+ ]
+ },
+ {
+ "description": "store:deny-length -> Denies the length command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-length"
+ ]
+ },
+ {
+ "description": "store:deny-load -> Denies the load command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-load"
+ ]
+ },
+ {
+ "description": "store:deny-reset -> Denies the reset command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-reset"
+ ]
+ },
+ {
+ "description": "store:deny-save -> Denies the save command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-save"
+ ]
+ },
+ {
+ "description": "store:deny-set -> Denies the set command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-set"
+ ]
+ },
+ {
+ "description": "store:deny-values -> Denies the values command without any pre-configured scope.",
+ "type": "string",
+ "enum": [
+ "store:deny-values"
+ ]
}
]
},
diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs
index 65c6ab68..429054eb 100644
--- a/examples/api/src-tauri/src/lib.rs
+++ b/examples/api/src-tauri/src/lib.rs
@@ -37,6 +37,7 @@ pub fn run() {
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_shell::init())
+ .plugin(tauri_plugin_store::Builder::default().build())
.setup(move |app| {
#[cfg(desktop)]
{
diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte
index 8ffcb104..a4b6334d 100644
--- a/examples/api/src/App.svelte
+++ b/examples/api/src/App.svelte
@@ -14,6 +14,7 @@
import Notifications from "./views/Notifications.svelte";
import Shortcuts from "./views/Shortcuts.svelte";
import Shell from "./views/Shell.svelte";
+ import Store from "./views/Store.svelte";
import Updater from "./views/Updater.svelte";
import Clipboard from "./views/Clipboard.svelte";
import WebRTC from "./views/WebRTC.svelte";
@@ -90,6 +91,11 @@
component: Shell,
icon: "i-codicon-terminal-bash",
},
+ {
+ label: "Store",
+ component: Store,
+ icon: "i-codicon-file-code",
+ },
!isMobile && {
label: "Updater",
component: Updater,
diff --git a/examples/api/src/views/Dialog.svelte b/examples/api/src/views/Dialog.svelte
index 3e594c90..462eecff 100644
--- a/examples/api/src/views/Dialog.svelte
+++ b/examples/api/src/views/Dialog.svelte
@@ -23,11 +23,7 @@
async function prompt() {
confirm("Do you want to do something?")
- .then((res) =>
- onMessage(
- res ? "Yes" : "No"
- )
- )
+ .then((res) => onMessage(res ? "Yes" : "No"))
.catch(onMessage);
}
@@ -67,14 +63,15 @@
if (Array.isArray(res)) {
onMessage(res);
} else {
- var pathToRead = typeof res === "string" ? res : res.path;
+ var pathToRead = res;
var isFile = pathToRead.match(/\S+\.\S+$/g);
readFile(pathToRead)
.then(function (response) {
if (isFile) {
if (
pathToRead.includes(".png") ||
- pathToRead.includes(".jpg")
+ pathToRead.includes(".jpg") ||
+ pathToRead.includes(".jpeg")
) {
arrayBufferToBase64(
new Uint8Array(response),
@@ -144,5 +141,7 @@
>Open save dialog
-
+
diff --git a/examples/api/src/views/Shell.svelte b/examples/api/src/views/Shell.svelte
index 5f5e2d25..faaa8c4c 100644
--- a/examples/api/src/views/Shell.svelte
+++ b/examples/api/src/views/Shell.svelte
@@ -59,7 +59,7 @@
}
function writeToStdin() {
- child.write(stdin).catch(onMessage);
+ child.write(`${stdin}\n`).catch(onMessage);
}
diff --git a/examples/api/src/views/Store.svelte b/examples/api/src/views/Store.svelte
new file mode 100644
index 00000000..d8e6653b
--- /dev/null
+++ b/examples/api/src/views/Store.svelte
@@ -0,0 +1,55 @@
+
+
+
+
+
+ Key:
+
+
+
+
+ Value:
+
+
+
+
+
+
+
+ {#each Object.entries(cache) as [k, v]}
+
{k} = {v}
+ {/each}
+
+
diff --git a/plugins/barcode-scanner/CHANGELOG.md b/plugins/barcode-scanner/CHANGELOG.md
index 93f831d4..f68c4669 100644
--- a/plugins/barcode-scanner/CHANGELOG.md
+++ b/plugins/barcode-scanner/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## \[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.
+
## \[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__`.
diff --git a/plugins/barcode-scanner/Cargo.toml b/plugins/barcode-scanner/Cargo.toml
index ced50ac4..369b3999 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.1"
+version = "2.0.0-rc.2"
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
edition = { workspace = true }
authors = { workspace = true }
diff --git a/plugins/barcode-scanner/ios/Package.swift b/plugins/barcode-scanner/ios/Package.swift
index aafb41c3..cf39b812 100644
--- a/plugins/barcode-scanner/ios/Package.swift
+++ b/plugins/barcode-scanner/ios/Package.swift
@@ -10,7 +10,8 @@ import PackageDescription
let package = Package(
name: "tauri-plugin-barcode-scanner",
platforms: [
- .iOS(.v13)
+ .macOS(.v10_13),
+ .iOS(.v13),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
diff --git a/plugins/biometric/CHANGELOG.md b/plugins/biometric/CHANGELOG.md
index aae1a90c..40756d7e 100644
--- a/plugins/biometric/CHANGELOG.md
+++ b/plugins/biometric/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## \[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.
+
## \[2.0.0-rc.1]
### changes
diff --git a/plugins/biometric/Cargo.toml b/plugins/biometric/Cargo.toml
index 42e25c6b..9a9aeaa9 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.1"
+version = "2.0.0-rc.2"
description = "Prompt the user for biometric authentication on Android and iOS."
edition = { workspace = true }
authors = { workspace = true }
diff --git a/plugins/biometric/ios/Package.swift b/plugins/biometric/ios/Package.swift
index 34c9f87e..7860f476 100644
--- a/plugins/biometric/ios/Package.swift
+++ b/plugins/biometric/ios/Package.swift
@@ -8,7 +8,8 @@ import PackageDescription
let package = Package(
name: "tauri-plugin-biometric",
platforms: [
- .iOS(.v13)
+ .macOS(.v10_13),
+ .iOS(.v13),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
diff --git a/plugins/clipboard-manager/CHANGELOG.md b/plugins/clipboard-manager/CHANGELOG.md
index 2a0217a8..44bb9049 100644
--- a/plugins/clipboard-manager/CHANGELOG.md
+++ b/plugins/clipboard-manager/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## \[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.
+
## \[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__`.
diff --git a/plugins/clipboard-manager/Cargo.toml b/plugins/clipboard-manager/Cargo.toml
index e089e78f..28e598ef 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.1"
+version = "2.0.0-rc.2"
description = "Read and write to the system clipboard."
edition = { workspace = true }
authors = { workspace = true }
diff --git a/plugins/clipboard-manager/ios/Package.swift b/plugins/clipboard-manager/ios/Package.swift
index f6200857..6da5303e 100644
--- a/plugins/clipboard-manager/ios/Package.swift
+++ b/plugins/clipboard-manager/ios/Package.swift
@@ -6,28 +6,29 @@
import PackageDescription
let package = Package(
- name: "tauri-plugin-clipboard-manager",
- platforms: [
- .iOS(.v13),
- ],
- products: [
- // Products define the executables and libraries a package produces, and make them visible to other packages.
- .library(
- name: "tauri-plugin-clipboard-manager",
- type: .static,
- targets: ["tauri-plugin-clipboard-manager"]),
- ],
- dependencies: [
- .package(name: "Tauri", path: "../.tauri/tauri-api")
- ],
- targets: [
- // Targets are the basic building blocks of a package. A target can define a module or a test suite.
- // Targets can depend on other targets in this package, and on products in packages this package depends on.
- .target(
- name: "tauri-plugin-clipboard-manager",
- dependencies: [
- .byName(name: "Tauri")
- ],
- path: "Sources")
- ]
+ name: "tauri-plugin-clipboard-manager",
+ platforms: [
+ .macOS(.v10_13),
+ .iOS(.v13),
+ ],
+ products: [
+ // Products define the executables and libraries a package produces, and make them visible to other packages.
+ .library(
+ name: "tauri-plugin-clipboard-manager",
+ type: .static,
+ targets: ["tauri-plugin-clipboard-manager"])
+ ],
+ dependencies: [
+ .package(name: "Tauri", path: "../.tauri/tauri-api")
+ ],
+ targets: [
+ // Targets are the basic building blocks of a package. A target can define a module or a test suite.
+ // Targets can depend on other targets in this package, and on products in packages this package depends on.
+ .target(
+ name: "tauri-plugin-clipboard-manager",
+ dependencies: [
+ .byName(name: "Tauri")
+ ],
+ path: "Sources")
+ ]
)
diff --git a/plugins/deep-link/examples/app/package.json b/plugins/deep-link/examples/app/package.json
index 81959ae5..5fac24a2 100644
--- a/plugins/deep-link/examples/app/package.json
+++ b/plugins/deep-link/examples/app/package.json
@@ -14,7 +14,7 @@
"@tauri-apps/plugin-deep-link": "2.0.0-rc.0"
},
"devDependencies": {
- "@tauri-apps/cli": "2.0.0-rc.4",
+ "@tauri-apps/cli": "2.0.0-rc.6",
"typescript": "^5.2.2",
"vite": "^5.0.13"
}
diff --git a/plugins/dialog/CHANGELOG.md b/plugins/dialog/CHANGELOG.md
index 14e0e615..1f97b5ed 100644
--- a/plugins/dialog/CHANGELOG.md
+++ b/plugins/dialog/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## \[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.
+
## \[2.0.0-rc.1]
### feat
diff --git a/plugins/dialog/Cargo.toml b/plugins/dialog/Cargo.toml
index f7b06dc0..3064dc8d 100644
--- a/plugins/dialog/Cargo.toml
+++ b/plugins/dialog/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-dialog"
-version = "2.0.0-rc.1"
+version = "2.0.0-rc.2"
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
@@ -17,6 +17,9 @@ targets = ["x86_64-unknown-linux-gnu", "x86_64-linux-android"]
[build-dependencies]
tauri-plugin = { workspace = true, features = [ "build" ] }
+[dev-dependencies]
+tauri = { workspace = true, features = [ "wry" ] }
+
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
@@ -24,6 +27,7 @@ tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
dunce = { workspace = true }
+url = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.0" }
[target.'cfg(target_os = "ios")'.dependencies]
diff --git a/plugins/dialog/android/src/main/java/DialogPlugin.kt b/plugins/dialog/android/src/main/java/DialogPlugin.kt
index fe0e227e..15af6808 100644
--- a/plugins/dialog/android/src/main/java/DialogPlugin.kt
+++ b/plugins/dialog/android/src/main/java/DialogPlugin.kt
@@ -30,7 +30,6 @@ class Filter {
class FilePickerOptions {
lateinit var filters: Array
var multiple: Boolean? = null
- var readData: Boolean? = null
}
@InvokeArg
@@ -95,7 +94,7 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
try {
when (result.resultCode) {
Activity.RESULT_OK -> {
- val callResult = createPickFilesResult(result.data, filePickerOptions?.readData ?: false)
+ val callResult = createPickFilesResult(result.data)
invoke.resolve(callResult)
}
Activity.RESULT_CANCELED -> invoke.reject("File picker cancelled")
@@ -108,49 +107,23 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
}
}
- private fun createPickFilesResult(data: Intent?, readData: Boolean): JSObject {
+ private fun createPickFilesResult(data: Intent?): JSObject {
val callResult = JSObject()
- val filesResultList: MutableList = ArrayList()
if (data == null) {
- callResult.put("files", JSArray.from(filesResultList))
+ callResult.put("files", null)
return callResult
}
- val uris: MutableList = ArrayList()
+ val uris: MutableList = ArrayList()
if (data.clipData == null) {
val uri: Uri? = data.data
- uris.add(uri)
+ uris.add(uri?.toString())
} else {
for (i in 0 until data.clipData!!.itemCount) {
val uri: Uri = data.clipData!!.getItemAt(i).uri
- uris.add(uri)
+ uris.add(uri.toString())
}
}
- for (i in uris.indices) {
- val uri = uris[i] ?: continue
- val fileResult = JSObject()
- if (readData) {
- fileResult.put("base64Data", FilePickerUtils.getDataFromUri(activity, uri))
- }
- val duration = FilePickerUtils.getDurationFromUri(activity, uri)
- if (duration != null) {
- fileResult.put("duration", duration)
- }
- val resolution = FilePickerUtils.getHeightAndWidthFromUri(activity, uri)
- if (resolution != null) {
- fileResult.put("height", resolution.height)
- fileResult.put("width", resolution.width)
- }
- fileResult.put("mimeType", FilePickerUtils.getMimeTypeFromUri(activity, uri))
- val modifiedAt = FilePickerUtils.getModifiedAtFromUri(activity, uri)
- if (modifiedAt != null) {
- fileResult.put("modifiedAt", modifiedAt)
- }
- fileResult.put("name", FilePickerUtils.getNameFromUri(activity, uri))
- fileResult.put("path", FilePickerUtils.getPathFromUri(activity, uri))
- fileResult.put("size", FilePickerUtils.getSizeFromUri(activity, uri))
- filesResultList.add(fileResult)
- }
- callResult.put("files", JSArray.from(filesResultList.toTypedArray()))
+ callResult.put("files", JSArray.from(uris.toTypedArray()))
return callResult
}
diff --git a/plugins/dialog/guest-js/index.ts b/plugins/dialog/guest-js/index.ts
index 7d1fa99d..9624718d 100644
--- a/plugins/dialog/guest-js/index.ts
+++ b/plugins/dialog/guest-js/index.ts
@@ -4,18 +4,6 @@
import { invoke } from "@tauri-apps/api/core";
-interface FileResponse {
- base64Data?: string;
- duration?: number;
- height?: number;
- width?: number;
- mimeType?: string;
- modifiedAt?: number;
- name?: string;
- path: string;
- size: number;
-}
-
/**
* Extension filters for the file dialog.
*
@@ -117,8 +105,8 @@ type OpenDialogReturn = T["directory"] extends true
? string[] | null
: string | null
: T["multiple"] extends true
- ? FileResponse[] | null
- : FileResponse | null;
+ ? string[] | null
+ : string | null;
/**
* Open a file/directory selection dialog.
@@ -306,7 +294,6 @@ async function confirm(
export type {
DialogFilter,
- FileResponse,
OpenDialogOptions,
OpenDialogReturn,
SaveDialogOptions,
diff --git a/plugins/dialog/ios/Package.swift b/plugins/dialog/ios/Package.swift
index 45a58a43..f8983f14 100644
--- a/plugins/dialog/ios/Package.swift
+++ b/plugins/dialog/ios/Package.swift
@@ -6,28 +6,29 @@
import PackageDescription
let package = Package(
- name: "tauri-plugin-dialog",
- platforms: [
- .iOS(.v13),
- ],
- products: [
- // Products define the executables and libraries a package produces, and make them visible to other packages.
- .library(
- name: "tauri-plugin-dialog",
- type: .static,
- targets: ["tauri-plugin-dialog"]),
- ],
- dependencies: [
- .package(name: "Tauri", path: "../.tauri/tauri-api")
- ],
- targets: [
- // Targets are the basic building blocks of a package. A target can define a module or a test suite.
- // Targets can depend on other targets in this package, and on products in packages this package depends on.
- .target(
- name: "tauri-plugin-dialog",
- dependencies: [
- .byName(name: "Tauri")
- ],
- path: "Sources")
- ]
+ name: "tauri-plugin-dialog",
+ platforms: [
+ .macOS(.v10_13),
+ .iOS(.v13),
+ ],
+ products: [
+ // Products define the executables and libraries a package produces, and make them visible to other packages.
+ .library(
+ name: "tauri-plugin-dialog",
+ type: .static,
+ targets: ["tauri-plugin-dialog"])
+ ],
+ dependencies: [
+ .package(name: "Tauri", path: "../.tauri/tauri-api")
+ ],
+ targets: [
+ // Targets are the basic building blocks of a package. A target can define a module or a test suite.
+ // Targets can depend on other targets in this package, and on products in packages this package depends on.
+ .target(
+ name: "tauri-plugin-dialog",
+ dependencies: [
+ .byName(name: "Tauri")
+ ],
+ path: "Sources")
+ ]
)
diff --git a/plugins/dialog/ios/Sources/DialogPlugin.swift b/plugins/dialog/ios/Sources/DialogPlugin.swift
index 26c9fefa..cb8f19e4 100644
--- a/plugins/dialog/ios/Sources/DialogPlugin.swift
+++ b/plugins/dialog/ios/Sources/DialogPlugin.swift
@@ -29,7 +29,6 @@ struct Filter: Decodable {
struct FilePickerOptions: Decodable {
var multiple: Bool?
- var readData: Bool?
var filters: [Filter]?
}
@@ -136,55 +135,9 @@ class DialogPlugin: Plugin {
public func onFilePickerEvent(_ event: FilePickerEvent) {
switch event {
case .selected(let urls):
- let readData = pendingInvokeArgs?.readData ?? false
- do {
- let filesResult = try urls.map { (url: URL) -> JSObject in
- var file = JSObject()
-
- let mimeType = filePickerController.getMimeTypeFromUrl(url)
- let isVideo = mimeType.hasPrefix("video")
- let isImage = mimeType.hasPrefix("image")
-
- if readData {
- file["data"] = try Data(contentsOf: url).base64EncodedString()
- }
-
- if isVideo {
- file["duration"] = filePickerController.getVideoDuration(url)
- let (height, width) = filePickerController.getVideoDimensions(url)
- if let height = height {
- file["height"] = height
- }
- if let width = width {
- file["width"] = width
- }
- } else if isImage {
- let (height, width) = filePickerController.getImageDimensions(url)
- if let height = height {
- file["height"] = height
- }
- if let width = width {
- file["width"] = width
- }
- }
-
- file["modifiedAt"] = filePickerController.getModifiedAtFromUrl(url)
- file["mimeType"] = mimeType
- file["name"] = url.lastPathComponent
- file["path"] = url.absoluteString
- file["size"] = try filePickerController.getSizeFromUrl(url)
- return file
- }
- pendingInvoke?.resolve(["files": filesResult])
- } catch let error as NSError {
- pendingInvoke?.reject(error.localizedDescription, error: error)
- return
- }
-
pendingInvoke?.resolve(["files": urls])
case .cancelled:
- let files: JSArray = []
- pendingInvoke?.resolve(["files": files])
+ pendingInvoke?.resolve(["files": nil])
case .error(let error):
pendingInvoke?.reject(error)
}
diff --git a/plugins/dialog/src/commands.rs b/plugins/dialog/src/commands.rs
index 7e50d591..25716e91 100644
--- a/plugins/dialog/src/commands.rs
+++ b/plugins/dialog/src/commands.rs
@@ -8,17 +8,17 @@ use serde::{Deserialize, Serialize};
use tauri::{command, Manager, Runtime, State, Window};
use tauri_plugin_fs::FsExt;
-use crate::{Dialog, FileDialogBuilder, FileResponse, MessageDialogKind, Result};
+use crate::{Dialog, FileDialogBuilder, FilePath, MessageDialogKind, Result};
#[derive(Serialize)]
#[serde(untagged)]
pub enum OpenResponse {
#[cfg(desktop)]
- Folders(Option>),
+ Folders(Option>),
#[cfg(desktop)]
- Folder(Option),
- Files(Option>),
- File(Option),
+ Folder(Option),
+ Files(Option>),
+ File(Option),
}
#[allow(dead_code)]
@@ -136,25 +136,26 @@ pub(crate) async fn open(
let folders = dialog_builder.blocking_pick_folders();
if let Some(folders) = &folders {
for folder in folders {
- if let Some(s) = window.try_fs_scope() {
- s.allow_directory(folder, options.recursive);
+ if let Ok(path) = folder.path() {
+ if let Some(s) = window.try_fs_scope() {
+ s.allow_directory(path, options.recursive);
+ }
}
}
}
- OpenResponse::Folders(folders.map(|folders| {
- folders
- .iter()
- .map(|p| dunce::simplified(p).to_path_buf())
- .collect()
- }))
+ OpenResponse::Folders(
+ folders.map(|folders| folders.into_iter().map(|p| p.simplified()).collect()),
+ )
} else {
let folder = dialog_builder.blocking_pick_folder();
- if let Some(path) = &folder {
- if let Some(s) = window.try_fs_scope() {
- s.allow_directory(path, options.recursive);
+ if let Some(folder) = &folder {
+ if let Ok(path) = folder.path() {
+ if let Some(s) = window.try_fs_scope() {
+ s.allow_directory(path, options.recursive);
+ }
}
}
- OpenResponse::Folder(folder.map(|p| dunce::simplified(&p).to_path_buf()))
+ OpenResponse::Folder(folder.map(|p| p.simplified()))
}
}
#[cfg(mobile)]
@@ -163,37 +164,28 @@ pub(crate) async fn open(
let files = dialog_builder.blocking_pick_files();
if let Some(files) = &files {
for file in files {
- if let Some(s) = window.try_fs_scope() {
- s.allow_file(&file.path);
+ if let Ok(path) = file.path() {
+ if let Some(s) = window.try_fs_scope() {
+ s.allow_file(&path);
+ }
+
+ window.state::().allow_file(&path)?;
}
- window
- .state::()
- .allow_file(&file.path)?;
}
}
- OpenResponse::Files(files.map(|files| {
- files
- .into_iter()
- .map(|mut f| {
- f.path = dunce::simplified(&f.path).to_path_buf();
- f
- })
- .collect()
- }))
+ OpenResponse::Files(files.map(|files| files.into_iter().map(|f| f.simplified()).collect()))
} else {
let file = dialog_builder.blocking_pick_file();
+
if let Some(file) = &file {
- if let Some(s) = window.try_fs_scope() {
- s.allow_file(&file.path);
+ if let Ok(path) = file.path() {
+ if let Some(s) = window.try_fs_scope() {
+ s.allow_file(&path);
+ }
+ window.state::().allow_file(&path)?;
}
- window
- .state::()
- .allow_file(&file.path)?;
}
- OpenResponse::File(file.map(|mut f| {
- f.path = dunce::simplified(&f.path).to_path_buf();
- f
- }))
+ OpenResponse::File(file.map(|f| f.simplified()))
};
Ok(res)
}
@@ -204,7 +196,7 @@ pub(crate) async fn save(
window: Window,
dialog: State<'_, Dialog>,
options: SaveDialogOptions,
-) -> Result