Our code is using .lowQualityThumbnail to generate a thumbnail, it stops working when users update to 15.2 .
Test it with a regular jpg file for fileURL.
The only way to make it work is to change it to .thumnail or remove it.
It's not deprecated, is it a MacOS bug? customers don't want to keep updating the software.
Everything works in MacOS 15.1
import QuickLookThumbnailing
func generateThumbnail(for fileURL: URL, size: CGSize, scale: CGFloat) {
let request = QLThumbnailGenerator.Request(fileAt: fileURL, size: size, scale: scale, representationTypes: .lowQualityThumbnail)
QLThumbnailGenerator.shared.generateBestRepresentation(for: request) { thumbnail, error in
if let error = error {
print("Error generating thumbnail: \(error)")
} else if let thumbnail = thumbnail {
// Use the thumbnail
let image = thumbnail.uiImage
// Do something with the image
}
}
}