Skip to content

onFileLoading callback is not triggered in iOS and works fine with Android #1897

@KS6281

Description

@KS6281

Describe the bug

  • The onFileLoading Callback is not triggered when I select the files in iOS from the device files, but it is working in Android
  • The File was selected from iCloud, Downloads and Google Drive in iOS

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
What version did it happen?
iOS Version 18.6.2

How are you picking?

await FilePicker.platform.pickFiles(onFileLoading: (FilePickerStatus filePickerStatus) async {
    If (filePickerStatus == FilePickerStatus.picking) {
        // Handle showing progress dialog if it takes time to cache the selected file
     }
 });

Details to reproduce the issue
Run the above code in any flutter project in iOS

Error Log
NA

Screenshots and/or video
NA

Flutter Version details
Please, post the output of your flutter doctor -v, preferably, while running the issued device/simulator.

[✓] Flutter (Channel stable, 3.24.3, on macOS 14.7.8 23H730 darwin-arm64, locale en-US)
    • Flutter version 3.24.3 on channel stable at /Users/ks6281/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (1 year, 1 month ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/ks6281/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/ks6281/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

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

[✓] Android Studio (version 2024.1)
    • 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 17.0.11+0-17.0.11b1207.24-11852314)

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

[✓] VS Code (version 1.94.2)
    • VS Code at /Users/ks6281/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.112.0

[✓] Connected device (4 available)
    • Kavya (mobile)                  • 00008130-001E74AE11FA001C • ios            • iOS 18.6.2 22G100
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.7.8 23H730 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.7.8 23H730 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 141.0.7390.66

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Additional context
NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    new issueAn issue that hasn't yet been seen from the maintainer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions