Post not yet marked as solved
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.
I like to find a way to identify network volumes, and whether they're run by certain servers, e.g. specifically whether they're on a Synology NAS.
Reason is that Synology, while apparently supporting the Spotlight-over-SMB API, comes with a lot of bugs, requiring me to work around them when searching on those volumes with the macOS Spotlight API.
I could, of course, ask the user to "configure" each mounted volume in my software, but I'd rather do this automagically, if possible, as it's less prone to user mistakes.
So, my question is: Is there a way to learn a bit more about the server of a mounted network volume? E.g., if I could learn its IP address, I could try to connect to it via http protocol and then maybe get a useful response that identifies it as being from Synology.
Or, alternatively, can I tell which SMB volumes are served by a Mac, so that I can at least assume that those handle Spotlight calls correctly, while I assume anything else is buggy (so far, AFAIK, Synology is the only other SMB server that supports Spotlight search).
I've tried to find some data in the IORegistry, but that doesn't seem to store anything about network vols. The statfs function doesn't seem to give me anything for that either, nor do the various fcntl calls as far as I could tell.
I also checked with the DA apis, e.g.:
DASessionRef daSession = DASessionCreate (NULL);
CFURLRef furl = CFURLCreateWithFileSystemPath(NULL, CFSTR("/Volumes/TheNAS"), kCFURLPOSIXPathStyle, true);
DADiskRef daDisk = DADiskCreateFromVolumePath (NULL, daSession, furl);
if (daDisk) {
CFDictionaryRef daInfo = DADiskCopyDescription (daDisk);
NSLog(@"%@", daInfo);
}
However, this only prints basic information:
DAVolumeKind = smbfs;
DAVolumeMountable = 1;
DAVolumeName = TheNAS;
DAVolumeNetwork = 1;
DAVolumePath = "file:///Volumes/TheNAS/";
Where, then, does Finder's "Get Info" get the smb path from, for example?
Post not yet marked as solved
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.)
Post not yet marked as solved
Like the image showing, the element 'Ask ChatGPT' attaches below siri search suggestion , I guess SiriKit or Spotlight can implement it.
But i searched a lot, no one introduct the detail technology.
Do anyone ever implement it?
Please help me. Thanks.
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.
Post not yet marked as solved
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::
Post not yet marked as solved
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?
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?
Post not yet marked as solved
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
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?
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?
Post not yet marked as solved
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.
Post not yet marked as solved
Hey
Whenever I run mdfind, it prints some annoying debug output. Example:
$ mdfind ……………
2023-04-24 07:21:53.046 mdfind[642:1948002] [UserQueryParser] Loading keywords and predicates for locale "de_CH"
2023-04-24 07:21:53.047 mdfind[642:1948002] [UserQueryParser] Loading keywords and predicates for locale "de"
…
That's on macOS Ventura 13.3.1 (22E261). I've got another mac with an older macOS, and there mdfind didn't do this.
While googling, I found a post on reddit with a "solution", which just filters out those lines from stderr, like so:
function mdfind() {
/usr/bin/mdfind $@ 2> >(grep --invert-match ' \[UserQueryParser\] ' >&2)
}
This does not solve the problem, it just hides it.
Is there a way to turn off these debug messages?
Thanks,
Alexander