I am trying to display a preview of files (like PDF, Pages, Microsoft Docs) in my SwiftUI application for MacOS.
I found Apple's QuickLook framework, which looks perfect for that use. Can I use it in SwiftUI? If I look up the documentation at Apple, I find the QLPreviewController
which is a UIViewController.
My approach would, to wrap that UIViewController into a SwiftUI view.. is that the best way? Has anyone tried to do that already?
Summary: how can I display file previews in my SwiftUI MacOS app?