UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Core Spotlight - modify results UI

Forums > SwiftUI

Gone through the excellent tutorial in the Ultimate Portfolio course on how to implement spotlight in your app. I was just wondering whether there is a way to modify how results from Spotlight for your app are shown. E.g. add more details than only title or contentDescription. I saw attributes like containerTitle, etc..

Or is this not possible to change from within your app and with SwiftUI?

Thanks!

3      

The Ultimate Portfolio app only uses simple things such title and description, however if your own app uses maps, music, images, etc,, I can't see why you could not provide other information in the Spotlight search, as long as your app can provide the data.

The details are in the documentation for CSSearchableItemAttributeSet (accessed via XCode quick help for CSSearchableIndex), or at least it is a starting point.

If you are talking about how things look in Spotlight, then I think probably not, at least I have not seen anything. Also Spotlight is a feature on the device that is part of the OS (iOS, macOS, etc.) so Apple have determined how things look in Spotlight.

4      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.