-
Notifications
You must be signed in to change notification settings - Fork 8
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
PDFs are not downloaded, but sharing dialog is opened instead #10
Comments
I see this is as designed:
Is there a particular limitation for PDF files in iOS? iOS can't handle them even when downloaded into Documents or Downloads folder? I'd be willing to give a shot with a PR if you point me in the right direction. |
From looking around, I believe this is a limitation of iOS. You are meant to provide user's with options on what they want to do with a document instead of forcing a download to a folder. Here's an example answer from Stack Overflow:
What can be done is that you can add the following keys to your info.plist: "UISupportsDocumentBrowser", "UIFileSharingEnabled", "LSSupportsOpeningDocumentsInPlace". and then any files you download through the app to the app's internal storage will be exposed to the user's My Files app. You will still not be able to directly download any files directly to the Downloads / Documents folders in My Files, but you could download a file to, say, MyApp/Documents/ which would be accessible in the My Files app. Hope that makes sense. This library can't control people's info.plist but we could make it possible to disable the Sharing dialog (if you are on iOS then the Sharing dialog wouldn't open, your file would be downloaded to MyApp/Documents/ in the My Files app, but you would be responsible for setting info.plist to expose the MyApp directory to users). I could add a configuration option to enable this method of downloading files for those who prefer it to the Sharing dialog. |
Hi. Thanks for the great library.
Tried to download a PDF, but it's not downloaded at all in iOS. The native iOS sharing dialog is opened instead.
The text was updated successfully, but these errors were encountered: