Is CSSearchableItemAttributeSet.rating supported?

I'm trying to use the rating and ratingDescription properties of CSSearchableItemAttributeSet. However they are not displayed in the Spotlight UI.

Does this only work for certain types of content?

Replies

I'm having the same issue. I've confirmed that the rating gets set to an NSNumber from 1 - 5, but it is still not displaying in Spotlight. Can anyone confirm that this is working?

If you're not getting the results you're expecting, please file a bug report. Post the bug number here and I'll keep an eye on it.

I filed a bug for this: 22593959.


Looking forward to understanding how to get this working...

Items appearance in Spotlight depends on the contentType of your CSSearchableItemAttributeSet. I've managed to make rating appear in results by using kUTTypeAudio.

@pdm

Is there any kind of review of how attrbuteSet's contentType actually relates to indexed content? For now, I have to kind of abuse its type to get appropriate layout in spotlight result cells (for example, if i set contentType to kUTTypePlaylist, then contentDescription will take all the available space in the cell, but if i'm using kUTTypeAudio, then i can set arbitrary text into artist property of attributeSet to force Spotlight to truncate contentDescription and always show whatever was in artist property)

@rwforsythe: Thanks for the bug report. Yours got marked as a dupe so I'm tracking the original. It does appear that currently the rating is shown for audio and video types.


As for review, that's not something I can comment on. You should refer to the App Review Guidelines for any details on what the App Review team will be looking for.

Great... Can you let us know if/when more types are supported?