fix: open the note a Spotlight result points at on the Mac#312
Merged
Conversation
This was referenced Jul 10, 2026
Spotlight results launched the app but never navigated. Two causes: neither target declared NSUserActivityTypes, so the system never handed the CSSearchableItemActionType activity to the SwiftUI scene; and on macOS that scene modifier never fires for Spotlight at all, so the Mac app now catches the activity in an app delegate and forwards the note id over NotificationCenter (same pattern as the ⌘N command). Also folds in the pending project.yml change dropping the App Sandbox from the dev-signed build — sandboxed ad-hoc builds don't surface their indexed items reliably. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fjbarrett
force-pushed
the
fix/mac-spotlight-open
branch
from
July 10, 2026 01:53
93cdb0a to
6f145fe
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NSUserActivityTypes(com.apple.corespotlightitem) in both targets' Info.plists — without it the system launches the app on a Spotlight click but never delivers the activity, so the app opened without navigating.onContinueUserActivityeven when declared, so the Mac app now catchesapplication(_:continue:restorationHandler:)in anNSApplicationDelegateand forwards the note id overNotificationCenter, the same pattern the ⌘N menu command uses.project.ymlchange that drops the App Sandbox from the dev-signed Mac build (sandboxed ad-hoc builds don't reliably surface their Core Spotlight items).Test plan
xcodebuild -scheme KeepMacbuilds; built app's Info.plist carriesNSUserActivityTypesand no sandbox entitlement🤖 Generated with Claude Code