Macos custom url schemes - retrieving parameters?

On macos, you can register custom URL schemes to create links that open an application: Defining a custom URL scheme for your app | Apple Developer Documentation

Meaning you can use link my-application:// in the browser and it will open your application.

That in itself is fairly easy and I found out that the bundler that I use (cargo-bundle) already allows configuring that out-of-the-box.

The harder part seems to be getting parameters from the URL in the application itself. They're seemingly not passed as command line arguments.

The apple doc above gives an example on how to retrieve them with objective-c.

Does anyone have pointers on how the same thing could be achieved in Rust, in the context of an egui/winit application?

Best,
n

winit has some documentation on how to create a custom ApplicationDelegate that should receive the url that was opened winit::platform::macos - Rust

Here are the winit docs on how to register a custom application delegate:

(SkiFire13 beat me to it)