Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UTI declarations vs. CFBundleDocumentTypes




On Oct 5, 2005, at 8:52 AM, Jeffrey Koppi wrote:

As of 10.4, document role claims may reference document type
information via a UTI instead of by listing extensions and OSTypes
explicitly.

So which <key> do you use inside a CFBundleDocumentTypes array to make a claim via UTI? Is it LSItemContentTypes?

Correct. On 10.4.x, when LSItemContentTypes is present, then the CFBundleTypeExtensions, CFBundleTypeOSTypes and CFBundleTypeMIMETypes keys are ignored. You will still want to use CFBundleTypeName to provide a localizable kind string, CFBundleTypeRole to specify the document role, and CFBundleTypeIconFile to specify an application- specific document icon. The value of the LSItemContentTypes key is an array of uniform type identifiers.


The Launch Services documentation is in the process of being updated to cover this feature. For now, there is at least this Spotlight- specific example of using LSItemContentTypes:

http://developer.apple.com/documentation/Carbon/Conceptual/ MDImporters/Concepts/WritingAnImp.html

Also, if we want to support both MacOS X 10.3 and 10.4, should we keep the CFBundleTypeOSTypes and CFBundleTypeExtensions entries specified within the CFBundleDocumentTypes section of the plist also. Seems redundant since this info is in the UTExportedTypeDeclarations, but maybe it's necessary? Or is the claim using the UTI enough, even for 10.3?

You must keep the CFBundleTypeOSTypes and CFBundleTypeExtensions entries in order to remain compatible with Mac OS X 10.3 and earlier. We tried to keep it as simple as possible: On 10.3 and earlier, CFBundleTypeOSTypes and CFBundleTypeExtensions are required. On 10.4 and later, you may use LSItemContentTypes, and when you do, the system ignores the legacy keys (CFBundleTypeExtensions, CFBundleTypeOSTypes and CFBundleTypeMIMETypes).


-Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: UTI declarations vs. CFBundleDocumentTypes (From: Jeffrey Koppi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.