My app's indexing also fails on iOS17, here's what I did to make it work again, after looking at the sample code from "Showcase App Data in Spotlight"
Switched the NSCoreDataCoreSpotlightDelegate init code from init(forStoreWith: NSPersistentStoreDescription, model: NSManagedObjectModel) to init(forStoreWith: NSPersistentStoreDescription, coordinator: NSPersistentStoreCoordinator)
Manually calls startSpotlightIndexing() after the above.
Move the initialisation above from before loadPersistentStores to after loadPersistentStores.
Topic:
App & System Services
SubTopic:
Core OS
Tags: