Issue Displaying bundled PDF with UIDocumentInteractionController
Originator: | yonic.surny | ||
Number: | rdar://36613086 | Date Originated: | 18-Jan-2018 11:08 AM |
Status: | Closed | Resolved: | |
Product: | iOS+SDK UIKit | Product Version: | iOS 11.2.2 |
Classification: | Bug | Reproducible: | Always |
Area: UIKit Summary: On iOS 11 UIDocumentInteractionController fails to display bundled PDF documents. Steps to Reproduce: Add a PDF to the bundle of the app. Execute the following code: NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"terms_and_conditions" withExtension:@"pdf"]; UIDocumentInteractionController *documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:pdfURL]; documentInteractionController.delegate = self; [documentInteractionController presentPreviewAnimated:YES] Expected Results: The PDF document preview should display. Actual Results: A grey screen is displayed with the title of the file. There is the following message in the console: 2018-01-18 10:54:06.344949+0100 MyApp[290:7862] [default] Couldn't issue file extension for url: file:///var/containers/Bundle/Application/594ED551-1AD1-4298-B0EF-90A8E75A706A/ChronometerGame.app/terms_and_conditions.pdf #PreviewItem Version/Build: iOS 11.2.2 Configuration: Debug & Release --- DUPLICATE OF 35467170
Comments
Please note: 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!
Apple Developer Relations / February 27 2018, 8:30 AM
Engineering has determined that your bug report is a duplicate of another issue and will be closed.
The open or closed status of the original report your bug was duplicated to appears in a text box within the bug detail section of the bug reporter user interface. For security and privacy reasons, we don't provide access to the original bug yours was duped to.
If you have any questions or concerns, please update your report directly at this link: https://bugreport.apple.com/.
Yonic SURNY / February 15 2018, 10:26 AM
Hi again, I've created a sample project on GitHub at https://github.com/saeros/radar-UIDICPDF. Every PDF I've tried so far doesn't show on iOS 11 (no problem on iOS 10).
Yonic SURNY / February 15 2018, 9:46 AM
Please find the PDF document attached to this comment.
Apple Developer Relations / February 15 2018, 4:36 AM
Can you please attach a copy of the PDF that was causing the gray screen? Thank you!