What i want to achieve?
Entering a URL scheme like this myApp://someData in the browser should open my app and pass the URL (in Linux).
All the examples i have found are good for Windows/Mac Os and do not work in Linux
Im using electron-builder to bundle my Electron app so to configure a scheme, i added the following to my package.json
"protocols": [
{
"name": "myApp",
"role": "Viewer",
"schemes": [
"myApp"
]
}
]
Lets assume that works - i have no idea how to test it.
How do i intercept a myApp://someData URL in my electron app?
i tried:
app.on('open-url',..... but that is for Mac OS only
i tried protocol.registerFileProtocol('myApp', (request, callback) => {...})
which didnt work as well.
Is this thing even possible in Linux machines? If it is, how?