• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File association using file magic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File association using file magic


  • Subject: Re: File association using file magic
  • From: Charles Srstka <email@hidden>
  • Date: Fri, 24 Jan 2014 15:49:17 -0600

On Jan 24, 2014, at 1:25 PM, SevenBits <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


References: 
 >File association using file magic (From: Remco Poelstra <email@hidden>)
 >Re: File association using file magic (From: Remco Poelstra <email@hidden>)
 >Re: File association using file magic (From: Sean McBride <email@hidden>)
 >Re: File association using file magic (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: FlagsChanged while NSMenu is displayed
  • Next by Date: Re: Does UIAutomation testing even work?
  • Previous by thread: Re: File association using file magic
  • Next by thread: Re: File association using file magic
  • Index(es):
    • Date
    • Thread