I have developed a macOS app which will allow the app to be launched if the user double-clicks on a file with my defined file extension. The file extension association was done inside the Info.plist file. I am able to double-click a file to launch my app successfully. However, I can't seem to find out how I can get the name of the file that was used to launch the app.
The file name does not seem to be stored as part of argv
. In my app I would like to be able to get the name of the file, perform some initialization code, and then open the file in my app environment.