Flutter_file_picker: iOS not running onFileLoading function

Created on 8 Jan 2021  Â·  5Comments  Â·  Source: miguelpruivo/flutter_file_picker

On the latest iOS on iPhone XS, the onFileLoading function is not being executed. On the Android side, it is.

No filter, I have toyed with a couple of different settings but am currently with:

FilePickerResult result = await FilePicker.platform.pickFiles(
        onFileLoading: (FilePickerStatus progress) {

          print('progress 3' + progress.toString());
          return progress;
        },
          withData: false,
          allowMultiple: false,
          allowCompression: false,
          type: FileType.video
)

Error Log
There is no error log. When picking a file on Android, it prints 'progress 3,' with the correct picked status, while on iOS it doesn't (it prints nothing).
progress 3FilePickerStatus.picking
progress 3FilePickerStatus.done

Flutter Version details
flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-US)
• Flutter version 1.22.5 at /Users/briankozik/flutter
• Framework revision 7891006299 (4 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/briankozik/Library/Android/sdk
• Platform android-30, build-tools 29.0.3
• ANDROID_HOME = /Users/briankozik/Users/briankozik/Library/Android/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
• CocoaPods version 1.10.0

[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (3 available)
• Pixel XL (mobile) • HT71R0200010 • android-arm64 •
Android 10 (API 29)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 •
Android 10 (API 29) (emulator)
• Brian’s iPhone (mobile) • 00008020-000E1D063691002E • ios •
iOS 14.0.1

Additional context
I saw an old issue https://github.com/miguelpruivo/flutter_file_picker/issues/279 that looked to be where the fix was put in. I'm not sure if it's a regression from working on iOS in the past or if I am doing something wrong.

Thanks!

bug iOS

All 5 comments

Hi @bkoznov, is this still an issue? Does that happen only with iOS 14?

Yes, it is still an issue. I unfortunately don't have access to an older device at the moment to see if it also affects 13.

I have the same issue with both 2.0.11 and 2.1.5

I got this related error while picking a video file from the iOS device gallery :

flutter: [MethodChannelFilePicker] Platform exception: PlatformException(file_picker_error, Temporary file could not be created, null, null)

Screenshot 2021-01-27 at 3 10 57 PM

Fixed with 2.1.6. 🎉

Thank you for reporting.

Was this page helpful?
0 / 5 - 0 ratings