Skip to content
This repository has been archived by the owner on Mar 7, 2020. It is now read-only.

Can I use this with args on MacOS? #52

Open
a-christie opened this issue Jul 17, 2019 · 2 comments
Open

Can I use this with args on MacOS? #52

a-christie opened this issue Jul 17, 2019 · 2 comments

Comments

@a-christie
Copy link

I managed to get this to work on MacOS. (Would be helpful to add a line to the readme stating that you have to bundle the app for this to work on MacOS.)
The app does open but if I provide an argument to the link, e.g. "scheme://ARG", is there a way for me to use that argument inside my app?

@hunterlester
Copy link

Yes, you are right about documentation needed for MacOS, thank you.

In our network browser, we obtain the passed argument either through Electron's second-instance event or Electron's MacOS-specific open-url event.

What kind of application are you building and which language?

@a-christie
Copy link
Author

Thanks for the quick response!
I was using Electron until recently but am now directly using your code in a compiled Rust app as I don‘t really need a GUI and therefore Electron is a lot of unnecessary dead weight to ship.

I‘m trying to make a custom protocol that allows me to show files and folders in the native explorer from within the browser (Reveal in Finder on MacOS and Reveal in Explorer on Windows). I use a jsonwebtoken to verify that only my application can launch that kind of link.

My application works really well on Windows as on that platform when the application is launched via the URI Windows simply passes the whole URL as a argument to the app. However, this doesn‘t seem to work like that on MacOS.

Would you have any hints as to what I could try?

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants