Skip to content

Commit 0c040bc

Browse files
authored
fix(store): remove Android and iOS plugins, closes #1256 (#1695)
The Android and iOS support introduced on #1011 is not really supported - the Tauri path API correctly resolves the cache directory on mobile, and we can access those directly using Rust code. This is a breaking change because we no longer uses the same directory to store the files - app_cache_dir returns a different location
1 parent 0d5e7e2 commit 0c040bc

28 files changed

+472
-552
lines changed

.changes/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"os",
6969
"process",
7070
"shell",
71+
"store",
7172
"updater"
7273
]
7374
},
@@ -90,6 +91,7 @@
9091
"os-js",
9192
"process-js",
9293
"shell-js",
94+
"store-js",
9395
"updater-js"
9496
],
9597
"postversion": "pnpm install --no-frozen-lockfile"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"store": patch:breaking
3+
---
4+
5+
Implement mobile support in Rust directly. This changes the store directories, invalidating all previously generated stores.

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@tauri-apps/plugin-os": "2.0.0-rc.0",
2424
"@tauri-apps/plugin-process": "2.0.0-rc.0",
2525
"@tauri-apps/plugin-shell": "2.0.0-rc.0",
26+
"@tauri-apps/plugin-store": "2.0.0-rc.0",
2627
"@tauri-apps/plugin-updater": "2.0.0-rc.0",
2728
"@zerodevx/svelte-json-view": "1.0.9"
2829
},

examples/api/src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tauri-plugin-notification = { path = "../../../plugins/notification", version =
3434
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.0" }
3535
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-rc.0" }
3636
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.2" }
37+
tauri-plugin-store = { path = "../../../plugins/store", version = "2.0.0-rc.2" }
3738

3839
[dependencies.tauri]
3940
workspace = true

examples/api/src-tauri/capabilities/base.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
}
7979
],
8080
"deny": ["$APPDATA/db/*.stronghold"]
81-
}
81+
},
82+
"store:allow-entries",
83+
"store:allow-get",
84+
"store:allow-set",
85+
"store:allow-save",
86+
"store:allow-load"
8287
]
8388
}

examples/api/src-tauri/gen/schemas/desktop-schema.json

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7265,6 +7265,181 @@
72657265
"shell:deny-stdin-write"
72667266
]
72677267
},
7268+
{
7269+
"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",
7270+
"type": "string",
7271+
"enum": [
7272+
"store:default"
7273+
]
7274+
},
7275+
{
7276+
"description": "store:allow-clear -> Enables the clear command without any pre-configured scope.",
7277+
"type": "string",
7278+
"enum": [
7279+
"store:allow-clear"
7280+
]
7281+
},
7282+
{
7283+
"description": "store:allow-delete -> Enables the delete command without any pre-configured scope.",
7284+
"type": "string",
7285+
"enum": [
7286+
"store:allow-delete"
7287+
]
7288+
},
7289+
{
7290+
"description": "store:allow-entries -> Enables the entries command without any pre-configured scope.",
7291+
"type": "string",
7292+
"enum": [
7293+
"store:allow-entries"
7294+
]
7295+
},
7296+
{
7297+
"description": "store:allow-get -> Enables the get command without any pre-configured scope.",
7298+
"type": "string",
7299+
"enum": [
7300+
"store:allow-get"
7301+
]
7302+
},
7303+
{
7304+
"description": "store:allow-has -> Enables the has command without any pre-configured scope.",
7305+
"type": "string",
7306+
"enum": [
7307+
"store:allow-has"
7308+
]
7309+
},
7310+
{
7311+
"description": "store:allow-keys -> Enables the keys command without any pre-configured scope.",
7312+
"type": "string",
7313+
"enum": [
7314+
"store:allow-keys"
7315+
]
7316+
},
7317+
{
7318+
"description": "store:allow-length -> Enables the length command without any pre-configured scope.",
7319+
"type": "string",
7320+
"enum": [
7321+
"store:allow-length"
7322+
]
7323+
},
7324+
{
7325+
"description": "store:allow-load -> Enables the load command without any pre-configured scope.",
7326+
"type": "string",
7327+
"enum": [
7328+
"store:allow-load"
7329+
]
7330+
},
7331+
{
7332+
"description": "store:allow-reset -> Enables the reset command without any pre-configured scope.",
7333+
"type": "string",
7334+
"enum": [
7335+
"store:allow-reset"
7336+
]
7337+
},
7338+
{
7339+
"description": "store:allow-save -> Enables the save command without any pre-configured scope.",
7340+
"type": "string",
7341+
"enum": [
7342+
"store:allow-save"
7343+
]
7344+
},
7345+
{
7346+
"description": "store:allow-set -> Enables the set command without any pre-configured scope.",
7347+
"type": "string",
7348+
"enum": [
7349+
"store:allow-set"
7350+
]
7351+
},
7352+
{
7353+
"description": "store:allow-values -> Enables the values command without any pre-configured scope.",
7354+
"type": "string",
7355+
"enum": [
7356+
"store:allow-values"
7357+
]
7358+
},
7359+
{
7360+
"description": "store:deny-clear -> Denies the clear command without any pre-configured scope.",
7361+
"type": "string",
7362+
"enum": [
7363+
"store:deny-clear"
7364+
]
7365+
},
7366+
{
7367+
"description": "store:deny-delete -> Denies the delete command without any pre-configured scope.",
7368+
"type": "string",
7369+
"enum": [
7370+
"store:deny-delete"
7371+
]
7372+
},
7373+
{
7374+
"description": "store:deny-entries -> Denies the entries command without any pre-configured scope.",
7375+
"type": "string",
7376+
"enum": [
7377+
"store:deny-entries"
7378+
]
7379+
},
7380+
{
7381+
"description": "store:deny-get -> Denies the get command without any pre-configured scope.",
7382+
"type": "string",
7383+
"enum": [
7384+
"store:deny-get"
7385+
]
7386+
},
7387+
{
7388+
"description": "store:deny-has -> Denies the has command without any pre-configured scope.",
7389+
"type": "string",
7390+
"enum": [
7391+
"store:deny-has"
7392+
]
7393+
},
7394+
{
7395+
"description": "store:deny-keys -> Denies the keys command without any pre-configured scope.",
7396+
"type": "string",
7397+
"enum": [
7398+
"store:deny-keys"
7399+
]
7400+
},
7401+
{
7402+
"description": "store:deny-length -> Denies the length command without any pre-configured scope.",
7403+
"type": "string",
7404+
"enum": [
7405+
"store:deny-length"
7406+
]
7407+
},
7408+
{
7409+
"description": "store:deny-load -> Denies the load command without any pre-configured scope.",
7410+
"type": "string",
7411+
"enum": [
7412+
"store:deny-load"
7413+
]
7414+
},
7415+
{
7416+
"description": "store:deny-reset -> Denies the reset command without any pre-configured scope.",
7417+
"type": "string",
7418+
"enum": [
7419+
"store:deny-reset"
7420+
]
7421+
},
7422+
{
7423+
"description": "store:deny-save -> Denies the save command without any pre-configured scope.",
7424+
"type": "string",
7425+
"enum": [
7426+
"store:deny-save"
7427+
]
7428+
},
7429+
{
7430+
"description": "store:deny-set -> Denies the set command without any pre-configured scope.",
7431+
"type": "string",
7432+
"enum": [
7433+
"store:deny-set"
7434+
]
7435+
},
7436+
{
7437+
"description": "store:deny-values -> Denies the values command without any pre-configured scope.",
7438+
"type": "string",
7439+
"enum": [
7440+
"store:deny-values"
7441+
]
7442+
},
72687443
{
72697444
"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",
72707445
"type": "string",

0 commit comments

Comments
 (0)