When I try to open a pdf file using UIDocumentInteractionController all installed apps that can handle PDF's gets presented. If I pick the Mail app it works as intended and the file gets attached to a new mail, but every other app fails. If I try to share a document from DropBox to a PDF-viewer it works.
The code I'm using:
- (void)presentOptionsForFilename:(NSString *)path {
NSURL *url = [NSURL fileURLWithPath:path];
if (url) {
self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL: url];
if (self.documentInteractionController != nil) {
self.documentInteractionController.delegate = self;
[self.documentInteractionController presentOptionsMenuFromRect:CGRectZero
inView:self.view
animated:YES];
}
}
}
Every time I pick an app that is not Mail I get these entries in the device console. I don't they are related to the issue as they also get there when I open a pdf from DropBox where it works.
Sep 3 12:37:13 <devicename>-iPad com.apple.mdt[262] <Notice>: Copy /var/mobile/Applications/80BC2CCF-E49A-4800-8005-30DD304701CF/tmp/DBExportDir/Getting Started.pdf -> /private/var/mobile/Applications/3374FC4A-D57F-476E-ABC9-94A2484343D6/Documents/Inbox
Sep 3 12:37:14 <devicename>-iPad wirelessproxd[36] <Notice>: (Note ) stopped advertising for sharingd
Sep 3 12:37:14 <devicename>-iPad wirelessproxd[36] <Notice>: (Error) error event: (<OS_xpc_error: <error: 0x192c3bdc8> { count = 1, contents =
"XPCErrorDescription" => <string: 0x192c3c0d0> { length = 18, contents = "Connection invalid" }