Hi all,
I'm trying to add Spotlight support to a macOS app that handles custom virtual machine bundles with the .vpvm extension. I’ve followed the current documentation and used the modern CSImportExtension approach with a Spotlight Importer extension target.
Here’s what I’ve done:
App Info.plist: Declared com.makeprog.vpvm as a UTI conforming to com.apple.package.
Registered it under UTExportedTypeDeclarations and CFBundleDocumentTypes.
Spotlight Importer Extension: Added a new macOS target using the Spotlight Import Extension template.
Set the NSExtensionPointIdentifier to com.apple.spotlight.import.
Used CSSupportedContentTypes = com.makeprog.vpvm.
Implemented a minimal update(_ attributes:forFileAt:) method that sets displayName, title, and contentDescription.
Other steps: Verified that the .appex is embedded under Contents/PlugIns/.
Confirmed it appears in mdimport -e output with correct UTI.
Used mdimport -m -d2 -t /path/to/file.vpvm, but I still get: Imported '/path/to/file.vpvm' of type 'com.makeprog.vpvm' with no plugIn.
The extension is never invoked. I’ve also tried:
Ensuring the .vpvm file is a valid directory bundle.
Restarting Spotlight / rebuilding index.
Ensuring the app and extension are properly signed.
Tried installing the app in test virtual machine
Question: Has anyone successfully used CSImportExtension for custom UTIs? Is there something additional I need to do for the extension to be recognized and triggered?
Any advice or examples would be greatly appreciated!
Thanks in advance.