UIDocumentInteractionController not available

When I call [UIDocumentInteractionController interactionControllerWithURL:] in a Mac Catalyst app, the follow message appears in the debugger console, after which an exception is thrown:


[General] UIDocumentInteractionController not available


According to the documentation UIDocumentInteractionController and its interactionControllerWithURL class method are available in Mac Catalyst 13.0+. The code has been working just fine in iOS for a long time (and still works fine in iOS 13 on an iPad or iPhone).


Has anyone else encountered this? What is the solution to make UIDocumentInteractionController work in the Mac app? Or, is the documentation incorrect and an alternative is needed?

Yep.. I have the same error and crash:


2019-11-21 14:48:07.003967+0300 xxxxxx[8123:222013] [General] UIDocumentInteractionController not available

2019-11-21 14:48:07.013745+0300 xxxxxx[8123:222013] [General] (

0 CoreFoundation 0x00007fff33b8ef53 __exceptionPreprocess + 250

1 libobjc.A.dylib 0x00007fff69c54835 objc_exception_throw + 48

2 CoreFoundation 0x00007fff33b8eda9 +[NSException raise:format:] + 189

Reported via Feedback Assistant: FB7468380

Yeah, they mention this in the release notes.


Catalyst apps using

UIDocumentInteractionController
might quit unexpectedly. You can work around this issue by excluding
UIDocumentInteractionController
functionality with target macros. (48878552)


As a work around for my problem, we pushed files to the Downloads folder when exporting.

This is mentioned in which release notes?


Edit: I see it in the release notes for macOS 10.15, but no mention of it in the release notes for macOS 10.15.1 (in which the problem persists). It's also not clear if that note refers to precisely the same issue I'm experiencing.


Thanks.

i have face same problem, have you find any solution? Please help me.

i am face same error

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIDocumentInteractionController not available'
terminating with uncaught exception of type NSException

please provide any solution

UIDocumentInteractionController not available
 
 
Q