0

I am trying to find a way to present a document, file, image (anything that's within the iCloud Drive folder) to a user from the file's URL.

Let's say that I present a document picker to the user with the regular UIDocumentPickerViewController and the user selects a document.

With the UIDocumentPickerDelegate's didPickDocumentAt url: URL I get the selected file/document URL and I store it somewhere.

Later I want to present the selected document based on that stored URL, what's the best way to do it?

I have tried UIDocumentBrowserViewController but I don't think I can achieve it with that (or I might have done it wrong).

Can someone point me in the right direction?

Ivan Cantarino
  • 3,058
  • 4
  • 34
  • 73
  • If a file is an Image or a PDF I can show it within a `WKWebView` but the file could be of any type and I want to avoid the type check of it. – Ivan Cantarino Dec 29 '19 at 11:11

1 Answers1

0

I have found a solution for this by using QuickLook

I have followed the answer from this post.

Open and View Document file Url

Ivan Cantarino
  • 3,058
  • 4
  • 34
  • 73