Hi, I'm trying to hook up a Go application to a URL protocol handler in Mac OS X. I want a user to be able to click on a link such as myapp://foo/bar and have that launch myapp and be able to access the full query parameters. I've made it as far as getting the OS to register the handler and launch the app. That's done by bundling the Go binary into a OS X-style .app package with a Info.plist file like this: https://gist.github.com/chrissnell/db95a3c5ad6ceca4c673e96cca0f7548
The challenge now is to figure out how to reference the query parameters within Go. I've determined that they're not passed as command-line arguments. From what I can tell, you have to use Cocoa libraries to get at them [1]. I don't know Objective-C or Swift, though, so that's where I'm stumbling. There are cheap hacks to do this with AppleScript [2] but I wanted something more native. Has anybody done this? Chris [1] http://fredandrandall.com/blog/2011/07/30/how-to-launch-your-macios-app-with-a-custom-url/ [2] https://support.shotgunsoftware.com/hc/en-us/community/posts/209485898-Launching-External-Applications-using-Custom-Protocols-under-OSX -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.