iOS NUserActivity & CSSearchableItemAttributeSet ratings attribute

354 Views Asked by At

I'm using the search api in iOS with NSUserActivity and Core Spotlight indexing - I've got it all working fine apart from I can't get the ratings for my item to display on the search results?

I've set my CSSearchableItemAttributeSet with the type kUTTypeContent and have set the rating and ratingDescription attributes, whilst all the other attributes I'm populating are working fine the ratings aren't being shown! Anyone else managed to do this?

1

There are 1 best solutions below

1
On

Check this on Apple forum: https://forums.developer.apple.com/thread/14386

Apple have to fix this issue. But i notified some applications (Zomato) are showing rating on spotlight search.

CSSearchableItemAttributeSet is not supporting NSAttributedString. In my openion, you can use symbols now.

 attributeSet.contentDescription = "Rating: ⭐️⭐️⭐️"