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] Picking live photos not properly working on iOS 17. #1367

Closed
1 of 4 tasks
GabrielAraujo opened this issue Sep 7, 2023 · 3 comments
Closed
1 of 4 tasks

[iOS] Picking live photos not properly working on iOS 17. #1367

GabrielAraujo opened this issue Sep 7, 2023 · 3 comments
Labels
new issue An issue that hasn't yet been seen from the maintainer stale

Comments

@GabrielAraujo
Copy link

Recently taken or older from iCloud live photos, are failing to load the file representation using public.item UTI type on iOS 17 Beta.

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
iOS 17

How are you picking?

final pickerResult = await FilePicker.platform.pickFiles(
          type: MediaType.image,
          allowMultiple: true,
          allowCompression: true,
        );

Details to reproduce the issue

  1. Take live photos
  2. Try to select those from your app
  3. Process fails and exception is returned

Error Log

***** Could not load the picked given file: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.item" UserInfo={NSLocalizedDescription=Cannot load representation of type public.item, NSUnderlyingError=0x28282de30 {Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." UserInfo={NSUnderlyingError=0x2829c7540 {Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 1220 on anonymousListener or serviceListener" UserInfo={NSDebugDescription=connection from pid 1220 on anonymousListener or serviceListener}}}}}

Flutter Version details

[!] Flutter (Channel unknown, 3.7.8, on macOS 13.5.1 22G90 darwin-arm64, locale en-BR)
    ! Flutter version 3.7.8 on channel unknown at /Users/gabrielaraujo/fvm/versions/3.7.8
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    • Framework revision 90c64ed42b (6 months ago), 2023-03-21 11:27:08 -0500
    • Engine revision 9aa7816315
    • Dart version 2.19.5
    • DevTools version 2.20.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/gabrielaraujo/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_HOME = /Users/gabrielaraujo/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2021.3)
    • 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.13+0-b1751.21-8125866)

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

[✓] Connected device (3 available)
    • SM G990E (mobile) • RQCTA013LRL • android-arm64  • Android 13 (API 33)
    • macOS (desktop)   • macos       • darwin-arm64   • macOS 13.5.1 22G90 darwin-arm64
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 116.0.5845.179
    ! Error: Could not locate device support files. You may be able to resolve the issue by installing the latest version of Xcode from the Mac App Store or developer.apple.com.

      [missing string: 869a8e318f07f3e2f42e11d435502286094f76de] (code 2)

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

Additional context
I've replaced the public.item to public.image on loadFileRepresentationForTypeIdentifier and it seems to work just fine.
Also found this thread that had a similar issue, I've posted there too but it is still under review.

@GabrielAraujo GabrielAraujo added the new issue An issue that hasn't yet been seen from the maintainer label Sep 7, 2023
@GabrielAraujo GabrielAraujo changed the title [iOS] Live photos not properly working on iOS 17. [iOS] Picking live photos not properly working on iOS 17. Sep 7, 2023
@GabrielAraujo
Copy link
Author

GabrielAraujo commented Sep 7, 2023

Maybe we could think on using the type parameter also on the didFinishPicking method to use public.image or public.audiovisual-content as per this documentation depending on the selected media type.

@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 Sep 15, 2023
@github-actions
Copy link

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

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

1 participant