feat: saveToken plugin for app groups on iOS

This will allow the share extension to access the Bearer token to send
images to the backend.
This commit is contained in:
2025-05-01 18:20:26 +01:00
parent c8d9ae7aff
commit 61e9258538
32 changed files with 857 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ dependencies = [
"tauri-plugin-fs",
"tauri-plugin-global-shortcut",
"tauri-plugin-http",
"tauri-plugin-ios-shared-token",
"tauri-plugin-log",
"tauri-plugin-os",
"tauri-plugin-sharetarget",
@@ -4113,6 +4114,16 @@ dependencies = [
"urlpattern",
]
[[package]]
name = "tauri-plugin-ios-shared-token"
version = "0.1.0"
dependencies = [
"serde",
"tauri",
"tauri-plugin",
"thiserror 2.0.12",
]
[[package]]
name = "tauri-plugin-log"
version = "2.4.0"

View File

@@ -40,3 +40,6 @@ tauri-plugin-global-shortcut = "2"
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-sharetarget = { path = "../../tauri-plugin-sharetarget"}
[target."cfg(any(target_os = \"ios\"))".dependencies]
tauri-plugin-ios-shared-token = { path = "../../tauri-plugin-ios-shared-token"}

View File

@@ -9,6 +9,7 @@ permissions = [
"http:default",
"os:default",
"sharetarget:default",
"ios-shared-token:default",
{ identifier = "http:default", allow = [
{ url = "https://haystack.johncosta.tech" },
{ url = "http://localhost:3040" },

View File

@@ -58,6 +58,8 @@ pub fn android() {
.plugin(tauri_plugin_store::Builder::new().build())
.plugin(tauri_plugin_http::init())
.plugin(tauri_plugin_sharetarget::init())
#[cfg(target_os = "ios")]
.plugin(tauri_plugin_ios_shared_token::init())
.setup(|app| {
log::info!("running things!");
setup_window(app)?;