KasemJaffer / receive_sharing_intent

A Flutter plugin that enables flutter apps to receive sharing photos, text and url from other apps.
Apache License 2.0
334 stars 395 forks source link

Not able to share a file from Acrobat Reader on IOS #327

Open DinkoPetrovTinqin opened 1 month ago

DinkoPetrovTinqin commented 1 month ago

Issue

The library does not receive the correct file name when I try to share a PDF file from the Adobe Acrobat Reader on IOS.

Steps to reproduce

  1. Install Adobe Acrobat Reader from App Store
  2. Download some PDF file for example this one: https://pdfobject.com/pdf/sample.pdf
  3. Open the file with Adobe Acrobat Reader
  4. Press the three dots in the top-right corner
  5. Select the "Send a copy" button
  6. Select the application with the implemented "receive_sharing_intent" library

Behaviour

I received "Shared via Adobe Acrobat. Get the app to edit, sign, and share PDF files: https://adobeacrobat.app.link/getApp" as a path name of the first file in the list of files returned in getMediaStream().listen((List value) method.

ReceiveSharingIntent.instance.getMediaStream().listen((List value) async { for (final file in value) { print(file.path); } }

Expectation

I should receive the correct file path "/private/var/mobile/Containers/Shared/AppGroup/C8E948A0-DBB6-47FD-A556-5805FDF1170D/Welcome.pdf".

Preconditions

  1. IOS 17
  2. receive_sharing_intent 1.8.0
Nightbl927 commented 1 month ago

Please add more information such as what you do receive instead of the expected value (if anything).

Are you able to receive any other values such as URLs, Images, etc.

DinkoPetrovTinqin commented 1 month ago

Hi, Thank you for the fast response.

When I press the "Send a copy" button from Adobe Acrobat Reader and select our application, the getMediaStream().listen method is triggered correctly. I received a list of one file, as expected, but the path of the file is incorrect. Instead of the real path "/private/var/mobile/Containers/Shared/AppGroup/C8E948A0-DBB6-47FD-A556-5805FDF1170D/Welcome.pdf" I get this string: "Shared via Adobe Acrobat. Get the app to edit, sign, and share PDF files: https://adobeacrobat.app.link/getApp". When I test the same event from Adobe Acrobat Reader and choose a different app, it is handled correctly, and I can see the file. Also if I try to share a file from File Explorer or other apps ("Teams", "Gmail"...etc) to our app, I receive the correct path for the file in the listener of the getMediaStream method. The problem occurs only when I try to share a file from Adobe Acrobat Reader to our application.

If you need more details feel free to contact me. Best regards, Dinko

Nightbl927 commented 1 month ago

@DinkoPetrovTinqin unfortunately, I have not been able to get to this yet. Will try it out hopefully some time this week.