uti

pboard types will be deprecated

According to NSPasteboard.h (line 294 in the standard Snow Leopard copy of the Xcode SDK) it states: /* Use of pboard types should be replaced with use of UTIs. Pboard types will be deprecated in a future release. */ I've tried finding samples of using UTIs as a replacement for pboard types but I can't find anything anywhere that demo...

Getting an Uniform Type Identifier for a given extension

Hello, I'm trying to find some way in Cocoa to translate from file extensions to Uniform Type Identifiers. That is, I want to find some way of doing this: ".jpg" => "public.jpeg" ".html" => "public.html" ".ttf"=> "public.truetype-font" I've searched on the NSWorkspace docs but couldn't find anything. The closest I could get was: - (...

Testing if an application can open a specific type?

On Mac OS X, how can I tell if a given application opens a specific type? I have two UTIs that I'm interested in: public.text and public.image and I have a list of applications. I want to filter the list by those two types so I have a list of text viewers and a list of image viewers. I've seen a related question on SO where it's possib...

How do I make a file that identifies as a custom UTI type?

Right now I have an application that generates an XML file. We'll call it someFile.myapp When my app saves the file and look at it using mdls it has a kMDItemContentType of "dyn.234kdfsjk23jk24234kjfd" How can I get the UTI type of the file to be a custom value like com.mycompany.myapp? ...

Assigning UTI to file type

I'm trying to add UTI for a pair of file types, matching by extension. I think I've got it setup properly - at the very least, the file extension -> UTI mapping is recognized (I declared it as an imported type in info.plist). However, when I try to get the UTI off of my test file, I get back a dynamic UTI. Here's the sample code I'm usin...

Prevent Preview of Custom UTI File Types on iPad

I have an iPad application with a custom file type declared via UTI and CFBundleDocumentTypes. Is there a way I can prevent applications like Mail and Dropbox from showing the file Preview while still allowing the "Open In..." option to launch my app? I have set UITypeConformsTo and UTTypeTagSpecification to custom values in the applicat...