Spotlight on Mac OS X is a fast desktop search technology that allows users to organize and search for files based on metadata. Spotlight is extensible, allowing developers to provide metadata importers for their application’s documents.
Questions tagged [spotlight]
259 questions
4
votes
1 answer
Custom Spotlight Importer and Finder's Get Info "More Info" section
I have written a Spotlight Importer for the custom document type my application defines.
Everything is working fine, the metadata fields are correctly indexed by Spotlight (verified using mdls command), and a Spotlight search reveals my…

Vince
- 525
- 1
- 3
- 19
4
votes
1 answer
Block passed as a parameter to MDQuerySetSortComparatorBlock (Spotlight API) is not getting called
I tried to use MDQuerySetSortComparatorBlock method inside the MDQuery framework to sort the query result list. However, the block passed as a parameter to the method doesn't get called at all. Below is a piece of code that I'm using to make a query…

Shashank
- 1,743
- 1
- 14
- 20
4
votes
3 answers
Applying Custom Metadata to Files
I've been trying to figure out a way to give files custom metadata. An example of this would be giving files tags, but that's not the only sort of custom metadata I want to apply. I've looked at a couple posts like these ones - Adding custom…

pasawaya
- 11,515
- 7
- 53
- 92
3
votes
2 answers
Query Mac OS X Spotlight from Java
Related to:
Query Windows Search from Java
But this time to use OSX's spotlight
I would like to consume OSX spotlight service from Java. Is there an API available?
.

OscarRyz
- 196,001
- 113
- 385
- 569
3
votes
2 answers
How do do a Spotlight query that's language independent?
I want to do a Spotlight query to find the Aperture libraries on the local hard drives. A very simple way would be to use kMDItemKind but its value depend on the current user language:
kMDItemKind = {
"" = Library;
de =…

Pol
- 3,848
- 1
- 38
- 55
3
votes
2 answers
Applescript launching of Spotlight?
I tried to use the following to open the Spotlight search box:
tell application "System Events"
keystroke " " using {command down}
end tell
It simply tries to issue command-space. It does work, but if I save the script as an Application and run…

Snoqual
- 573
- 6
- 11
3
votes
1 answer
Exclude folder from Spotlight indexing - via command line
Is there a command-line way to exclude folders from spotlight indexing? To do it via UI, you can use System Preferences >> Spotlight >> Privacy. But I'd like to be able to add various folders/directories to that Privacy list via command line.

Greg Fenton
- 1,233
- 9
- 15
3
votes
3 answers
Xcode 10 Archives to 'Other Items' instead of 'MacOS Apps'
This was working perfectly - before I upgraded to Xcode 10 that is. My app has a Quicklook and a Spotlight plugin integrated into it. These plugins are built separately and then, in the Build Phase, copied (two Copy Files) with the following…

headbanger
- 1,038
- 1
- 11
- 32
3
votes
0 answers
MacOS Document based application open file dialog search box not working
I am writing a macOS document based application in Swift with the following versions:
MacOS: 10.13.4
Xcode: 9.3
Deployment 10.13
Sandbox: On
I have noticed that the search box in the open file dialog is non-functional (ie it returns no results, date…

Bill Aylward
- 31
- 1
- 1
3
votes
1 answer
MDQueryGetResultAtIndex and UnsafeRawPointer in Swift 3
I'm having trouble exploring the results of a Spotlight search in Swift 3 using MDQuery. I expect MDQueryGetResultAtIndex to yield an MDItem, and in C/Objective-C, that assumption works, and I can call MDItemCopyAttribute on it to explore the item.…

matt
- 515,959
- 87
- 875
- 1,141
3
votes
1 answer
Using a Spotlight search result to open an application in a specific state
I have an application that will play a series of radio stations by choosing them from a drop down menu. Ideally I'd like to add some code, so that a spotlight search that would return any of the items in the dropdown and open the application as if…

Duncan Robertson
- 596
- 5
- 10
3
votes
3 answers
Can Spotlight index a MacFUSE filesystem?
Spotlight indexes at the file level, so a file containing a complicated data structure may need to be split into a set of files for Spotlight to index it in a useful way.
Can you use MacFUSE to achieve this more dynamically?
Will Spotlight index a…

tgdavies
- 10,307
- 4
- 35
- 40
3
votes
1 answer
How to set a material that does not reflect light in Helix Toolkit ViewPort?
I create and render a list with 20 SpotLight points in Helix ViewPort that have specific positions. With a timer I always change the color of the SpotLight. The ViewPort light is set to:

Georgiana M
- 323
- 4
- 20
3
votes
1 answer
Setup keywords for local spotlight search
My application name is quite long... "Super Duper Game V2". I've set the bundle display name to "SDGV2". This means that the text underneath the iOS app displays "SDGV2", but I want the local spotlight search (when the user pulls down from the home…

Msencenb
- 5,675
- 11
- 52
- 84
3
votes
3 answers
How do you get FULL SCREEN in Safari?
Mainly for artistic reasons I want to have run my slideshow (plain javascript) in fullscreen. For browsers like Internet Explorer, Chrome, Firefox and some others this seems to be no problem when they are run on windows machines: the user just has…

user2317959
- 71
- 1
- 1
- 6