QLPreviewController only shows a gray screen with the filename

I have an iOS 8 app. When I run it on iOS 9, the QLPreviewController I use to display files (PDFs, Office docs, etc) no longer works. Instead, it only shows a gray screen with the filename. I am running iOS 9 beta 5.


Is anyone else seeing this behavior? Any known issues or workarounds?


Thanks!

Replies

That probably means the file is not found. Are you trying to display a file in your app's bundle or other folder using a hard-coded path instead of NSBundle -pathForResource or NSSearchPathForDirectoriesInDomains?

My app started having the same problem when iOS 9 was released; it's an app that has been in the app store for years. The app displays PDF documents just fine on iOS 7 and 8, but the app running on iOS 9 just shows a blank page. QLPreviewController apparently can find the file, which resides in the directory whose name is returned by NSTemporaryDirectory(), but nothing displays -- no document title, no document contents, nothing.


Anyone have any ideas?