flutter_file_picker
flutter_file_picker copied to clipboard
File Picker Unresponsive on iOS Simulator - Critical for Development
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
- Launch the app on an iOS device.
- Trigger the file picker using the code snippet above.
- 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_pickerpackage to the latest version (10.1.9). - Cleaning and rebuilding the project (
flutter cleanandflutter build). - Verifying that all necessary permissions are set in the
Info.plistfile, includingNSPhotoLibraryUsageDescription.
Looking forward to your feedback. Thank you.
same issue +1
Same issue ++
same issue
Up
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.
same issue
up
This issue come when i pass in Podfile "platform :ios, '13.0'" to "platform :ios, '14.0'"
This issue is stale because it has been open for 7 days with no activity.
I have this same issue
Same issue