In the app that I am working I have files to be downloaded from a server and store it locally in the app's sandbox, then open it in iBooks using UIDocumentInteractionController
.
I have done it all the downloading, saving, and opening it to iBooks. But, there are times that when I download a file then open it to iBooks it is not implementing, iBooks is not opening but the delgates are read from willBeginSendingToApplication:
to didEndSendingToApplication:
to documentInteractionControllerDidDismissOpenInMenu:
(i put logs on it to check). Then if I restart the app it opens, then not open again, it is not consistent. What could be the problem?
Here my code for opening it to iBooks:
NSURL *url = [NSURL fileURLWithPath:filePath1];
DocController = [UIDocumentInteractionController interactionControllerWithURL:url];
DocController.delegate = self;
[DocController presentOpenInMenuFromRect:openIt.frame inView:menu animated:YES];