I am using Xcode 7.3.1 to create a Cocoa document based application. I notice that in the Document Types info panel there is an option that I don't understand. It says "Document is distributed as a bundle" and it looks like this.
I found that this option controls the LSTypeIsPackage
key for CFBundleDocumentTypes
in the app's Info.plist file. I was able to find only two explanations of the usage of this key in Apple's official documentation. Both were very brief entries in relatively large tables.
The first explanation from the App Creation Process Overview. It is very brief and offers no more information than the screenshot above.
A Boolean value specifying whether the document is distributed as a bundle. If NO, omit this value.
The second explanation is a little more helpful. It comes from the Mac Developer Library's Information Property List Core Foundation Keys Reference.
Specifies whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. (In OS X v10.4 and later, this key is ignored if the LSItemContentTypes key is present.)
It almost sounds as if this option affects how the application bundle itself is treated by the OS. If that's the case then I really have no idea what to make of these descriptions.
I know that many document types (such as .xcodeproj
documents) are actually directories. Does this setting control whether documents are directories?
A bundle is a specialised directory structure, as you seem to be aware of, which contains specific files (like Info.plist
).
A Document Package is one such bundle.
Therefore
Does this setting control whether documents are directories?
Yes; however you wouldn't refer to it as a directory; it's a bundle.