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

> On Jan 24, 2014, at 4:49 PM, Charles Srstka <cocoa...@charlessoft.com> wrote:
> 
>> 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.
> 
> Wow, I’ve never heard about that. That’s quite problematic.

One caveat, of course, is that I haven't tested this on Mavericks, so it's 
possible that this may have changed. It was definitely behaving that way on 
previous OS X versions, reproducibly.

I thought I had filed a Radar on this, but now I can't find it in my history. 
:-/

>> 
>> 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.
> 
> I *would* do that, but the app in question is sandboxed, so it surely can’t 
> change users’ preferences. Oh, the agony! :)

Well, that's for a good reason, you see. If your app were able to change users' 
preferences, it might be able to... erm... take over... uh... file associations.

Hrm.

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