2

Checking [QLPreviewController canPreviewItem:item] for supported items, e.g. PDF files, returns false on iOS 13 but not on iOS 12. If you ignore this check and still attempt to display the item using QLPreviewController, you just get a screen displaying the file name (on iOS 12 the contents are displayed).

According to the official documentation, QLPreviewController still supports showing PDF files, so does anyone have a solution to this?

mattsson
  • 1,329
  • 1
  • 14
  • 30
  • 1
    I'm not able to reproduce the problem. I made a quick app that previews a PDF, and `QLPreviewController.canPreviewItem(_:)` returns `true` for the PDF's file URL on iOS 13. – TylerP Nov 02 '19 at 00:36

1 Answers1

2

I've found solution for this, iOS 13 will check if file exist or not in local path, while iOS 12 not, that's why they returned different.

matt
  • 515,959
  • 87
  • 875
  • 1,141
Kylin.Zhang
  • 103
  • 7