diff --git a/MinecraftPackagePreviewExtension/PreviewProvider.swift b/MinecraftPackagePreviewExtension/PreviewProvider.swift deleted file mode 100644 index 01d0d8b..0000000 --- a/MinecraftPackagePreviewExtension/PreviewProvider.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// PreviewProvider.swift -// MinecraftPackagePreviewExtension -// -// Created by John Burwell on 2026-05-27. -// - -import Cocoa -import Quartz - -class PreviewProvider: QLPreviewProvider, QLPreviewingController { - - - /* - Use a QLPreviewProvider to provide data-based previews. - - To set up your extension as a data-based preview extension: - - - Modify the extension's Info.plist by setting - QLIsDataBasedPreview - - - - Add the supported content types to QLSupportedContentTypes array in the extension's Info.plist. - - - Change the NSExtensionPrincipalClass to this class. - e.g. - NSExtensionPrincipalClass - $(PRODUCT_MODULE_NAME).PreviewProvider - - - Implement providePreview(for:) - */ - - func providePreview(for request: QLFilePreviewRequest) async throws -> QLPreviewReply { - - //You can create a QLPreviewReply in several ways, depending on the format of the data you want to return. - //To return Data of a supported content type: - - let contentType = UTType.plainText // replace with your data type - - let reply = QLPreviewReply.init(dataOfContentType: contentType, contentSize: CGSize.init(width: 800, height: 800)) { (replyToUpdate : QLPreviewReply) in - - let data = Data("Hello world".utf8) - - //setting the stringEncoding for text and html data is optional and defaults to String.Encoding.utf8 - replyToUpdate.stringEncoding = .utf8 - - //initialize your data here - - return data - } - - return reply - } -}