Skip to content

Conversation

@onehumandev
Copy link

@onehumandev onehumandev commented Oct 13, 2025

For iOS and Android, there are 2 distinct file picker dialogs, one for picking media and one for picking documents.

Previously, the filters provided by the user when calling the open method would determine which picker would be displayed.

However, this has led to undefined behavior when no filter was provided.

To resolve this, we now provide a PickerMode (meant for iOS and eventually Android) to explicitly define which picker we want to display.

Eventually, we may need to provide more explicit ways of filtering by MIME type or having specific modes for ImagePicker or VideoPicker for ease of use on mobile platforms.

But for now, this is an initial implementation that allows specifying which UI would be preferable for a file picker on mobile platforms.

Related bug #3030

@onehumandev onehumandev requested a review from a team as a code owner October 13, 2025 22:24
@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2025

Package Changes Through 20193f6

There are 4 changes which include dialog with minor, dialog-js with minor, updater with minor, updater-js with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.38 2.0.39
api-example-js 2.0.34 2.0.35
dialog 2.4.2 2.5.0
dialog-js 2.4.2 2.5.0
updater 2.9.0 2.10.0
updater-js 2.9.0 2.10.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@onehumandev onehumandev force-pushed the aldewaal/picker-mode branch 4 times, most recently from b1b6214 to 1407271 Compare October 16, 2025 14:07
For iOS and Android, there are 2 distinct file picker dialogs, one for
picking media and one for picking documents.

Previously, the filters provided by the user would determing which
picker would be displayed.

However, this has led to undefined behavior when no filter was provided.

To resolve this, we now provide a PickerMode (meant for iOS and
eventually Android) to explicitly define which picker we want to
display.

Eventually, we may need to provide more explicit ways of filtering by
MIME type or having specific modes for ImagePicker or VideoPicker for
ease of use on mobile platforms.

But for now, this is an initial implementation that allows specifying
which UI would be preferable for a file picker on mobile platforms.
@velocitysystems
Copy link
Contributor

@onehumandev We have a couple of test failures due to Swift code which is targeting APIs > iOS 13.
While Tauri's minimum iOS version is iOS 9 and above this plugin is targeting iOS 13 and above.

Note: We may be able to raise the minimum version since iOS 14+ is the default for Tauri applications created with Tauri CLI v2.8 and above. This is also used by the NFC plugin.

@onehumandev
Copy link
Author

NFC plugin

@velocitysystems It looks like the NFC docs say that the min version is iOS 14, but actual declared min version is 13 .

For this MR, what is the preferred option: bumping the min version to 14, or changing the current implementation to work with iOS 13? I don't mind either way, but I'd rather not make a significant change without getting a consensus.

@velocitysystems
Copy link
Contributor

Thanks @onehumandev. To retain compatibility let's keep the minimum iOS version at 13; unless we have a very specific reason to bump the min SDK version.

@onehumandev
Copy link
Author

@lucasfernog @velocitysystems I've started working through making some changes to fix the compilation errors with iOS 13.0, and I wanted to make sure I understand the expectation for these plugins (especially for future work).

Specifically: What defines the expected iOS deployment target for plugins?
Is it:
A) The deployment target defined when a plugin is created (currently iOS 14 as of August 16, from this MR)
B) The deployment target of the examples/api project (currently iOS, 14 from the previously mentioned MR)
C) Variable (each plugin may have a different deployment target as needed)

I see that the NFC plugin has some specific statements stating that the min version is 14, which would indicate that this is not standard.
However, from what I can see, the deployment target when a plugin is created and when testing the plugin through api/examples is 14.0.

The reason I am asking about this is that I was unable to reproduce the compilation issue on this MR for iOS 13.0 until I locally changed the examples/api/src-tauri/gen/apple/project.yml to have a deployment target of 13.0.

If that is expected, that is fine as well, and I can work with that :) I would then like to publish a separate MR to the docs or guidelines explaining how the expected min versions for plugins are determined (for both iOS and Android).

I just want to make sure I understand if this is a defined expectation that all plugins support iOS 13.0 (and any higher deployment target is an exception), or if the deployment target is determined on a case-by-case basis.

Thanks!

Related discussion for NFC plugin: #1876

@FabianLars
Copy link
Member

C) Variable (each plugin may have a different deployment target as needed)

This. There's a baseline and individual plugins may increase that if needed.

I think our baseline is still considered to be 13.0 in the plugins even if new projects now target 14.0 by default. Not sure if we consider this a breaking change so changing the baselines may have to wait till v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants