SwiftData and SpotLight Search

Hi all,

has anybody found the trick how to get SwiftData working with SpotLight Search?

Setting the attribute "spotlight" in the Model definition seems to do nothing at all, as pointed out by Paul Hudson in his new book as well (https://www.hackingwithswift.com/quick-start/swiftdata/how-to-index-swiftdata-objects-in-spotlight)

Thanks a lot!

I'm also trying to do the same but unable to make it work, by any chance did you manage to make it work?

SwiftData and SpotLight Search
 
 
Q