MCAPSpotlightImporter is a macOS Spotlight Importer for MCAP files. The importer gives Spotlight the ability to index MCAP files so the names of their topics, schemas, attachments, and metadata are visible and searchable in Finder and anywhere else that Spotlight is used.
This importer is included with the Foxglove desktop app for macOS.
-
Update version numbers in Config.xcconfig.
-
Create a corresponding version tag, e.g.
v1.2.3
, and push the tag to GitHub. CI will automatically build and create a draft release with the build products attached as release assets. -
Manually edit the release notes and publish the release.
You can make a local build using Xcode, or by running make build
. When using make build
, the output is placed in ./build/Release
.
-
To test the .mdimporter locally, copy it to ~/Library/Spotlight.
-
After each rebuild of the importer, once it has been copied to ~/Library/Spotlight, sometimes it is necessary to kill Spotlight-related processes, to ensure a cached version of the importer is not being used:
sudo killall mds mdworker mdworker_shared corespotlightd mdbulkimport
./System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill
may also help. -
Run
mdimport -L
to see whether the importer plugin has been loaded. Sometimes the output of this command does not update immediately.
-
-
Run
mdimport -d2 -t path/to/file.mcap
to run the importer on a file. The first line of output indicates whether the importer was actually used by sayingImported '...' of type '...' with plugIn '...'
. If it instead sayswith no plugIn
, the importer was not correctly loaded. Imported attributes will be displayed as part of the output. -
To enable debug logging, run
sudo log config --subsystem dev.foxglove.studio.mcap-mdimporter --mode level:debug
. -
To view logs from the importer, run
log stream --level debug --predicate 'subsystem = "dev.foxglove.studio.mcap-mdimporter"'
.
See also: Troubleshooting Spotlight Importers