tounaobun
tounaobun

Reputation: 14857

CSSearchableItemAttributeSet thumbnailURL not a web URL

The doc says the thumbnailURL is the local file URL of the thumbnail image for the item.

How to make property thumbnailURL support web URL?

Upvotes: 2

Views: 919

Answers (1)

Jordan H
Jordan H

Reputation: 55845

That is correct it must be a local URL - you cannot provide a web URL. If you wish to use the same image at that URL, you'll have to download it then attach it to your CSSearchableItemAttributeSet. You can use thumbnailURL or thumbnailData.

The reason for this seems to be the fact that search results will still appear if the user is not connected to the internet, therefore any remote images would not download. Even if they were online, locally stored images will appear instantly so the user doesn't have to wait for content to be downloaded.

Upvotes: 6

Related Questions