Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

albebaubles

macrumors 6502a
Original poster
Feb 9, 2010
644
567
Sierra in view
I'm writing an app that uses a proprietary file extension. The app will successfully open when a file with that extension is double-clicked in finder, but what I would like is for the app to open automatically when a file that the proper extension is downloaded via safari.

Can anyone shed some light on how to do this? MUST I much around with the DownloadAssessment.plist file, or is there a simpler way for me to do this within my xcode project?

Thank you very much indeed -- my client really wants this functionality.
 
You could probably use Folder Actions.

Create a folder action that opens a file with your extension, when that file appears in the folder. Assign the folder action to your brower's downloads folder (which may not be your Downloads folder, if it's been changed in the browser). When Safari has the download in progress, it will be named whatever.download. Only when the file is completely downloaded will it be named "whatever".

The only other way I can think of to do this is with a browser plugin that recognizes either MIME-type (one you define for your app) or the extension.

In olden times, most browsers had a way to add "helper apps" that could be opened when a particular extension of a download was detected. Mercifully, those days are largely behind us.
 
You could probably use Folder Actions.

Create a folder action that opens a file with your extension, when that file appears in the folder. Assign the folder action to your brower's downloads folder (which may not be your Downloads folder, if it's been changed in the browser). When Safari has the download in progress, it will be named whatever.download. Only when the file is completely downloaded will it be named "whatever".

The only other way I can think of to do this is with a browser plugin that recognizes either MIME-type (one you define for your app) or the extension.

In olden times, most browsers had a way to add "helper apps" that could be opened when a particular extension of a download was detected. Mercifully, those days are largely behind us.

I thought about setting up folder actions during the install of the app, but to me this is more evil than adding DownloadLoadAssessment.plist file to the user's prefs folder (although, the downloadassessment file doesn't kick in until you've bounced Safari, which is a drag).

I was hoping I could add LSRiskCategoryExtensions to my info.plist file, but that doesn't appear possible.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.