On Dec 10, 2012, at 11:44 AM, Sean McBride <s...@rogue-research.com> wrote:

> On Mon, 10 Dec 2012 18:33:00 +0800, Rick C. said:
> 
>> Hoping for some clarification here...with a Mac app if I set a bunch of
>> extensions in a document type in my info.plist with the role of viewer
>> will it cause my app to "hijack" these extensions and become the default
>> app to open with?  This is not my intention I just want my app to be
>> able to open these extensions but I do not want it to become the
>> default.  Thanks for the input,
> 
> No, it should not 'hijack' like that.  If your app is the *only* one that 
> recognises those extensions, it probably will become default for those.  You 
> might want to read up on 'launch services'.

While that's true in theory, in practice I have found that in certain cases, it 
is quite possible for an app to inadvertently steal default app settings from 
Apple's built-in apps, particularly if you register for the UTI and the 
built-in app is, for some reason, still using filename extensions. If this is 
the kind of app that should never become the default, I suggest you do what I 
do these days — check LaunchServices on startup, see if you've become the 
default app for something you shouldn't have (check for nil too, because this 
can end up pointing to you), and change the default back to the Apple-supplied 
app if necessary. The alternative is to get a lot of angry e-mails from users 
who assume you're deliberately doing something sneaky or malware-y to take over 
their system, which is really not the image you want to present.

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