pdfios11freezepreviewuidocumentinteractioncontroller

ios11 UIDocumentInteractionController presentPreviewAnimated freezes the app


I've an issue with my iPad app on iOS11 when I want to show a preview of PDF files with this code :

self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:urlPathToDocument]];
[self.documentInteractionController setDelegate:self];
[self.documentInteractionController presentPreviewAnimated:YES];

This app freezes and I have to kill the app, she doesn't crash, and no error is shown.

On iOS10, no problem, the preview of the PDF file is shown perfectly without freeze the app.

I've tried to put this code in a dispatch_async bloc, but no change.

Could you help me ? Thank you.


Solution

  • It seems to be a bug on my iPad, after 2 reboots, the problem seems to be resolved