Re: document types question
Re: document types question
- Subject: Re: document types question
- From: Ken Thomases <email@hidden>
- Date: Wed, 9 Feb 2011 22:50:09 -0600
On Feb 9, 2011, at 9:36 PM, Rick C. wrote:
> In my project's Info.plist I have included numerous extensions under Document types so that my app will open these kinds of files. Now I know this adds my app to the Open With contextual menu item in Finder, but I was told my app is also somehow making itself the default app for these extensions I have added. Is this actually possible? If so I have not coded it this way (and actually don't know how without researching it) and I don't want my app to take over the position of default app for these extensions unless a user set it up that way on their own. Any advice on helping me understand this a bit better would be great. Thanks!
Usually, apps make passive claims to support document types, just as you've done. They are not actively claiming that they are the default application to open such document types.
However, that does not mean your app will only be in the Open With menu. If the user has not specified their preference, and your app is the best choice to open a given document type, it will be used to open such documents by default -- i.e. when the user double-clicks such a document. This is up to the system (the Launch Services framework). If this is all that's happening, you haven't done anything wrong.
Well, there's one thing you should be careful about. You should import UTI definitions for document types you don't own, rather than exporting them. I believe the system gives preference to apps which export the UTI definition over apps which merely import it or use the pre-UTI document type claims.
If the user had a different app that used to handle those document types and installing your app has spontaneously switched those documents to open with your app, that's because a) they had never explicitly expressed their preference, it was just "accidental"; and b) the system has decided for whatever reason that your app is a better choice to open that document type. This may be a difference in the claimed role (editor, viewer, etc.), your app is newer, has a higher version number (although that should only matter between apps with the same bundle ID), etc.
Regards,
Ken
_______________________________________________
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