corespotlight – iOS Spotlight Importer Extension is not called


Using XCode 15 I have added a Spotlight importer extension to my iOS app based on CSImportExtension as described here:
https://developer.apple.com/documentation/corespotlight/csimportextension?language=objc

My aim is to make to text content in the app’s private document format searchable via Spotlight. I implemented method updateAttributes, updated the Info.plist to include the document’s UTI – that’s defined as Exported Type Identifier by the app.
However, searching does not work and the extension seems never to be loaded/called.

I debug the app like described here:
How to debug a Spotlight extension in iOS
and use iOS Settings app to reindex all items, nothing triggers the extension to be loaded.

As I have some files on the device in iCloud Drive I’d expect Spotlight to re-index them (The app does not explicitly mark them as searchable, but that should not be necessary?). When I use “Get Info” on these files in the Files app they show the correct UTI.

Any idea what could be causing the extension not to be loaded?

Thanks in advance.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img