fix: handle macOS deep-link URLs via Apple Event handler#23
Open
fix: handle macOS deep-link URLs via Apple Event handler#23
Conversation
On macOS, void:// URL activations are delivered via Apple Events (kAEGetURL), not as CLI arguments. Uses the Carbon AEInstallEventHandler API to capture URLs and feed them into the existing pending_deeplink mechanism. Handles both cold start and warm activation. All new code is behind #[cfg(target_os = "macos")].
a9f3912 to
c986902
Compare
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
Fixes
void://deep-link navigation on macOS. Links from browser oropencommand open Void but don't navigate to the target location.Root cause: On macOS, URL scheme activations are delivered via Apple Events (
kAEGetURL), not as command-line arguments like on Windows/Linux. The app was only checkingstd::env::args(), so the URL was silently dropped.Fix: Register an Objective-C Apple Event handler (
NSAppleEventManager+kAEGetURL) on macOS that captures the URL and feeds it into the existingpending_deeplinkmechanism. Handles both cold start (app not running) and warm activation (app already running).#[cfg(target_os = "macos")]— zero impact on Windows/Linuxobjc2(already in dependency tree viaarboard)Reported by @luketych in #17.
Test plan
open "void://open/<workspace-id>/@0,0,1.0"from Terminal → app navigatesvoid://link in browser → app navigatesopen "void://..."→ app launches AND navigates