Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 11 File Provider fetchThumbnailsForItemIdentifiers method is not calling

Tags:

ios

ios11

I implemented File Provider for new Files app on iOS 11. I want to show my files on remote, in Files app. I can enumarete items and show in Files app but iOS shows default thumbnail for images. So I need to show my own thumbnails for images.

fetchThumbnailsForItemIdentifiers:requestedSize:perThumbnailCompletionHandler:completionHandler:

Apple explain this method like following;

For local files, the system automatically provides thumbnails for supported content types, and calls a Quick Look Preview extension to get thumbnails for custom types.

However, the system cannot generate thumbnails for remote items. Instead, it calls this method to request thumbnails for items stored on a remote sever.

I implemented that method and make api call for the thumbnails. But that method is not called so i cannot show my own thumbnails for the images.

Why this method is not called? Is there anyone have an idea about that?

Thanks.

like image 724
Developer Avatar asked Nov 30 '25 16:11

Developer


1 Answers

Seems you need to update the item's(ProviderItem) versionIdentifier property for the method to get called.The Apple documentation states that too. Was stuck in the same situation ;-)

Hope this helps!

like image 105
Lokesh SN Avatar answered Dec 02 '25 05:12

Lokesh SN



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!