Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Simulator can't pick .zip files #1148

Closed
1 of 4 tasks
stephanie-finch opened this issue Oct 12, 2022 · 19 comments
Closed
1 of 4 tasks

iOS Simulator can't pick .zip files #1148

stephanie-finch opened this issue Oct 12, 2022 · 19 comments
Labels
new issue An issue that hasn't yet been seen from the maintainer stale

Comments

@stephanie-finch
Copy link

Describe the bug
File picking doesn't appear to work on iOS 16 Simulator, although it appears to work in production for iOS 16. Simulator shows grayed out files. Android emulator can load .zip file.

We've tried with both file_picker v5.2.0+1 and file_picker v5.2.1.

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
iOS 16

How are you picking?

final FilePickerResult? result =
   await FilePicker.platform.pickFiles(
   type: FileType.custom,
   allowedExtensions: ['zip'],
);

Details to reproduce the issue
Try to pick .zip files from iOS 16 simulator. All .zip files are grayed out.

Error Log
No specific error gets logged.

Screenshots and/or video
image
image

Flutter Version details

[✓] Flutter (Channel stable, 3.0.1, on macOS 12.5.1 21G83 darwin-arm, locale
    en-US)
    • Flutter version 3.0.1 at /Users/stephanie/Dev/flutter
    • Upstream repository /~https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (5 months ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/stephanie/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = /Users/stephanie/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.72.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (3 available)
    • iPhone SE (3rd generation) (mobile) • 778DC228-3C3A-4283-8696-222CB486AFA5
      • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-0 (simulator)
    • macOS (desktop)                     • macos
      • darwin-arm64   • macOS 12.5.1 21G83 darwin-arm
    • Chrome (web)                        • chrome
      • web-javascript • Google Chrome 106.0.5249.103

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Additional context
n/a

@stephanie-finch stephanie-finch added the new issue An issue that hasn't yet been seen from the maintainer label Oct 12, 2022
@stefangaller
Copy link

I have a similar problem with Android and csv files. They are greyed out although I selected them like

final result = await FilePicker.platform.pickFiles(
  type: FileType.custom,
  allowMultiple: false,
  allowedExtensions: ['csv'],
);

@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Oct 22, 2022
@ralfeus
Copy link

ralfeus commented Oct 26, 2022

Have same issue:

final file = await FilePicker.platform.pickFiles(allowMultiple: false, withData: true);

@github-actions github-actions bot removed the stale label Oct 27, 2022
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Nov 4, 2022
@willyfromtheblock
Copy link

willyfromtheblock commented Nov 11, 2022

  FilePickerResult? result =
                              await FilePicker.platform.pickFiles(
                                   type: FileType.custom,
                                   allowedExtensions: [
                                     'csv'
                                   ],                                  );

Also does grey out on android 10. No selection possible.

@github-actions github-actions bot removed the stale label Nov 12, 2022
@okerivy
Copy link

okerivy commented Nov 17, 2022

FilePickerResult? result = await FilePicker.platform.pickFiles(
      type: FileType.custom,
      allowMultiple: true,
      allowedExtensions: ['gcode'],
    );

filter gcode files, also does grey out on iOS 15. No selection possible.

@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Nov 29, 2022
@ralfeus
Copy link

ralfeus commented Nov 29, 2022

The issue is still actual

@github-actions github-actions bot removed the stale label Nov 30, 2022
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Dec 7, 2022
@ralfeus
Copy link

ralfeus commented Dec 7, 2022

The issue is still actual

@github-actions github-actions bot removed the stale label Dec 8, 2022
@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Dec 16, 2022
@ralfeus
Copy link

ralfeus commented Dec 19, 2022

Still actual

@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Dec 28, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@willyfromtheblock
Copy link

this issue is not fixed, is it?

@ralfeus
Copy link

ralfeus commented Jan 17, 2023

It's not. Seems the maintainer has other priorities

@Chralu
Copy link

Chralu commented Mar 3, 2023

Hi,

the issue comes from iOS file management.

To get it working with non-natively handled file types, you must declare an uniform type identifier.

Quick example : accepting OPML files

Add these in your Info.plist file :

		<key>UTExportedTypeDeclarations</key>
		<array>
			<dict>
				<key>UTTypeIdentifier</key>
				<string>podcast.opml</string>
				<key>UTTypeConformsTo</key>
				<array>
					<string>public.xml</string>
				</array>
				<key>UTTypeDescription</key>
				<string>OPML ( Outline Processor Markup Language) is an XML format for outlines.</string>
				<key>UTTypeTagSpecification</key>
				<dict>
					<key>public.filename-extension</key>
					<array>
						<string>opml</string>
					</array>
				</dict>
			</dict>
		</array>
  1. UTTypeIdentifier value will be the value you use in your Flutter core. It seems that the value MUST follow the reverse-DNS format (a single segment value like opml doesn't work).
  2. public.filename-extension are file extension matching this filetype.

@anhtuan23
Copy link

The solution by @Chralu works. I think this should be added to the package's documentation.

@philenius
Copy link
Collaborator

@anhtuan23 and @Chralu, thank you, I documented it here /~https://github.com/miguelpruivo/flutter_file_picker/wiki/Troubleshooting#-issue-9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue An issue that hasn't yet been seen from the maintainer stale
Projects
None yet
Development

No branches or pull requests

8 participants