OSX/MacOS Search priority for app when opening custom extension I'm new to the Mac world but have written my first application. I have it packaged as a .app (let's say my_application.app).

My application registers a custom file extension (let's say .xyz). When you open a .xyz file it will open with my_application.app. However, I'm noticing if I have several my_application.app on my machine it's hard to figure out which one will load when you double click on a .xyz file. 

For instance, I had my_application.app in my applications folder, but I also had one (an older version) on my desktop. I expected the one in the applications folder to handle opening .xyz files, but instead the one from the desktop opened.

Is there definitive documentation on what the search priority is for finding an app for a custom file extension?
You can choose which application must handle a file type. And change the default application. 

You can do it once:


Right mouse click on file
Open with...
It opens the file in the chosen application once. 




Or you can decide which application must open all files for a particular file type. 


Right mouse click on file
Get Info
Section 'Open with'
Choose the application you want to use for all files from this file type. 
Press the 'Change All...' button