I implemented a UIDocumentInteractionController to send files to other apps. The file is a .txt file.
Here's the code:
UIDocumentInteractionController *interactionController = [[UIDocumentInteractionController alloc] init];
[interactionController setURL:[NSURL fileURLWithPath:filePath]];
[interactionController setUTI:@"public.text"];
[interactionController setDelegate:self];
[interactionController presentOpenInMenuFromBarButtonItem:actionBarButtonItem animated:YES];
The menu opens fine, showing apps like Pages, Dropbox, etc. as I expect. But when I tap one of them, the Open In menu dismisses and no action is performed (the file is not sent and the target application never opens.
I tried implementing the delegate methods documentInteractionController:canPerformAction:
and documentInteractionController:performAction:
for triggering copy: and print: calls using the options menu (as opposed to the open in menu) and that pulled up a menu with only Pages listed, but that still did not work.
How might this be resolved?