My application has a document interaction controller that is used to open documents in other applications. The following code displays a button that opens the "Open in" menu and allows the user to open the file in other applications - that is, "Send by mail" if the user selected a mail application in the "Open" menu, a new letter created by the mail application and automatically attaches the file to the body mail.
The following code worked fine on iOS7, but worked fine on iOS8 +. Files are not attached to emails, and I get an error log message.
Declaration for UIDocumentInteractionController:
@property (nonatomic, strong) UIDocumentInteractionController* interactionController;
Initialization:
self.interactionController = [UIDocumentInteractionController interactionControllerWithURL:self.url]; self.interactionController.delegate = self; self.interactionController.name = self.file.name;
Call the menu "Open in:
[self.interactionController presentOpenInMenuFromBarButtonItem:self.openInBarButtonItem animated:YES];
Example error message received after opening the excel file:
Unknown activity objects: ({msgstr "000000>;}," ")
viewServiceDidTerminateWithError: error Domain = _UIViewServiceInterfaceErrorDomain Code = 3 "Operation could not be completed. (Error _UIViewServiceInterfaceErrorDomain 3.)" UserInfo = 0x ... {Message = Service Connection Interrupted} (lldb).
I would be grateful for any ideas to fix this problem.
Thanks Ori
source share