So, no matter what you do, your Dock tile doesn’t highlight when you drag a document onto it. You’ve hexadecuple-checked your CFBundleDocumentTypes list, and everything looks correct, but Dock is not co-operating and you just want to kick it.
Finally, you decide to remove the LSItemContentTypes key, and it works just fine! How can this be?
Well, since Tiger, LSItemContentTypes shuts out all the other document-type tag keys. Your CFBundleTypeOSTypes, your CFBundleTypeExtensions—all of those are ignored when LSItemContentTypes is present; it looks at nothing but the LSItemContentTypes list. Taking out LSItemContentTypes forces LS to look at your OSTypes and extensions lists instead.
More to the point, your problem is that the set of UTIs you’ve specified does not contain the UTI of the would-be document that you’re dragging.
You could be forgiven for expecting that having com.apple.application in your set of UTIs would allow you to open applications as your documents. This is not true, because a standardly-constructed Mac OS X application is of type com.apple.application-bundle. That type does conform to com.apple.application, but it is not equal to com.apple.application, so the Dock refuses your drag with a dismissive wave of its kerchief bundle and an AIFF file of a sharp “hmph!”.
So how do you find out the true UTI of your document?
The easy way is mdls. Ask for the kMDItemContentType property:
% mdls -name kMDItemContentType Foo.app Foo.app ------------- kMDItemContentType = "com.apple.application-bundle"
% launch -f Foo.app Foo.app: Mac OS X application package type: 'APPL' creator: … architecture: PowerPC, Intel 80x86 bundle ID: … version: … kind: Application content type ID: com.apple.application-bundle contents: 1 item created: 2007-07-23 07:12:31 modified: 2007-07-23 07:12:31 accessed: 2007-07-23 07:12:41 [only updated by Mac OS X] backed up: 1903-12-31 17:00:00
Either way, put that UTI into your list. Then drags will work.
In summary, the Dock checks for equality of the prospective document’s UTI to the UTIs listed under LSItemContentTypes, not conformity. You need to list every UTI you support in your Info.plist, including those that conform to the ones you expect. It’s either that or give up on UTIs entirely.
(Summary suggested by wootest.)
UPDATE 08:44: ssp suggested mdls instead of launch.