{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/6815","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/6815/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/6815/comments","events_url":"https://api.github.com/repos/electron/electron/issues/6815/events","html_url":"https://github.com/electron/electron/issues/6815","id":170718675,"number":6815,"title":"How can I relaunch my electron app with a different custom url protocol params in OSX?","user":{"login":"nishant09","id":7454585,"avatar_url":"https://avatars.githubusercontent.com/u/7454585?v=3","gravatar_id":"","url":"https://api.github.com/users/nishant09","html_url":"https://github.com/nishant09","followers_url":"https://api.github.com/users/nishant09/followers","following_url":"https://api.github.com/users/nishant09/following{/other_user}","gists_url":"https://api.github.com/users/nishant09/gists{/gist_id}","starred_url":"https://api.github.com/users/nishant09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nishant09/subscriptions","organizations_url":"https://api.github.com/users/nishant09/orgs","repos_url":"https://api.github.com/users/nishant09/repos","events_url":"https://api.github.com/users/nishant09/events{/privacy}","received_events_url":"https://api.github.com/users/nishant09/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-11T18:52:40Z","updated_at":"2016-08-11T23:40:18Z","closed_at":"2016-08-11T23:40:18Z","body":"* Electron version: v0.34.1\r\n* Operating system: 10.11.5\r\n\r\nI have an electron app running on my Mac. Now I want to relaunch it with the deep link.\r\n\r\nfor example: if I execute my-electron-app://v=1&param1=value1&param2=value2, this should relaunch the electron app and pass those parameters(process.argv) so I can process them and redirect the user accordingly.\r\n\r\nCurrent behavior: When I click on the deep link, my app window just appears on the screen, doesn't relaunch.\r\n\r\nCurrently I've below code to process the custom url params:\r\napp.on(\"open-url\", function(event, url) {\r\n   (<any>global)[constants.macParams] = url;\r\n});"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/239325726","html_url":"https://github.com/electron/electron/issues/6815#issuecomment-239325726","issue_url":"https://api.github.com/repos/electron/electron/issues/6815","id":239325726,"user":{"login":"MarshallOfSound","id":6634592,"avatar_url":"https://avatars.githubusercontent.com/u/6634592?v=3","gravatar_id":"","url":"https://api.github.com/users/MarshallOfSound","html_url":"https://github.com/MarshallOfSound","followers_url":"https://api.github.com/users/MarshallOfSound/followers","following_url":"https://api.github.com/users/MarshallOfSound/following{/other_user}","gists_url":"https://api.github.com/users/MarshallOfSound/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshallOfSound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshallOfSound/subscriptions","organizations_url":"https://api.github.com/users/MarshallOfSound/orgs","repos_url":"https://api.github.com/users/MarshallOfSound/repos","events_url":"https://api.github.com/users/MarshallOfSound/events{/privacy}","received_events_url":"https://api.github.com/users/MarshallOfSound/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T23:40:18Z","updated_at":"2016-08-11T23:40:18Z","body":"If you are inside the app, why do you need to launch the app through a global protocal handler?\r\n\r\nWhy not use IPC to pass new parameters to the main process?\r\n\r\nRegardless, that won't **relaunch** the app, that would simply fire the **open-url** event.  If you want to relaunch it you need to update Electron versions and change your listener to be.\r\n\r\n```js\r\napp.on('open-url', (event, url) => {\r\n  app.relaunch({\r\n    args: url,\r\n  });\r\n});\r\n```\r\n\r\nFWIW as well, questions like this should really go on Slack or the discussion forums.  The github issues section is for bugs"}}
{"actor":{"display_login":"MarshallOfSound"}}