Check out this link: https://developer.apple.com/documentation/quicklookthumbnailing/providing_thumbnails_of_your_custom_file_types?language=objc"To add a Thumbnail Extension to your app, select your project in Xcode’s Project navigator and make sure the General pane is visible. Select the + button and add a new Thumbnail extension to your app. Make sure to allow Xcode to create and activate a new build scheme for the extension."
I finally managed to get the extension working under iOS12! I did the following:1 - recreate from scratch the thumbnail extensionwith the Xcode 11.2 extension wizard2 - change its deployment target to iOS 123 - change the extension plist to match the document type supported and the extension class4 - link the extension with QuickLook framework as required and QuickLookThumbnailing as optionalYEAH!Libe
Hello,I do not use any of the deprecated functions. What I am using is an implementation of a QLThumbnailProviderAPI_AVAILABLE(ios(11.0), macos(10.15)) API_UNAVAILABLE(tvos, watchos) __attribute__((visibility("default")))
@interface QLThumbnailProvider : NSObject
/**
Subclass this method to provide a QLThumbnailReply that either contains a drawing block or an image file URL.
@param request An object which contains information about the thumbnail that should be provided. It contains the URL of the file to provide a thumbnail for.
@param handler Call the completion handler with a QLThumbnailReply if you can provide a thumbnail, or with an NSError if you cannot.
If an error is passed or reply is nil, no thumbnail will be drawn.
The handler can be called asynchronously after the method has returned.
*/
- (void)provideThumbnailForFileRequest:(QLFileThumbnailRequest *)request completionHandler:(void (^)(QLThumbnailReply * _Nullable reply, NSError * _Nullable error))handler NS_SWIFT_NAME(provideThumbnail(for:_:));
@enddefined in QuickLookThumbnailing/QThumbnailProvider.h framework under iOS13. The same class is defined in QuickLook framework under iOS12.I tried optional linking but does not work: extension is not called.I also tried importing the QuickLook module and then the QuickLookThumbnailing one by using the @import statement in code with the Automatic Link Framework option on but the extension is still never called under iOS12...I deeply regret having heavily invested into UIDocumentBrowserViewController...it's super broken on basic capabilities like this one... 😟Libero
Hello,thanks for your quick answer, I understand your point. From my understanding, all the thumbnail functionalities have been moved into a separated framework in iOS13 (from QuickLook to QuickLookThumbnailing) to be able to share it on macOS but I did not get that this removed support for iOS12...Does anybody know how to support thumbnailing on both iOS12 and iOS13? I tried to link QuickLook as required and QuickLookThumbnailing as optional but I still cannot get the extension called under iOS12.Thanks in advance for your help,Libero