Spotlight

RSS for tag

Search for files and index your app’s content for searching using Spotlight.

Posts under Spotlight tag

112 Posts

Post

Replies

Boosts

Views

Activity

Why does spotlight hate me?
This query should find everything with a display name of "Safari." That should include, for example, /Applications/Safari.app. [bigbook:/tmp] sef% mdfind 'kMDItemDisplayName == "Safari"c' /Library/Application Support/Apple/Safari /Library/Apple/System/Library/Assistant/Plugins/Safari.assistantBundle/Contents/MacOS/Safari /Users/Shared/Previously Relocated Items 1/Security/System/Library/AssetsV2/com_apple_MobileAsset_MacSoftwareUpdate/f7b05c91052116c046919f72de2c03a86cabcf3e.asset/AssetData/payloadv2/ecc_data/System/Library/Templates/Data/Applications/Safari.app /Users/Shared/Previously Relocated Items/Security/Developer/SDKs/MacOSX10.6.sdk/System/Library/PrivateFrameworks/Safari.framework/Versions/A/Safari /Users/Shared/Previously Relocated Items/Security/Developer/SDKs/MacOSX10.7.sdk/System/Library/PrivateFrameworks/Safari.framework/Versions/A/Safari /Users/sef/Applications/Microsoft Office 2004/Office/Themes/safari /Users/sef/Library/Application Support/SyncService/LastSync Data/Safari And yet, /Applications/Safari.app is in fact missing from there. Why? (This used to work. But then mds was broken on my machine, so I bit the bullet and upgraded to Monterey. Multiple Monterey systems are showing this weird behaviour.)
1
0
843
Jun ’22
Spotlight importer: which key/value to make a file UTI seen as a "Spreadsheet" and not as "Other"
On my spreadsheet application, with its own UTI, I wrote a Spotlight importer plugin. It works well, except that Spotlight group the found files as "Other" and not as "Spreadsheet". My UTI conforms to public.spreadsheet. Any idea? Is there a special kMDxxx key/value to set for that in the importer?(see: https://developer.apple.com/library/archive/documentation/CoreServices/Reference/MetadataAttributesRef/Reference/CommonAttrs.html ) Thanks!
0
0
1.2k
Jun ’22
trying to figure out where to get a link for "search [query] in App Store"
I'm trying to create a quicklink/command (for personal purposes Raycast) that basically opens the App Store and searches input. I don't know much about developing/backend/code stuff but considering it's easy to create a command that searches other browsers, engines, databases I figure there has to be a way. Hoping this isn't like reddit where someone asks a question and everyone answers it condescendingly or sarcastically just because, reddit.
1
1
1k
Jun ’22
Track traffic that comes from spotlight or app deeplinking
Hi girls & guys!I wonder if I can track traffic that comes from Spotlight or other app deeplinking launches in my analytics.When Spotlight opens my app with a deeplink, can I provide an argument that differs when the user comes from Spotlight or Safari search or opens my url via another way? Reason is: Currently I get traffic to my mobile page via Google. On my page I take the HTTP referrer and know it's SEO-traffic from Google. For SEA Adwords traffic I specify another URL. Means, I can identify my traffic sources.When Spotlight will take over this search part, there will me no HTTP referrer I can take. I then cannot identify if the user comes from Spotlight Search or another app launch way (e.g. smart app banner).Hope somebody has ideas to specify different arguments for sources when deeplinking to an app.Best regards
3
0
2.7k
Apr ’22
Core Spotlight does not work on macOS.
Hi, guys.I have an issue with Core Spotlight on macOS. I've tried sample app (Pictures from WWDC Core Spotlight topic) and it does not work (10.13 beta 3, XCode 9 beta 3). The app is running but no search results appear in Spotlight. Same issue with Quick Look preview (no results). Seems like indexing is not working. Thanks in advance.
15
0
6.9k
Dec ’21
Multiple Spotlight indexers for the same file types?
I'd like to add additional metadata regarding image files to Spotlight's index, so that I can see the data in Get Info in Finder. I don't want to replace Apple's image indexer; I just want to add one more field. I am able to successfully create a new Spotlight indexer for a custom file type, and it works; in particular, I can see the new metadata in the Get Info window for the file in Finder. When I modify the indexer to also accept jpeg files, I'm seeing that Spotlight is choosing to use macOS' built-in image indexer all the time, and never my custom indexer. (I'm using mdimport -d2 -t sample.jpeg for testing) Before I start asking about code-level questions, it seems prudent to start with the basics: Is Spotlight willing to leverage multiple indexers for the same file type? Does mdimport -d2 -t sample.jpeg only test one single indexer? If not, what is the correct way to test an indexer that accepts file types already accepted by an Apple indexer?
1
0
772
Dec ’21
Xcode 13 simulator high CPU Spotlight
I'm on a MacBook Air M1 with Monterey and XCode 13 beta. On the first night my MBA ran out of battery within three hours. I check cpu usage, and it was Spotlight. Left it running for hours and hours, but Spotlight did not complete it's tasks. Then I noticed in an Activity Monitor sample output that it seemed to have a relation to the Xcode simulator. I quit that, and the cpu utilisation went down. I can reproduce it. Nothing special, an empty iOS App in an iPhone 12 Pro or mini simulator will cause busy cpu cores with Spotlight. I recommend not leaving the simulator running when on battery if you have the same issue ;) Anyone else seeing Spotlight taking up a lot of CPU resources when the Xcode simulator is running?
22
2
17k
Dec ’21
Attributes provided in CSImportExtension are not searchable in Files.app or UIDocumentBrowserViewController
I created a CSImportExtension in my UIDocument-based app to make the content of my documents searchable. Now I can successfully search for the content from the iOS home-screen search. But when I try the same search in the Files.app or from the document browser in my app, no results are shown. In the update attributes function in the extension, I am populating the following fields of the passed-in CSSearchableItemAttributeSet: keywords, contentDescription, displayName Does anybody know what I have to do to make the content searchable from all locations? I tried the same within the Pages, Numbers and Keynote apps and their document contents is found beautifully from the Files.app or from their document browsers. So it seems to work in principle. Thanks and cheers Frank
0
2
1.3k
Nov ’21
Why does spotlight hate me?
This query should find everything with a display name of "Safari." That should include, for example, /Applications/Safari.app. [bigbook:/tmp] sef% mdfind 'kMDItemDisplayName == "Safari"c' /Library/Application Support/Apple/Safari /Library/Apple/System/Library/Assistant/Plugins/Safari.assistantBundle/Contents/MacOS/Safari /Users/Shared/Previously Relocated Items 1/Security/System/Library/AssetsV2/com_apple_MobileAsset_MacSoftwareUpdate/f7b05c91052116c046919f72de2c03a86cabcf3e.asset/AssetData/payloadv2/ecc_data/System/Library/Templates/Data/Applications/Safari.app /Users/Shared/Previously Relocated Items/Security/Developer/SDKs/MacOSX10.6.sdk/System/Library/PrivateFrameworks/Safari.framework/Versions/A/Safari /Users/Shared/Previously Relocated Items/Security/Developer/SDKs/MacOSX10.7.sdk/System/Library/PrivateFrameworks/Safari.framework/Versions/A/Safari /Users/sef/Applications/Microsoft Office 2004/Office/Themes/safari /Users/sef/Library/Application Support/SyncService/LastSync Data/Safari And yet, /Applications/Safari.app is in fact missing from there. Why? (This used to work. But then mds was broken on my machine, so I bit the bullet and upgraded to Monterey. Multiple Monterey systems are showing this weird behaviour.)
Replies
1
Boosts
0
Views
843
Activity
Jun ’22
Spotlight importer: which key/value to make a file UTI seen as a "Spreadsheet" and not as "Other"
On my spreadsheet application, with its own UTI, I wrote a Spotlight importer plugin. It works well, except that Spotlight group the found files as "Other" and not as "Spreadsheet". My UTI conforms to public.spreadsheet. Any idea? Is there a special kMDxxx key/value to set for that in the importer?(see: https://developer.apple.com/library/archive/documentation/CoreServices/Reference/MetadataAttributesRef/Reference/CommonAttrs.html ) Thanks!
Replies
0
Boosts
0
Views
1.2k
Activity
Jun ’22
trying to figure out where to get a link for "search [query] in App Store"
I'm trying to create a quicklink/command (for personal purposes Raycast) that basically opens the App Store and searches input. I don't know much about developing/backend/code stuff but considering it's easy to create a command that searches other browsers, engines, databases I figure there has to be a way. Hoping this isn't like reddit where someone asks a question and everyone answers it condescendingly or sarcastically just because, reddit.
Replies
1
Boosts
1
Views
1k
Activity
Jun ’22
Spotlight indexing cache files
I can see a couple of python scripts in indexing folders /System/Volumes/Data/.Spotlight-V100/Store-V2/<GUID>/Cache/0000/0003/0003/12885148578.txt Why is the spotlight keeping copies of the files in addition to the indexing metadata? Are these temporary files and would these be auto-deleted after some known time period?
Replies
0
Boosts
0
Views
1.4k
Activity
Apr ’22
Track traffic that comes from spotlight or app deeplinking
Hi girls &amp; guys!I wonder if I can track traffic that comes from Spotlight or other app deeplinking launches in my analytics.When Spotlight opens my app with a deeplink, can I provide an argument that differs when the user comes from Spotlight or Safari search or opens my url via another way? Reason is: Currently I get traffic to my mobile page via Google. On my page I take the HTTP referrer and know it's SEO-traffic from Google. For SEA Adwords traffic I specify another URL. Means, I can identify my traffic sources.When Spotlight will take over this search part, there will me no HTTP referrer I can take. I then cannot identify if the user comes from Spotlight Search or another app launch way (e.g. smart app banner).Hope somebody has ideas to specify different arguments for sources when deeplinking to an app.Best regards
Replies
3
Boosts
0
Views
2.7k
Activity
Apr ’22
Core Spotlight does not work on macOS.
Hi, guys.I have an issue with Core Spotlight on macOS. I've tried sample app (Pictures from WWDC Core Spotlight topic) and it does not work (10.13 beta 3, XCode 9 beta 3). The app is running but no search results appear in Spotlight. Same issue with Quick Look preview (no results). Seems like indexing is not working. Thanks in advance.
Replies
15
Boosts
0
Views
6.9k
Activity
Dec ’21
Multiple Spotlight indexers for the same file types?
I'd like to add additional metadata regarding image files to Spotlight's index, so that I can see the data in Get Info in Finder. I don't want to replace Apple's image indexer; I just want to add one more field. I am able to successfully create a new Spotlight indexer for a custom file type, and it works; in particular, I can see the new metadata in the Get Info window for the file in Finder. When I modify the indexer to also accept jpeg files, I'm seeing that Spotlight is choosing to use macOS' built-in image indexer all the time, and never my custom indexer. (I'm using mdimport -d2 -t sample.jpeg for testing) Before I start asking about code-level questions, it seems prudent to start with the basics: Is Spotlight willing to leverage multiple indexers for the same file type? Does mdimport -d2 -t sample.jpeg only test one single indexer? If not, what is the correct way to test an indexer that accepts file types already accepted by an Apple indexer?
Replies
1
Boosts
0
Views
772
Activity
Dec ’21
Xcode 13 simulator high CPU Spotlight
I'm on a MacBook Air M1 with Monterey and XCode 13 beta. On the first night my MBA ran out of battery within three hours. I check cpu usage, and it was Spotlight. Left it running for hours and hours, but Spotlight did not complete it's tasks. Then I noticed in an Activity Monitor sample output that it seemed to have a relation to the Xcode simulator. I quit that, and the cpu utilisation went down. I can reproduce it. Nothing special, an empty iOS App in an iPhone 12 Pro or mini simulator will cause busy cpu cores with Spotlight. I recommend not leaving the simulator running when on battery if you have the same issue ;) Anyone else seeing Spotlight taking up a lot of CPU resources when the Xcode simulator is running?
Replies
22
Boosts
2
Views
17k
Activity
Dec ’21
Attributes provided in CSImportExtension are not searchable in Files.app or UIDocumentBrowserViewController
I created a CSImportExtension in my UIDocument-based app to make the content of my documents searchable. Now I can successfully search for the content from the iOS home-screen search. But when I try the same search in the Files.app or from the document browser in my app, no results are shown. In the update attributes function in the extension, I am populating the following fields of the passed-in CSSearchableItemAttributeSet: keywords, contentDescription, displayName Does anybody know what I have to do to make the content searchable from all locations? I tried the same within the Pages, Numbers and Keynote apps and their document contents is found beautifully from the Files.app or from their document browsers. So it seems to work in principle. Thanks and cheers Frank
Replies
0
Boosts
2
Views
1.3k
Activity
Nov ’21