My application is an Electron.js app
I type this command in the terminal to open a file with my app:
open "/Users/Bob/Pictures/test.jpg" -a myApp
In my process.argv
I get an Apple event, something like '-psn_0_#######', How do I use this event to get the jpg?
On windows you parse
process.argv
(in the main process) to get the filepath. but on mac you need to listen to the 'open-file' event. This can be done like this:https://github.com/electron/electron/blob/master/docs/api/app.md#event-open-file-macos