Skip to content

[file_selector] openFile and openFiles without acceptedTypeGroups don't allow selecting files on iOS #132211

@mgenware

Description

@mgenware

Is there an existing issue for this?

Use case

I use file_selector's openFile() and openFiles() to pick up files. They work fine on Windows and Android. But on iOS, it shows a popup that no files can be selected:

image

Turns out you need to pass a public.item type identifier as acceptedTypeGroups:

[
  const XTypeGroup(uniformTypeIdentifiers: ['public.item'])
]

Proposal

It makes no sense to open a file selector that cannot pick up any files. The public.item type identifier on iOS should be default if acceptedTypeGroups is empty. This makes sure that the same function call results in the same behavior on different platforms.

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listp: file_selectorThe file_selector pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions