Hi, I built a custom electron app, installed it on Mac OS X. It is registering custom protocol fine, and even opens the app when I try to open using open todo://whatever (the custom protocol example is todo). The application opens but the url todo://whatever is NOT passed as process argument. I am printing the arguments and all I see is process args /Applications/todo.app/Contents/MacOS/todo
My build config is as follows
"build": {
"appId": "",
"mac": {
"category": ""
},
"protocols": [{
"name": "todo",
"role": "Viewer",
"schemes": ["todo", "todos"]
}]
}
OSX doesn't pass them as arguments, unlike every other OS (that'd be too easy). You need to register an open-url event handler on your app object and parse them there. Build config looks good, so it should work once the event handler is set up.
Most helpful comment
OSX doesn't pass them as arguments, unlike every other OS (that'd be too easy). You need to register an
open-urlevent handler on your app object and parse them there. Build config looks good, so it should work once the event handler is set up.