QLPreviewController broken in ios 11 - subview and app bundle directory.

I have submitted the following as a bug, but I thought it would useful for the dev community to have a test app to demonstrate the issue.


QLPreviewController behavior changed in recent releases of ios 11. It will fail to preview a file depending on if the files are located in the main bundle or possibly the caches folder . Further the QLPreviewController will no longer reliably display files when used as a subview.


Steps to Reproduce:


1) build test app found at https://github.com/vinthewrench/QLPreviewTest


2) run on device - select a variety of sample numbers files.


3) Try again using "Use NSCachesDirectory" and "Use SubView" options



Expected Results: 1) file should display with Use SubView option.



Actual Results: 1) when running with NSCachesDirectory option off, we get the following log message. [default] Couldn't issue file extension for url: file:/


if you preview from the NSCachesDirectory (must copy the file there) a file will preview..


2) try the NSCachesDirectory on and Use Subview ON. The app preview will fail and you will get multiple log entries of [default] View service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} #Remote


Version/Build: Version 9.2 (9C40b) iOS 11.2.2 (15C202) Configuration: Model: iPhone 8 (Model A1863, A1905, A1906, A1907)

Replies

I'm also facing this issue on iOS 11.2.5. It is working on fine for all other version's of iOS.


Is there any other solution for it?

Same issue at my end on ios 11.2.3 and ios 11.2.6


Apple, will when you will fix this????????

Same happens to me, any updates on this?