TL;DR - I want to download a .csv and other files from a link, and present a UIActivityViewController.
I'm working in an app with lots of WKWebViews. In one of the delegate methods, decidePolicyForNavigationAction:
, the available URL is a URL compatible with URLRequests, and I can download just fine from it. (navigationAction.request.url
)
In another delegate method decidePolicyForNavigationResponse:
the response's url (navigationResponse.response.url
) identifies as part of Apple's QuickLook framework scheme, and contains this: x-apple-ql-magic
. I was trying to use a QLPreviewController
, but couldn't populate the dataSource with a remote file I wanted to download.
My goal is: When a link points to a downloadable file, like a .csv or PDF, give a user the option to share this file via UIActivityViewController
.
How can I download remote files from this scheme: x-apple-ql-magic
?