Skip to content

file_selector_macos allowedFileTypes macOS 12 deprecation warnings #194573

Closed
flutter/packages
#13302

Description

@jmagman
Testing failed:
	'allowedFileTypes' was deprecated in macOS 12.0: Use -allowedContentTypes instead
	'allowedFileTypes' was deprecated in macOS 12.0: Use -allowedContentTypes instead

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8667789976909121041/+/u/Run_package_tests/native_test/stdout

@__swiftmacro_11RunnerTests0022RunnerTestsswift_tiAIefMX260_4_6expectfMf_.swift:1:38: error: 'allowedFileTypes' was deprecated in macOS 12.0: Use -allowedContentTypes instead
Testing.__checkBinaryOperation(panel.allowedFileTypes,{ $0 == $1() },["txt", "json", "public.text", "public.image"],expression: .__fromBinaryOperation(.__fromSyntaxNode("panel.allowedFileTypes"),"==",.__fromSyntaxNode(#"["txt", "json", "public.text", "public.image"]"#)),comments: [.__line("// On the legacy path, the allowedFileTypes should be set directly.")],isRequired: false,sourceLocation: Testing.SourceLocation.__here()).__expected()
                                     ^
/Volumes/Work/s/w/ir/x/w/packages/packages/file_selector/file_selector_macos/example/macos/RunnerTests/RunnerTests.swift:261:5: note: in expansion of macro 'expect' here
    #expect(panel.allowedFileTypes == ["txt", "json", "public.text", "public.image"])
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/file_selector/file_selector_macos/example/macos/RunnerTests/RunnerTests.swift:261:5: note: in expansion of macro 'expect' here
    #expect(panel.allowedFileTypes == ["txt", "json", "public.text", "public.image"])
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/packages/packages/file_selector/file_selector_macos/example/macos/RunnerTests/RunnerTests.swift:261:19: error: 'allowedFileTypes' was deprecated in macOS 12.0: Use -allowedContentTypes instead
    #expect(panel.allowedFileTypes == ["txt", "json", "public.text", "public.image"])

Note this isn't currently being caught in CI due to #194517

Activity

  1. self-assigned this
    on Oct 16, 2026
  2. github-actions commented on Nov 2, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  3. locked as resolved and limited conversation to collaborators on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

p: file_selectorThe file_selector pluginplatform-macosBuilding on or for macOS specificallyteam-macosOwned by the macOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions