1 Reply
      Latest reply on Nov 6, 2018 12:48 AM by eskimo
      Lemontine Level 1 Level 1 (0 points)

        I'd like to create a spotlight importer to make the contents of my Mac app's JSON based documents visible to spotlight.

         

        https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/MDImporters/Concepts/WritingAnImp.html#//apple_ref/doc/uid/TP40001275-CJBEJBHH

         

        The instructions on building a Spotlight importer indicate that "Xcode provides a project template", however it seems to be missing from Xcode 10. Can someone help me with a sample project?

        • Re: Spotlight Importer for Mac document based app
          eskimo Apple Staff Apple Staff (11,505 points)

          The instructions on building a Spotlight importer indicate that "Xcode provides a project template", however it seems to be missing from Xcode 10.

          Indeed.  Creating a new Spotlight importer is tricky because they are based on CFPlugIn, and CFPlugIn is… well, how to say this diplomatically?… super ugly )-:  One option here is to use Xcode 9 to create your plug-in based on the old template.  Honestly though, I don’t recommend that because the old template… again, diplomatically… well, let’s just say that the old template lets the true nature of CFPlugIn shine through! (-:

          I have some techniques that really help but, alas, they’re insufficiently polished to share here.  Please drop me a line via email.

          Alternatively, if you open a DTS tech support incident I will be able to provide detailed help on a one-to-one basis.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"