flutter_file_picker icon indicating copy to clipboard operation
flutter_file_picker copied to clipboard

File Picker Unresponsive on iOS Simulator - Critical for Development

Open shinesoftware opened this issue 6 months ago • 1 comments
trafficstars

https://github.com/user-attachments/assets/375ae84d-029b-42af-8594-d25a481c7247

Describe the bug When using the file_picker package on iOS, the file picker interface opens, but it becomes unresponsive, making it impossible to select any file. This issue persists despite having the correct permissions set in the Info.plist file.

Platform

  • iOS

Platform OS version Tested on iOS 18.4.1 (real device).

How are you picking?

// Handles saving a profile image
void _onSaveImageProfile(
    OnSaveImageProfile event, Emitter<ProfileState> emit) async {
  try {
    final permission = await Permission.photos.status;
    if (!permission.isGranted) {
      final requestResult = await Permission.photos.request();
      if (!requestResult.isGranted) {
        emit(ProfilePhotoStateImageNotAllowed<T>());
        return;
      }
    }
    FilePickerResult? result = await FilePicker.platform
        .pickFiles(allowMultiple: false, type: FileType.image);

    if (result != null) {
      File file = File(result.files.single.path!);
      emit(ProfilePhotoStateImagePicked<T>(file: file));
    } else {
      emit(ProfilePhotoStateCanceled<T>());
    }
  } catch (_) {
    emit(ProfilePhotoStateImageNotAllowed<T>());
  }
}

Details to reproduce the issue

  1. Launch the app on an iOS device.
  2. Trigger the file picker using the code snippet above.
  3. The picker interface appears but becomes unresponsive, preventing any file selection.

Error Log No specific error is shown in the console.

Screenshots and/or video I have attached a video demonstrating the issue.

Flutter Version details

  • Flutter version: 3.27.1
  • Dart version: 3.6.0
  • Gradle version: 8.10.2
  • Kotlin version: 1.9.24
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.27.1, on macOS 13.2.1, locale en-US)
    • Flutter version 3.27.1 on channel stable at /path/to/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c15d773, 2025-05-15 09:34:56 -0700
    • Engine revision a45b5b
    • Dart version 3.6.0
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.79.2)
[✓] Connected device (3 available)

Additional context

  • The issue occurs only on the iOS simulator. On my iPhone 16 Pro (real device), it works correctly.
  • This is not a blocking problem for app release but is necessary to resolve for ongoing development.

I have tried the following solutions without success:

  • Updating the file_picker package to the latest version (10.1.9).
  • Cleaning and rebuilding the project (flutter clean and flutter build).
  • Verifying that all necessary permissions are set in the Info.plist file, including NSPhotoLibraryUsageDescription.

Looking forward to your feedback. Thank you.

shinesoftware avatar May 16 '25 13:05 shinesoftware

same issue +1

Adherentman avatar Jun 13 '25 03:06 Adherentman

Same issue ++

Collins-01 avatar Jun 20 '25 12:06 Collins-01

same issue

lukkaempf avatar Jul 20 '25 20:07 lukkaempf

Up

shinesoftware avatar Jul 21 '25 13:07 shinesoftware

I encountered the same issue when I set config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "i386 arm64" in the Podfile, and also in ShareExtension → Build Settings → Excluded Architectures → Any iOS / iOS Simulator SDK to i386 arm64.

dyno-nexsoft avatar Aug 15 '25 07:08 dyno-nexsoft

same issue

ERICAntoine avatar Aug 18 '25 18:08 ERICAntoine

up

ERICAntoine avatar Aug 19 '25 15:08 ERICAntoine

This issue come when i pass in Podfile "platform :ios, '13.0'" to "platform :ios, '14.0'"

ERICAntoine avatar Aug 19 '25 15:08 ERICAntoine

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

github-actions[bot] avatar Sep 19 '25 02:09 github-actions[bot]

I have this same issue

JenningsCarpenter avatar Nov 04 '25 15:11 JenningsCarpenter

Same issue

Chun-Bae avatar Nov 07 '25 09:11 Chun-Bae