Can I hide directory / path from Launch Services?

I would like to be able to create test applications (like Minefield / Firefox nightly) without launching applications determining that they are the best way to open the assigned file types.

Is there a way to hide the ~ / src directory from Launch Services so that the Finder doesn't register apps in that folder?

+1


source to share


2 answers


I don't know how to do this, but you can change the bundle ID of your development apps so that they are not considered the preferred app for this content type / URI scheme using LaunchServices.



+1


source


and for Firefox in particular, the answer is that if OS X finds multiple applications that can handle the URL scheme, it will use the application with the highest version number. So, to spoof OS X you can edit mozilla-central/browser/app/macbuild/Contents/Info.plist.in

and change CFBundleShortVersionString

from

    <string>%APP_VERSION%</string>

      

to

    <string>0.%APP_VERSION%</string>

      



Thus, OS X will think that the application is, say, version 0.3.2apre1, and it will prefer the "real" version of Firefox.

A more general solution is possible. OS X prefers applications on the local volume over applications on the remote volume, and among local applications, preferences on the boot volume. Thus, it is possible to do some type of loopback and keep the source code on a closed "volume", which again lowers its priority.

How OS X determines which application to launch for a given document or URL:

Service Starting Guide: Preferred Applications

+1


source







All Articles