Since iOS 18.3, icons are no longer generated correctly with QLThumbnailGenerator

Since iOS 18.3, icons are no longer generated correctly with QLThumbnailGenerator.

No error is returned either. But this error message now appears in the console:

Error returned from iconservicesagent image request: <ISTypeIcon: 0x3010f91a0>,Type: com.adobe.pdf - <ISImageDescriptor: 0x302f188c0> - (36.00, 36.00)@3x v:1 l:5 a:0:0:0:0 t:() b:0 s:2 ps:0 digest: B19540FD-0449-3E89-AC50-38F92F9760FE error: Error Domain=NSOSStatusErrorDomain Code=-609 "Client is disallowed from making such an icon request" UserInfo={NSLocalizedDescription=Client is disallowed from making such an icon request}

Does anyone know this error? Is there a workaround? Are there new permissions to consider?

Here is the code how icons are generated:

let request = QLThumbnailGenerator.Request(fileAt: url, size: size, scale: scale, representationTypes: self.thumbnailType)
request.iconMode = true
let generator = QLThumbnailGenerator.shared
generator.generateRepresentations(for: request) { [weak self] thumbnail, _, error in
}

Nothing to add here, apart from the fact that I also get this error.

@yjogol is the error specific to iOS 18.3 and are you able to reproduce this on previous OS versions?

I'd greatly appreciate it if you could open a bug report, include a focus sample project that reproduces the issue and specify the test environment. Please post the FB number here once you do.

Bug Reporting: How and Why? has tips on creating your bug report.

Thank you for your quick reply.

I have already opened a bug report: FB16445589

Yes this issue starts with iOS 18.3 in an already existing app out to customers. This issue does not occur in former versions.

I have now added a sample project too.

Today I have also tried:

let documentInteractionController = UIDocumentInteractionController(url: fileURL)
return documentInteractionController.icons.first

It works under 18.2 but not under 18.3

Same error on console

We encountered a similar issue with QLThumbnailGenerator

It stopped generating thumbnails of type .icon starting iOS 18.3

The generateRepresentations() would succeed without errors. However, the resulting image would be incorrect. It looks like some kind of a placeholder:

I see the same error message in the log

Error returned from iconservicesagent image request: <ISTypeIcon: 0x30041a100>,Type: com.adobe.pdf - <ISImageDescriptor: 0x303bea620> - (100.00, 100.00)@3x v:1 l:5 a:0:0:0:0 t:() b:0 s:2 ps:0 digest: B19540FD-0449-3E89-AC50-38F92F9760FE error: Error Domain=NSOSStatusErrorDomain Code=-609 "Client is disallowed from making such an icon request" UserInfo={NSLocalizedDescription=Client is disallowed from making such an icon request}

Thumbnails of type .thumbnail work correctly. They are generated the same way as they did before.

Thumbnails of type .thumbnail work correctly.

I can confirm this. But you need an existing file for the given URL. .icon normally works also without an existing file.

As a workaround, we have created a set of icon of the most used file types.

In iOS 18.3.1: no change to this issue and also no Simulator available.

Since iOS 18.3, icons are no longer generated correctly with QLThumbnailGenerator
 
 
Q