||Date Originated:||20 Jun 2013|
According to the QLPreviewItem Protocol Reference for iOS:
"If the item is not available for preview, this property’s getter method should return nil. In this case, the Quick Look preview controller displays a “loading” view."
If you return nil for the previewItemURL as suggested the app is terminated with an exception.
Steps to Reproduce:
- Run the provided sample app on iOS 6 or iOS 7 simulator
- Push the Button
The preview controller should appear and display a spinning activity indicator.
Immediately after appearing the preview controller throws an exception which differs by iOS version:
iOS 6: 'setObjectForKey: key cannot be nil'
iOS 7: '-[NSURL initFileURLWithPath:]: nil string parameter'
The same code worked without issue on iOS 5.
Sample Code: QuickLookBug at https://github.com/cocoanetics/radarsamples
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!