QLPreviewProvider
A class that you subclass to provide a data-based Quick Look preview extension.
Declaration
class QLPreviewProviderOverview
When you subclass QLPreviewProvider, conform your subclass to QLPreviewingController.
To provide a data-based Quick Look extension, make the following modifications to your Info.plist file:
Set the Boolean key
QLIsDataBasedPreviewtotrue.Add the type identifiers for your extension’s supported content types to the
QLSupportedContentTypesarray.Change the value of
NSExtensionPrincipalClassto the name of your subclass. For example, if you named your subclassPreviewProvider, set the value to$(PRODUCT_MODULE_NAME).PreviewProvider.
After updating the extension’s Info.plist file, implement the providePreview(for:completionHandler:) method to return a QLPreviewReply for the provided QLFilePreviewRequest.