On Jan 24, 2014, at 1:25 PM, SevenBits <sevenbitst...@gmail.com> wrote:

> I personally hate this, especially if your app reads file types other apps 
> share with you. For instance, one of my programs opens ISO files, and one 
> user emailed to tell me my app was opening every time he clicked on it. Now, 
> it was his fault, as he set the file association, but he blamed me.
> 
> Users can be so annoying sometimes.

Not necessarily the user's fault; I've seen it happen often that LaunchServices 
just decides to make some other app the default, even though there's an 
OS-provided app that really *should* remain the default until someone 
explicitly changes it. This is particularly bad for the apps that live in 
/System/Library/CoreServices (like DiskImageMounter, in your ISO example), as 
some of those seem to be still using CFBundleTypeExtensions in their 
CFBundleDocumentTypes dictionary instead of a UTI, and LS always seems to 
prefer apps that use UTI over ones that don't if no explicit default is set, so 
if your app uses a UTI for those types, control will be handed over to you 
instead of DiskImageMounter simply because the user downloaded your app.

My solution was just to check the file associations on startup, and if it's set 
to me, change it back to the OS-provided app. It's a kludge, but it's stopped 
the angry e-mails, and all is right with the world.

Charles

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to