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
2025-10-27 11:12:56 +01:00
2026-01-08 15:34:17 +01:00
2022-12-14 18:54:05 +01:00
2022-12-14 18:54:05 +01:00
2022-12-14 18:54:05 +01:00
2026-01-08 15:34:17 +01:00

Official Tauri Plugins

This repo and all plugins require a Rust version of at least 1.77.2

Plugins Found Here

Win Mac Lin iOS And
autostart Automatically launch your app at system startup.
barcode-scanner Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes. ? ? ?
biometric Prompt the user for biometric authentication on Android and iOS. ? ? ?
cli Parse arguments from your Command Line Interface
clipboard-manager Read and write to the system clipboard.
deep-link Set your Tauri application as the default handler for an URL.
dialog Native system dialogs for opening and saving files along with message dialogs.
fs Access the file system. ? ?
geolocation Get and track current device position. ? ? ?
global-shortcut Register global shortcuts. ? ?
haptics Haptic feedback and vibrations. ? ? ?
http Access the HTTP client written in Rust.
localhost Use a localhost server in production apps. ? ?
log Configurable logging.
nfc Read and write NFC tags on Android and iOS. ? ? ?
notification Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API.
opener Open files and URLs using their default application. ? ?
os Read information about the operating system.
persisted-scope Persist runtime scope changes on the filesystem. ? ?
positioner Move windows to common locations.
process This plugin provides APIs to access the current process. To spawn child processes, see the shell plugin. ? ?
shell Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application. ? ?
single-instance Ensure a single instance of your tauri app is running.
sql Interface with SQL databases.
store Persistent key value storage.
stronghold Encrypted, secure database. ? ?
updater In-app updates for Tauri applications.
upload Tauri plugin for file uploads through HTTP.
websocket Open a WebSocket connection using a Rust client in JS. ? ?
window-state Persist window sizes and positions.
  • : (Partially) Supported
  • : Not supported
  • ? : Unknown/Untested or Planned

Contributing

PRs accepted. Please make sure to read the Contributing Guide before making a pull request.

Partners

CrabNebula

For the complete list of sponsors please visit our website and Open Collective.

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-31T05:32:34.623Z
Readme 29 MiB
Languages
Rust 60.6%
TypeScript 15.2%
Kotlin 13.5%
Swift 8.5%
JavaScript 1.5%
Other 0.6%