57 Commits

Author SHA1 Message Date
Tony 3f21f39584 refactor(dialog): handle okLabel in js side (#3295)
* refactor(dialog): handle `okLabel` in js side

* Allow unused instead of `cfg(desktop)`
2026-03-01 23:22:25 +08:00
Andrew de Waal d7a0bb325d feat(dialog) - Support fileAccessMode for open dialog (#3030) (#3136)
* feat(dialog) - Support fileAccessMode for open dialog (#3030)

On iOS, when trying to access a file that exists outside of the app sandbox, one of 2 things need to happen to be able to perform any operations on said file:

* A copy of the file needs to be made to the internal app sandbox
* The method startAccessingSecurityScopedResource needs to be called.

Previously, a copy of the file was always being made when a file was selected through the picker dialog.

While this did ensure there were no file access exceptions when reading from the file, it does not scale well for large files.

To resolve this, we now support `fileAccessMode`, which allows a file handle to be returned without copying the file to the app sandbox.

This MR only supports this change for iOS; MacOS has a different set of needs for security scoped resources.

See discussion in #3716 for more discussion of the difference between iOS and MacOS.
See MR #3185 to see how these scoped files will be accessible using security scoping.

* fmt, clippy

* use enum

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2026-01-14 08:35:06 -03:00
Andrew de Waal dff6fa986a feat(dialog) - Support picker mode for open dialog (#3030) (#3034)
Co-authored-by: Andrew de Waal <andrewldewaal@gmail.com>
2025-11-20 22:28:13 +01:00
Matthew Richardson ad910b1135 feat(upload): Add HTTP method selection for upload (#2991)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
2025-11-10 21:31:57 +01:00
Amr Bashir 509eba8d44 feat: support message dialogs with 3 buttons (#2641)
* feat: support message dialogs with 3 buttons

* change file

* From<String>

* untagged & YesNoCancel

* revert package.json

* Update plugins/dialog/src/desktop.rs

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>

* no optional

* Update desktop.rs

* Update plugins/dialog/src/models.rs

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>

* change to an enum

* convert back into union

* regen

* update @since

* map buttons for linux

* enhance type

* Add examples

---------

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Tony <legendmastertony@gmail.com>
2025-08-27 09:40:47 -03:00
Keerthi 2d03e2eac2 Add sound support for desktop notifications in Tauri v2 (#2678)
* Add sound support for desktop notifications in Tauri v2

* ci

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-08-21 10:05:27 -03:00
Fabian-Lars 04a0954857 chore(example): Improve dialog/fs mobile examples (#2410) 2025-08-21 12:04:46 +02:00
Tony 4eb36b0ff5 fix(fs): writeFile with ReadableStream throws (#2907) 2025-08-10 18:44:33 +08:00
Tony 5ac8fbb1fa feat(store): load override defaults (#2857)
* feat(store): load override defaults

* Update docs

* Update example

* Allow setting defaults from js

* Tweak resolve

* Merge remote-tracking branch 'upstream/v2' into store-load-override-defaults

* Merge branch 'v2' of https://github.com/tauri-apps/plugins-workspace into store-load-override-defaults

* Merge branch 'v2' into store-load-override-defaults

* Rename to ignore defaults

* Merge remote-tracking branch 'upstream/v2' into store-load-override-defaults
2025-08-05 18:45:09 +08:00
Matthew Richardson b729203059 fix(upload): fix download() locks main thread on Android (#2838)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
2025-07-18 20:37:39 +02:00
Lucas Fernandes Nogueira 2aec8ff4c4 feat(opener): add inAppBrowser option for iOS and Android (#2803) 2025-06-24 16:43:01 -03:00
Tony dac4d53724 refactor(fs): reduce overhead of watch (#2613) 2025-04-19 13:35:14 +02:00
Tony 2d731f8022 fix(updater): format Update.date to RFC 3339 (#2573)
* fix(updater): format `Update.date` to RFC 3339

* Messed up on argument in #2572

* Format

* Update example

* Avoid extra to_string

* Deprecate `Update.available`
2025-03-29 08:36:50 +08:00
Amr Bashir 383e636a8e feat: add tauri-plugin-opener (#2019) 2024-11-20 00:50:02 +02:00
Fabian-Lars fdc382dff0 chore(example): Add Haptics page (#2032) 2024-11-11 16:53:56 +01:00
renovate[bot] c8e5614063 chore(deps): update dependency svelte to v5 (v2) (#1956)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-11-04 13:16:36 +01:00
Tony 8c67d44aef refactor(store)!: more reworks (#1860)
* refactor(store): more reworks

* Enable auto save by default

* Store to resource table by default

* Remove share store

* Clean up

* Add close store

* Add store function

* Add lazy store

* Add init to lazy store

* refresh cache in example

* Add get-or-create-store

* Revert "Add get-or-create-store"

This reverts commit 7ffd769240.

* try get first

* Docs

* Use absolute path for store

* more docs

* Allow js to use pre-stored (de)serialize functions

* Fix js get and close store

* Show case how to use pretty json

* Update readme

* Use store instead of `store_builder` in example

* Build

* Fix example

* More docs for StoreBuilder::build

* Add default (de)serialize fn

* Use pretty json by default

* Use `undefined` for empty value in get

* Change files

* Differentiate json null from no value for events

* Add create or existing

* Build

* Rename inner store's inset method to set

* Update readme

* Apply suggestions from code review

* Use close instead

* Update breaking changes

* Return result in resolve_store_path

* Change to close_resource and take &self

* Clean up

* Apply suggestions from code review

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>

* Remove unused pub(crate)

* Update change file

* Expose resolve_store_path

* Remove with_store

* Remove StoreInner from pub and expose is_empty

* Fix wrong jsdoc param

* Update readme

* rename createOrExistingStore to createOrLoad

* make api consistent with the JS implementation, add examples

* fmt

* reintroduce "get existing store" behavior for create_or_load

* rename createOrLoad to newOrExisting

* keep store lock throughout whole new_or_existing_inner

* Remove load

* Missed if load

* Don't make StoreState public

* Remove R: Runtime from Builder

* rename newOrExisting to load, load to reload

* update docs

* rename missing reload fn

* rename builder fn to build()

* fix default permission

* Fix description and create_new logic

* Clippy

* Update docs

* Update docs

* remove create_store command

* remove close_store command since we extend from Resource

* Revert "remove close_store command since we extend from Resource"

This reverts commit 4a29fc8990.

* Reapply "remove close_store command since we extend from Resource"

This reverts commit 70a1830e7d.

---------

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-17 19:14:41 +08:00
Lucas Fernandes Nogueira 60765694f5 refactor(geolocation): simplify API, defer permission checks (#1773) 2024-09-16 17:01:13 +03:00
Lucas Fernandes Nogueira 341a5320c3 fix(clipboard): Android warnings and build on SDK under 28 (#1771) 2024-09-13 12:03:10 -03:00
Amr Bashir cf4d7d4e6c chore: adjust prettier config, .gitignore and use taplo to format toml files (#1728)
* chore: adjust prettier config, .gitignore and use taplo to format toml files

This brings the plugins-workspace repository to the same code style of the main tauri repo

* format toml

* ignore examples gen dir

* add .vscode/extensions.json

* remove packageManager field

* fmt

* fix audit

* taplo ignore permissions autogenerated files

* remove create dummy dist

* fix prettier workflow

* install fmt in prettier workflow

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-09-04 08:54:23 -03:00
Lucas Fernandes Nogueira 0c040bcc9a 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
2024-08-27 14:18:02 -03:00
mikoto2000 448846b834 feat(fs): resolve content URIs on Android (#1658)
* Implemented writeTextFile on Android.

* Added license headers.

* fix fmt checks.

* implement more file APIs

* change file

* cleanup

* refactor dialog plugin to leverage new FS APIs

* implement metadata functions

* fix build

* expose FS rust API

* resolve resources on android

* update pnpm

* update docs

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-23 13:35:53 -03:00
Lucas Fernandes Nogueira 22a17980ff feat: update to tauri beta.24 (#1537)
* feat: update to tauri beta.24

* remove .tauri

* pnpm build
2024-07-12 17:59:17 -03:00
Amr Bashir 381a466db3 refactor(global-shortcut): enhance un/register to accept an array, remove un/registerAll (#1117)
* refactor(shell): enhance `un/register` to accept an array, remove `un/registerAll`

closes #1101

* Update lib.rs

* remove permissions, cleanup docs

* bring back unregister_all

* fmt

* fix build

* bundle

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-07-08 19:20:00 +03:00
Tony 1fa4d30eab feat(updater): support non zipped updater (#1174) 2024-04-30 17:48:04 +03:00
Amr Bashir 9c7eb35967 feat(global-shortcut): support pressed/released states (#1244)
closes #1243
2024-04-24 15:42:01 +02:00
Lucas Fernandes Nogueira 772f2bc349 chore: bump tauri to 2.0.0-beta.14 (#1136)
* chore: bump tauri

* pin tauri, change file
2024-04-02 18:31:15 -03:00
阿良仔 9dec9605ed feat(clipboard): support readImage & writeImage (#845)
* feat(clipboard): support `read_image` & `write_image`

* fix plugin name

* platform specific bahavior

* remove unnecessary BufWriter

* improvement

* update example

* update example

* format

* header, fix change file

* use image from tauri

* fix ci

* update tauri, fix read

* image crate only on desktop [skip ci]

* Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci]

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>

* Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci]

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>

* update deps, address code review

* fix mobile [skip ci]

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2024-03-19 09:35:37 -03:00
Lucas Fernandes Nogueira cacf544d51 chore(deps): update to tauri beta.9 (#1037) 2024-03-07 00:08:52 -03:00
Lucas Fernandes Nogueira ac520a2841 feat(http): enhance scope URL matching via urlpattern (#1030)
* feat(http): enhance scope URL matching via urlpattern

* update schema
2024-03-06 13:44:51 -03:00
Tony 2e7ef46d8b refactor!(dialog): change type field in JS to kind (#945)
* Fix dialog type not working

* gen files

* type -> kind

* update API example

---------

Co-authored-by: amrbashir <amr.bashir2015@gmail.com>
2024-02-14 01:05:54 +02:00
Daniel Faust 61edbbec0a feat(fs/watch): migrate to notify-debouncer-full (#885)
* Add support for notify-debouncer-full

* Add fs watch to demo

* Remove notify-debouncer-mini

* Rename RawEvent to WatchEvent

* Add full type definition for EventKind

* Remove `track file ids` option from fs watcher

* Update plugins/fs/guest-js/index.ts
2024-01-18 20:35:49 +02:00
Olivier Lemasle bf5a21d5b2 fix(dialog): On Android, do not add a Cancel button to message dialogs (#873) 2024-01-11 04:30:32 +02:00
Amr Bashir 69a1fa099c feat(fs): improved API (#751)
* feat(fs): improved API

* fmt

* fix unix builds

* again

* clippy

* clippy

* fix import in docs examples

* fmt, clippy

* Update linux.rs

* add API for watch

* fix with `watcher` feature flag

* use baseDir for all commands

* do not export close function

* fix build

* organize and address review comments

* fmt

* generated files

* rename FsFile to FileHandle, move APIs and docs

* extend example

* extend `Resource`

* actually extend it

---------

Co-authored-by: FabianLars <fabianlars@fabianlars.de>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-12-19 22:08:34 -03:00
Lucas Fernandes Nogueira 2cf8faa3e1 chore(deps): update to tauri alpha.20, @tauri-apps/api alpha.13 (#839)
* chore(deps): update to tauri alpha.20, @tauri-apps/api alpha.13

* fix lockfile
2023-12-20 00:18:05 +02:00
Lucas Nogueira 8df28a9875 feat(mobile): add biometric plugin (#829)
* chore: update deps, make mobile script paths relative

* feat(biometric): setup plugin folder

* feat: implement iOS

* add api

* android

* fix plugin name

* also check empty info.plist entry

* add example

* fix android

* supress

* lint

* better explanation

* add partners & contributed by

* change ext

* license headers

* update vite

* add covector setup

* tauri/dox removed

* add example

* docs

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2023-12-19 11:16:13 -03:00
Lucas Nogueira fe79adb5c7 feat(mobile): add NFC plugin (#830)
* feat: scaffold NFC plugin, initial iOS code

* adjust script paths (api example)

* update entitlements & plist

* update class name

* update api

* sketch api, remove desktop

* update response data

* add write fn

* remove commands

* fixes for write mode

* check nfc state before using the APIs

* fix(example): downgrade internal-ip to v7

* feat: typed iOS arguments

* update swift requirement

* android updates

* update tauri

* fix icon

* update example

* fix build

* fix notification example

* fix clipboard

* fix ios notification build

* fix info.plist

* update tauri

* add change file

* fmt

* update to new args class syntax :( [skip ci]

* add lang code handling in RTD_TEXT helper (written payload is broken without it)

* update nfc to latest tauri. use tauri from git

* update lockfile

* android: add initial nfc writer implementation

* check sdk version for pendingintent flag

* quicksaving basic ndef reading that doesn't crash

* add basic ndef reading (android)

* small cleanup

* change pending action type

* validate available state

* gradle 8.0.0

* use session class

* implement keep session alive

* fix notification crash??

* remove dox feature, fix breaking changes

* update dependencies

* fix shell tests [skip ci]

* fmt [skip ci]

* type safe args

* scan kind options

* commit .idea files

* update api

* update example

* fix app check

* alertmessage options for iOS

* default to tag on example

* fix(ios): always close session on write, remove keepsessionalive option

* add kind input to write options

* empty records if message not found

* fill tag metadata for ndef read

* add contributors

* update vite

* covector setup

* tauri/dox removed

* docs and examples

* fmt [skip ci]

---------

Co-authored-by: FabianLars-crabnebula <fabianlars@crabnebula.dev>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-12-19 10:50:31 -03:00
Lucas Fernandes Nogueira e438e0a62d feat: update to alpha.17, typed mobile plugin IPC arguments (#676)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2023-10-29 16:06:44 -03:00
Lucas Fernandes Nogueira 5c137365c6 chore: update to tauri alpha.16, api alpha.9 (#673)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2023-10-20 13:50:18 -03:00
Amr Bashir b7c5407cac refactor: remove window and app plugins (#671)
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2023-10-19 23:17:09 +00:00
Lucas Fernandes Nogueira 454428cd50 feat: add barcode scanner plugin (#536) 2023-09-14 09:34:04 -03:00
Amr Bashir 84133b57b8 feat(window): refactor and improvements (#426)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-08-07 13:20:17 -03:00
Amr Bashir 7d9df7297a feat(http): refactor and improvements (#428)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-08-07 08:33:00 -03:00
Lucas Fernandes Nogueira a79d6d94bd feat(window): add option to disable controls (#406)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2023-06-19 11:14:38 -03:00
Lucas Fernandes Nogueira c8c3191565 feat(window): add setEffects API (#392) 2023-06-18 07:21:27 -03:00
Lucas Fernandes Nogueira 9359b5b138 fix(examples): adjust layout for iOS (#439) 2023-06-16 08:05:55 -07:00
Lucas Fernandes Nogueira b259baa17e refactor: rename clipboard plugin to clipboard-manager (#400) 2023-05-24 12:06:07 -03:00
Lucas Fernandes Nogueira 3c9771e287 feat: update to tauri 2.0.0-alpha.9 (#372) 2023-05-18 11:39:46 -03:00
Lucas Fernandes Nogueira 717ae67097 feat: prepare v2 alpha release (#371) 2023-05-18 10:08:37 -03:00
Lucas Fernandes Nogueira 22991af9f4 feat(plugins): use @tauri-apps namespace on NPM (#368)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2023-05-17 20:52:53 -03:00