I'm implementing the 'new' QLThumbnailProvider for our macOS app...
So I just created the skeleton from Xcode, added our QLSupportedContentTypes in Info.plist, and have the skeleton code like below:
import QuickLookThumbnailing
class ThumbnailProvider: QLThumbnailProvider {
override func provideThumbnail(for request: QLFileThumbnailRequest, _ handler: @escaping (QLThumbnailReply?, Error?) -> Void) {
// cannot trigger break point here!
}
I understand I should test the Thumbnail Extension by using:
$ qlmanage -t my_file.ext
Testing Quick Look thumbnails with files:
my_file.ext
But I don't know what process to attach to in the Xcode debugger... a bit clueless...
I've skimmed relevant parts of https://developer.apple.com/videos/play/wwdc2019/719, but there is no real debug tips...
Does anyone know if it is possible to debug with Xcode or not? And if possible, then how? 😅
After days of trying all kinds of weird stuff I finally got something to work! 😅
Findings:
- I never got
qlmanage -tto trigger anything for my Thumbnail Extension 😑 - Even though I used
qlmanage -r,qlmanage -r cacheandkillall -9 QuickLookThumbnailing QuickLookUIService FinderI never got it to trigger. - Even though I used
pluginkitto see that my plugin thumbnail extension was registered AND enabled I never got it to trigger. log stream --predicate 'subsystem == "com.apple.quicklook"'was basically useless to me.- Logging out and in of my compute made no difference.
But then finally I tried to REBOOT my computer and then suddenly it started to work if I used the Finder app only! (qlmanage -t is still useless.)
Holy cow I spent forever on that... 🙈
(macOS 15.4.1)