Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
801 views
in Technique[技术] by (71.8m points)

ios - UIDocumentInteractionController not available in Mac catalyst

May app getting crash when execute below code.

Code: self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:targetURL];

Crash log: Terminating app due to uncaught exception 'NSGenericException', reason: 'UIDocumentInteractionController not available'

is there any solution for this issue or any alternative class?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It’s not available in Catalyst, despite what the docs say.

You could explore using an AppKit alternative (QLPreviewPanel), but you’ll have to do some hacking to get it to work from a Catalyst app: https://stackoverflow.com/a/32814132/1601849


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...