On Apr 4, 2016, at 08:30 , Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote:
> 
> That is, how to associate a special UTI with the file?

You first need to *define* your own UTI. Add an entry to the Exported UTIs 
section of the Info pane of the OS X app target in Xcode. For the UTI 
identifier, enter a unique name using reverse-DNS format, similar to your app’s 
bundle ID. You’ll also want a description (shows in Finder Info windows), an 
extension, an icon, and specify conformance to public.data (assuming it’s a 
pure data file, not a package).

If the app is document-based, you’ll also want to create (or modify) an entry 
in the Document Types, so that you can save in this format. Enter the UTI that 
you chose as the type’s Identifier. (The extensions and icon in the Document 
Type entry are ignored in this case.)

If the iOS app is document-based, you’ll do the same thing (Exported UTI and 
Document Type that uses it) in that app target.

Note that since you (or, really, your apps) are the “owners” of the UTI, you 
specify the UTI in Exported UTIs. If you ever need to use a UTI defined by 
another app, your own or someone else's, you would re-define it in the 
*Imported* UTIs of your app. That’s how you say, “This app uses the UTI defined 
by another app, but if that other app happens not to be installed on this 
device, here are the details so that files using the UTI can be recognized by 
Launch Services anyway."
_______________________________________________

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
  • UTI Gerriet M. Denkmann

Reply via email to