Implementing a Spotlight Importer CFPlugIn in pure Swift

Hi all,
I recently undertook an effort to implement a Spotlight Importer in Swift. All of the sample code I found around MDImporters and CFPlugIns was written in C/Obj-C, so I thought it would be valuable for the community to showcase an example of how to write one entirely in Swift.

Here's a detailed blog post I wrote that explains the plug-in architecture and how to use Swift's manual memory management to implement a plug-in:

And here's the code! :hatching_chick:

2 Likes