Hello, I was wondering if anyone has done it before, found several examples on regular electron apps, but having trouble on figuring out how it has to be done using meteor-desktop, already tried following https://www.electronjs.org/docs/api/protocol but couldn’t make it work as all custom code should go inside .desktop/desktop.js
which abstracts all of electron internal workings if I’m correct.
Added also this to the builderOptions
"protocols": [
{
"name": "my protocol",
"role": "Viewer",
"schemes": [
"myprotocol"
]
}
]
then on desktop.js
I tried the following, but its not working when trying to open a link with myprotocol://test
eventsBus.on('beforeLoadFinish', () => {
app.setAsDefaultProtocolClient('myprotocol')
});
app.on('open-url', function (event, url) {
event.preventDefault()
console.log(`url triggered on procotol: ${url}`);
});
Tried building as well as I read somewhere that it only works on built apps and not on development FYI.
Thank you