Hello,

Suppose I have an application which can read and write images (using Image I/O). To make this known to the OS, I have to add stuff to my Info.plist, and wanted to do this using UTIs as I understand that's the new standard. However, I have a few problems here.

First, do I really have to add all types to my Info.plist file? If the OS gets an update which adds a new file type to Image I/O, I have to update my Info.plist?

I copied the relevant part of Preview.app, so I now have a nice list of two dozen of supported UTIs in my plist. However, I understood that when adding a "known" UTI, the system somehow would be able to fill in things like file extensions and human readbale file type name ("Portable Network Graphics file" for "public.png"). Do I need to add all the UTIs to the "imported types" section for that to work..?

I noticed that I needed to add "Document Type Name" to each supported type, or they would not show up in the File Types pop up in the save panel I get when selecting "Save As...".

But when a type is selected there, I notice that I receive this "human readable" string as typeName in my writeToUrl:ofType:error. That's unfortunate, because CGImageDestinationCreateWithURL doesn't understand these typeNames, and wants the UTI. Do I really have to set up a table linking these human readable type names to UTIs programmatically?

Also, I notice that I have to add file extensions to each type myself or my app's Open File panel keeps the files greyed out. This is probably related to the "import UTIs" question above.

I (think I) have read the relevant documentation on developer.apple.com, but I can't seem to figure this out. I'm sure I can get it to work by adding extensions and CFBundleTypeNames to all the UTI types, and doing a lookup translating the CFBundleTypeName back to the UTI, but I have a feeling this can't be the proper way...

Thanks,
Sander

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to