UIDocumentInteractionController with non-standard file types


Steve Mills
 

My iOS app has 2 custom UTIs declared in the Imported UTIs section, and 3 Document Types (those 2, plus pdf). When I try to share a file (doesn't matter if the URL's UTI is one of the custom types or pdf), it presentOpenInMenuFromBarButtonItem:animated: fails. If I use presentOptionsMenuFromBarButtonItem:buttonItem:animated:, it works.

This is all in the simulator, so there might not be any apps that Open In will work with. The files are in my app's Documents dir. I have the delegate set to my view controller, and I implemented ALL UIDocumentInteractionControllerDelegate the methods so I could log which ones get called. None get called when I use the OpenIn version. Here are the messages in the simulator's log when I use the OptionsMenu version. Could it be an entitlements problem?

Jul 11 16:49:52 MN5669AM007052 Box of Fun[69053]: UIDocumentInteractionControllerDelegate implements legacy action methods. Please remove them.
Jul 11 16:49:52 MN5669AM007052 Box of Fun[69053]: can perform print:
Jul 11 16:49:52 MN5669AM007052 Box of Fun[69053]: can perform copy:
Jul 11 16:49:52 MN5669AM007052 Box of Fun[69053]: can perform saveToCameraRoll:
Jul 11 16:49:53 MN5669AM007052 Box of Fun[69053]: will present options
Jul 11 16:49:55 MN5669AM007052 pkd[33271]: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
Jul 11 16:49:55 MN5669AM007052 pkd[33271]: SecTaskCopyDebugDescription: Box of Fun[69053]
Jul 11 16:49:55 MN5669AM007052 Box of Fun[69053]: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=69053
Jul 11 16:49:55 MN5669AM007052 Box of Fun[69053]: SecTaskCopyDebugDescription: Box of Fun[69053]
Jul 11 16:49:59 MN5669AM007052 Box of Fun[69053]: presented open in
Jul 11 16:50:06 MN5669AM007052 assertiond[33257]: assertion failed: 14F2411 13C75: assertiond + 13207 [792516D1-991E-36EE-8454-16F8220758D6]: 0x1

Sent from iCloud's ridiculous UI, so, sorry about the formatting

Join cocoa@apple-dev.groups.io to automatically receive all group messages.