Spotlight

RSS for tag

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

Posts under Spotlight tag

108 Posts

Post

Replies

Boosts

Views

Activity

Support semantic search with Core Spotlight
For the past few days, I've been trying to support semantic search with Core Spotlight, but I haven't found any proper source on the Apple Developer site. In the explanation video, Jennifer mentioned checking the link below, but there was no link provided. If anyone is implementing this feature or has more information, could you please share any insights or resources? TIA
2
2
1.2k
Jul ’24
CSUserQuery Generating Model Load Failure - No Results
I'm trying CoreSpotlight on the 18b1 seed on iOS and after submitting my query, I'm getting multiple errors about what looks like missing models: [Model loading] model loading failed with err -1000 for model path /Users/hunter/Library/Developer/CoreSimulator/Devices/0AF4F46E-5510-4458-B61C-F8A153155809/data/Containers/Data/Application/1D8580C0-AC80-4949-9FDA-31DB463BDA5C/Library/Spotlight/Resources_V3/Default/models/spotlight_l2.mlmodelc and directives path /Users/hunter/Library/Developer/CoreSimulator/Devices/0AF4F46E-5510-4458-B61C-F8A153155809/data/Containers/Data/Application/1D8580C0-AC80-4949-9FDA-31DB463BDA5C/Library/Spotlight/Resources_V3/Default/directives/directives_l2.mdplist I am calling CSUserQuery.prepare() but that doesn't seem to make a difference. Is there more to this than what is on this page? https://developer.apple.com/documentation/corespotlight/building-a-search-interface-for-your-app?changes=latest_minor
3
1
1.1k
Jul ’24
Ios18 bug on “Help apple improve search”
hey guyss…. Im currently using ios18 developer beta 2 on my iphoen 12…Idk if u guys noticed it or not.. but when i turn off the toggle for “Help improve apple search” (settings->search->help improve apple search) it again turns on without my knowledge seconds aftr i close the page. Ive tried restarting my iphone & many more.. nothing seems to work.. im kindoff a more private guy i usually turn off apple analytics.. usage diagnostics and i always make sure data is stored only on my local storage.. and this bug kinda piss me off 😕. i’ve given u the link below to check it out. Peace. https://youtube.com/shorts/YfVDCA-Dfrs?si=qLcl0mWL-Jm9iJFz
1
1
1.1k
Jul ’24
Spotlight / Finder Search / Finder Tags not working on virtual file system Monterey/Ventura
I'm writing a virtual file system as my educational project (generic kernel extension). Currently, mostly everything is implemented, however, I'm having trouble using Finder search and tags. The results simply don't show up - despite I am having vnop_... calls to those files. The extended attributes are supported. Inodes are stable. Mmap is implemented. Vnop_ioctl returns KERN_SUCCESS (but no implementation). An important moment: Previously, the search didn't work at all. Researching the web has shown me, that Spotlight indexation and Finder search are tightly glued. So basically I was trying to enable support for spotlight, thinking that would be the source of the problem. I was receiving "Unknown indexing state". All those tricks with mdutil, launchd, manual and reindexation either were doing nothing or returning error. The problem was resolved FOR SONOMA by making by VFS appear as local one (adding flags for MNT_LOLCAL and MNT_DOVOLFS). This has changed the state from Unknown indexing state for spotlight to Indexing is disabled. No need to turn it on for me - I am interested only in search and tags, not the spotlight itself. Basically, whether spotlight recognises my driver as no-error, the Finder works correctly, even with indexation disabled. Whether on Monterey*, or Ventura, I get the same problem. However, neither system logs nor my driver show any kinds of errors. The spotlight simply returns error. Reindexation attempt via Security&Privacy returns "Unknown error occured". The metadata for Ventura and Monterey read attempt (mdls) returns "Unable to locate file", however returns a huge list for Sonoma. *Monterey and Ventura never have .Spotlight-V100 folder. No disable indexing files or other spotlight restrictions are present. No user space solutions seem to help. The kext is unsigned and running in an environment with SIP disabled and Security Mode reduced to Permissive. Maybe there some abstract rules for what is required on VFS side to be recognised okay'ish by Spotlight ? Or maybe something specific right for my case ? Any pointers and/or assistance would be greatly appreciated.
9
0
1.5k
Jun ’24
Are the new Semantic Embeddings in CoreSpotlight multi-lingual?
After watching https://developer.apple.com/wwdc24/10131, I'm curious if the semantic embeddings used to provide the "search of meaning" with this new capability are encoded with multi-lingual embeddings? In particular, if I have content that is mixed in Korean and English, can those be seamlessly indexed together and queries in one language (english) find relevant content that was offered to be indexed as Korean?
0
1
770
Jun ’24
How to create AppEntity shortcut to be shown in Spotlight
I am exploring Appi-Intent and Appshortcut. We can create an action shortcut by using the following code. struct WatchListShortcut: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: WatchListAppIntent(), phrases: [ "Tell \(.applicationName) to open first item in watch list", ], shortTitle: "WatchList item", systemImageName: "systemimage" ) } } What I want to show an entity shortcut like shown in the below screenshot. linkText I am not sure how to create the shortcut like Assigned one in the above screen.
0
0
920
Apr ’24
MacOS Sonoma: Spotlight Issues - App Indexing
Has anyone else experienced issues with Spotlight losing indexing of the Applications? Spotlight no longer displays any applications in the results when typing in an application name. Additionally it appears to be ignoring the settings of "Spotlight" set within the preferences. Example: I have "Websites" & "Siri Suggestions" turned off, however these still appear in the search results of spotlight.
44
18
18k
Mar ’24
SecCodeCopyPath and /System/Volumes/Preboot/Cryptexes/App/System
Looking at the path name for reasons, and ran into a thing: one of my coworkers was not getting /Applications/Safari.app as expected, but instead got /System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app. Which is annoying because I'm actually using spotlight to find the paths for applications, and that one doesn't show up. Has anyone run into this? And know why? (I figure I'll simply remove the prefix if it's there, and that should be fine, but I'm curious why it only seems to happen sometimes.)
4
0
4.0k
Feb ’24
Does MacOS Sonoma Spotlight still index non-Apple App Content if indexed?
I've recently upgraded to MacOS Sonoma. Spotlight seems to search third-party app names (search for Outlook and you'll find the Outlook app in search results) but it does not seem to surface third-party app content. Is this expected behavior, a widespread bug, or just my issue? For example, Outlook emails, WhatsApp calls, Evernote notes, Venmo contacts, Booking.com stays, Kayak.com trips...used to all be indexed under their respective apps I'm considering indexing my app but first wondering if Sonoma even supports it anymore? Example of App content::
0
0
722
Nov ’23
iOS Spotlight indexing seems to be broken on iOS 17?
Content indexed through CSSearchableIndex.default().indexSearchableItems() is no longer searchable from Spotlight. I created a very small app to demonstrate this. CSSearchableIndex.default().indexSearchableItems() returned no error, yet the result can't be found. import CoreSpotlight import SwiftUI @main struct testspotlightApp: App { var body: some Scene { WindowGroup { ContentView() .onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight) } } func handleSpotlight(_ userActivity: NSUserActivity) { print("Found \(userActivity.userInfo?.debugDescription ?? "nothing")") } } import CoreSpotlight import SwiftUI struct ContentView: View { @State var result = "" var body: some View { VStack { Text("Hello!") Button { let attribute = CSSearchableItemAttributeSet(contentType: .text) attribute.title = "a page title" attribute.contentDescription = "hello this is a page" attribute.keywords = ["search", "this", "page", "title"] let item = CSSearchableItem( uniqueIdentifier: "12345", domainIdentifier: "com.test", attributeSet: attribute) CSSearchableIndex.default().indexSearchableItems([item]) { error in if let error { result = "Failed to index: \(error.localizedDescription)" } else { result = "Successefully indexed to spotlight. Try searching 'a page title'" } } } label: { Text("Index a page").font(.title) } Text(result).multilineTextAlignment(.center) } .padding() } } Has anyone else seen the same issue?
16
9
7.5k
Oct ’23
Universal Deep Linking with redirects
I was wondering if it was possible to get Universal Deep Linking working with redirects that open up Safari first. I've successfully gotten deep linking to work when doing a normal link to the site, but when it is behind a link that is created by a marketing company, that link opens up Safari first, then opens the mobile web browser and not the app itself.Is it possible to go from a redirect in Safari to the app?
14
0
38k
Aug ’23
Unable to set the new App Tint Color options for App Shortcuts
I'm working on creating App Shortcuts for my app to show up in the Shortcuts app and Spotlight. One new feature this year is the option to add your apps tint color as a background, but I'm not able to get this to work. I have added the items NSAppIconActionTintColorName (String) and NSAppIconComplementingColorNames (Array?) to my info.plist file that where briefly mentioned in the WWDC23 video, but they don't seem to have any effect. Has anyone got these to work in their project?
3
4
3.7k
Jul ’23
Spotlight/metadata can be so very annoying
sef% mdls /Applications/Google\ Chrome.app/Contents/Frameworks/Google\ Chrome\ Framework.framework/Versions/112.0.5615.137/Helpers/Google\ Chrome\ Helper.app kMDItemFSContentChangeDate = 2023-04-17 23:59:16 +0000 kMDItemFSCreationDate = 2023-04-17 23:59:16 +0000 kMDItemFSCreatorCode = "" kMDItemFSFinderFlags = 0 kMDItemFSHasCustomIcon = 0 kMDItemFSInvisible = 0 kMDItemFSIsExtensionHidden = 0 kMDItemFSIsStationery = 0 kMDItemFSLabel = 0 kMDItemFSName = "Google Chrome Helper.app" kMDItemFSNodeCount = 1 kMDItemFSOwnerGroupID = 0 kMDItemFSOwnerUserID = 0 kMDItemFSSize = 1 kMDItemFSTypeCode = "" sef% mdfind 'kMDItemFSName == "Google Chrome Helper.app"' So there's a metadata key that has a value... but mdfind won't find it. I haven't tried writing a small program to see if it would find it yet, although I am somewhat curious if it would.
0
0
895
May ’23
Support semantic search with Core Spotlight
For the past few days, I've been trying to support semantic search with Core Spotlight, but I haven't found any proper source on the Apple Developer site. In the explanation video, Jennifer mentioned checking the link below, but there was no link provided. If anyone is implementing this feature or has more information, could you please share any insights or resources? TIA
Replies
2
Boosts
2
Views
1.2k
Activity
Jul ’24
CSUserQuery Generating Model Load Failure - No Results
I'm trying CoreSpotlight on the 18b1 seed on iOS and after submitting my query, I'm getting multiple errors about what looks like missing models: [Model loading] model loading failed with err -1000 for model path /Users/hunter/Library/Developer/CoreSimulator/Devices/0AF4F46E-5510-4458-B61C-F8A153155809/data/Containers/Data/Application/1D8580C0-AC80-4949-9FDA-31DB463BDA5C/Library/Spotlight/Resources_V3/Default/models/spotlight_l2.mlmodelc and directives path /Users/hunter/Library/Developer/CoreSimulator/Devices/0AF4F46E-5510-4458-B61C-F8A153155809/data/Containers/Data/Application/1D8580C0-AC80-4949-9FDA-31DB463BDA5C/Library/Spotlight/Resources_V3/Default/directives/directives_l2.mdplist I am calling CSUserQuery.prepare() but that doesn't seem to make a difference. Is there more to this than what is on this page? https://developer.apple.com/documentation/corespotlight/building-a-search-interface-for-your-app?changes=latest_minor
Replies
3
Boosts
1
Views
1.1k
Activity
Jul ’24
Semantic Search Demo App
In WWDC24 video https://developer.apple.com/videos/play/wwdc2024/10131/ Jennifer mentioned that the app she's talking about would be available in the link below, but there's no such link provided. Where the mentioned app code could be found?
Replies
0
Boosts
5
Views
818
Activity
Jul ’24
Ios18 bug on “Help apple improve search”
hey guyss…. Im currently using ios18 developer beta 2 on my iphoen 12…Idk if u guys noticed it or not.. but when i turn off the toggle for “Help improve apple search” (settings->search->help improve apple search) it again turns on without my knowledge seconds aftr i close the page. Ive tried restarting my iphone & many more.. nothing seems to work.. im kindoff a more private guy i usually turn off apple analytics.. usage diagnostics and i always make sure data is stored only on my local storage.. and this bug kinda piss me off 😕. i’ve given u the link below to check it out. Peace. https://youtube.com/shorts/YfVDCA-Dfrs?si=qLcl0mWL-Jm9iJFz
Replies
1
Boosts
1
Views
1.1k
Activity
Jul ’24
iOS App Library Search Keywords
Hey everyone! I'm trying to make an iOS app discoverable (in the App Library) with different keywords than its display name. I've experimented with CFBundleName, but it hasn't worked, and I couldn't find any official documentation on it. Has anyone successfully done this or have any tips? I'd love to hear your insights!
Replies
0
Boosts
0
Views
838
Activity
Jun ’24
Spotlight / Finder Search / Finder Tags not working on virtual file system Monterey/Ventura
I'm writing a virtual file system as my educational project (generic kernel extension). Currently, mostly everything is implemented, however, I'm having trouble using Finder search and tags. The results simply don't show up - despite I am having vnop_... calls to those files. The extended attributes are supported. Inodes are stable. Mmap is implemented. Vnop_ioctl returns KERN_SUCCESS (but no implementation). An important moment: Previously, the search didn't work at all. Researching the web has shown me, that Spotlight indexation and Finder search are tightly glued. So basically I was trying to enable support for spotlight, thinking that would be the source of the problem. I was receiving "Unknown indexing state". All those tricks with mdutil, launchd, manual and reindexation either were doing nothing or returning error. The problem was resolved FOR SONOMA by making by VFS appear as local one (adding flags for MNT_LOLCAL and MNT_DOVOLFS). This has changed the state from Unknown indexing state for spotlight to Indexing is disabled. No need to turn it on for me - I am interested only in search and tags, not the spotlight itself. Basically, whether spotlight recognises my driver as no-error, the Finder works correctly, even with indexation disabled. Whether on Monterey*, or Ventura, I get the same problem. However, neither system logs nor my driver show any kinds of errors. The spotlight simply returns error. Reindexation attempt via Security&Privacy returns "Unknown error occured". The metadata for Ventura and Monterey read attempt (mdls) returns "Unable to locate file", however returns a huge list for Sonoma. *Monterey and Ventura never have .Spotlight-V100 folder. No disable indexing files or other spotlight restrictions are present. No user space solutions seem to help. The kext is unsigned and running in an environment with SIP disabled and Security Mode reduced to Permissive. Maybe there some abstract rules for what is required on VFS side to be recognised okay'ish by Spotlight ? Or maybe something specific right for my case ? Any pointers and/or assistance would be greatly appreciated.
Replies
9
Boosts
0
Views
1.5k
Activity
Jun ’24
index.spotlightV3 using 213GB of storage space
Hey there I've been clearing through my storage and found that CoreSpotlight specifically the index.spotlightV3 folder is taking up 213gb of storage which is ridiculous and was wondering if there is a fix for this? Thanks!
Replies
1
Boosts
5
Views
2.0k
Activity
Jun ’24
Are the new Semantic Embeddings in CoreSpotlight multi-lingual?
After watching https://developer.apple.com/wwdc24/10131, I'm curious if the semantic embeddings used to provide the "search of meaning" with this new capability are encoded with multi-lingual embeddings? In particular, if I have content that is mixed in Korean and English, can those be seamlessly indexed together and queries in one language (english) find relevant content that was offered to be indexed as Korean?
Replies
0
Boosts
1
Views
770
Activity
Jun ’24
How do I set some keywords to search apps in app library?
In this picture, users can find '楽天ラクマ' by entering 'メルカリ'. How do I set keywords link 'メルカリ' for an app link '楽天ラクマ'. I thought the apps searched in App Library in iPhone by only their name (CFBundleDisplayName), but it is not fact.
Replies
0
Boosts
1
Views
685
Activity
May ’24
How to create AppEntity shortcut to be shown in Spotlight
I am exploring Appi-Intent and Appshortcut. We can create an action shortcut by using the following code. struct WatchListShortcut: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: WatchListAppIntent(), phrases: [ "Tell \(.applicationName) to open first item in watch list", ], shortTitle: "WatchList item", systemImageName: "systemimage" ) } } What I want to show an entity shortcut like shown in the below screenshot. linkText I am not sure how to create the shortcut like Assigned one in the above screen.
Replies
0
Boosts
0
Views
920
Activity
Apr ’24
MacOS Sonoma: Spotlight Issues - App Indexing
Has anyone else experienced issues with Spotlight losing indexing of the Applications? Spotlight no longer displays any applications in the results when typing in an application name. Additionally it appears to be ignoring the settings of "Spotlight" set within the preferences. Example: I have "Websites" & "Siri Suggestions" turned off, however these still appear in the search results of spotlight.
Replies
44
Boosts
18
Views
18k
Activity
Mar ’24
SecCodeCopyPath and /System/Volumes/Preboot/Cryptexes/App/System
Looking at the path name for reasons, and ran into a thing: one of my coworkers was not getting /Applications/Safari.app as expected, but instead got /System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app. Which is annoying because I'm actually using spotlight to find the paths for applications, and that one doesn't show up. Has anyone run into this? And know why? (I figure I'll simply remove the prefix if it's there, and that should be fine, but I'm curious why it only seems to happen sometimes.)
Replies
4
Boosts
0
Views
4.0k
Activity
Feb ’24
MacOS 14.2 Beta 2 | Spotlight disappearing while input
Hi, in the current Beta 2 of MacOS 14.2 the spotlight search is always disappearing after having put in at least one letter after about 1 second.
Replies
2
Boosts
1
Views
811
Activity
Nov ’23
Does MacOS Sonoma Spotlight still index non-Apple App Content if indexed?
I've recently upgraded to MacOS Sonoma. Spotlight seems to search third-party app names (search for Outlook and you'll find the Outlook app in search results) but it does not seem to surface third-party app content. Is this expected behavior, a widespread bug, or just my issue? For example, Outlook emails, WhatsApp calls, Evernote notes, Venmo contacts, Booking.com stays, Kayak.com trips...used to all be indexed under their respective apps I'm considering indexing my app but first wondering if Sonoma even supports it anymore? Example of App content::
Replies
0
Boosts
0
Views
722
Activity
Nov ’23
Redirect on apple-app-site-association does not break Universal Links
Documentation says that apple-app-site-association file needs to be accessible via HTTPS—without any redirects.However practice shows, that when this file accessible via redirect, Universal Links are working.Is documentation outdated?Can we rely on this behaviour?
Replies
2
Boosts
0
Views
4.9k
Activity
Nov ’23
iOS Spotlight indexing seems to be broken on iOS 17?
Content indexed through CSSearchableIndex.default().indexSearchableItems() is no longer searchable from Spotlight. I created a very small app to demonstrate this. CSSearchableIndex.default().indexSearchableItems() returned no error, yet the result can't be found. import CoreSpotlight import SwiftUI @main struct testspotlightApp: App { var body: some Scene { WindowGroup { ContentView() .onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight) } } func handleSpotlight(_ userActivity: NSUserActivity) { print("Found \(userActivity.userInfo?.debugDescription ?? "nothing")") } } import CoreSpotlight import SwiftUI struct ContentView: View { @State var result = "" var body: some View { VStack { Text("Hello!") Button { let attribute = CSSearchableItemAttributeSet(contentType: .text) attribute.title = "a page title" attribute.contentDescription = "hello this is a page" attribute.keywords = ["search", "this", "page", "title"] let item = CSSearchableItem( uniqueIdentifier: "12345", domainIdentifier: "com.test", attributeSet: attribute) CSSearchableIndex.default().indexSearchableItems([item]) { error in if let error { result = "Failed to index: \(error.localizedDescription)" } else { result = "Successefully indexed to spotlight. Try searching 'a page title'" } } } label: { Text("Index a page").font(.title) } Text(result).multilineTextAlignment(.center) } .padding() } } Has anyone else seen the same issue?
Replies
16
Boosts
9
Views
7.5k
Activity
Oct ’23
Spotlight AppStore section does not show my app
Hi: When I type on spotlight the name of my app, the App Store section does not show my app to download, unless I write "myAppname app". Also, in the simulator, if I put the app name and keep pressing the option it shows the app, but no in other cases. Any ideas about why it is? Thanks in advance
Replies
0
Boosts
0
Views
845
Activity
Sep ’23
Universal Deep Linking with redirects
I was wondering if it was possible to get Universal Deep Linking working with redirects that open up Safari first. I've successfully gotten deep linking to work when doing a normal link to the site, but when it is behind a link that is created by a marketing company, that link opens up Safari first, then opens the mobile web browser and not the app itself.Is it possible to go from a redirect in Safari to the app?
Replies
14
Boosts
0
Views
38k
Activity
Aug ’23
Unable to set the new App Tint Color options for App Shortcuts
I'm working on creating App Shortcuts for my app to show up in the Shortcuts app and Spotlight. One new feature this year is the option to add your apps tint color as a background, but I'm not able to get this to work. I have added the items NSAppIconActionTintColorName (String) and NSAppIconComplementingColorNames (Array?) to my info.plist file that where briefly mentioned in the WWDC23 video, but they don't seem to have any effect. Has anyone got these to work in their project?
Replies
3
Boosts
4
Views
3.7k
Activity
Jul ’23
Spotlight/metadata can be so very annoying
sef% mdls /Applications/Google\ Chrome.app/Contents/Frameworks/Google\ Chrome\ Framework.framework/Versions/112.0.5615.137/Helpers/Google\ Chrome\ Helper.app kMDItemFSContentChangeDate = 2023-04-17 23:59:16 +0000 kMDItemFSCreationDate = 2023-04-17 23:59:16 +0000 kMDItemFSCreatorCode = "" kMDItemFSFinderFlags = 0 kMDItemFSHasCustomIcon = 0 kMDItemFSInvisible = 0 kMDItemFSIsExtensionHidden = 0 kMDItemFSIsStationery = 0 kMDItemFSLabel = 0 kMDItemFSName = "Google Chrome Helper.app" kMDItemFSNodeCount = 1 kMDItemFSOwnerGroupID = 0 kMDItemFSOwnerUserID = 0 kMDItemFSSize = 1 kMDItemFSTypeCode = "" sef% mdfind 'kMDItemFSName == "Google Chrome Helper.app"' So there's a metadata key that has a value... but mdfind won't find it. I haven't tried writing a small program to see if it would find it yet, although I am somewhat curious if it would.
Replies
0
Boosts
0
Views
895
Activity
May ’23