What is the best way to create an empty bundle in Cocoa? I bundle in OS X is really nothing but a folder, the only difference being that you have to right-click and do "Show Package Contents" to see the contents, right?
Well, I want a bundle in that sense. After that I will put some files of my choice into it, such as a bunch of plist files. The reason I want to do this is so that my file structure (in, say, the A开发者_运维技巧ppSupport folder) will look nicer at the root level.
Related question: How do I tell OS X that a folder ending with ".myappFoo" should be treated as a bundle?
The starting place for information is the Apple developer's doc Bundle Programming Guide.
The Finder considers a directory to be a package if any of the following conditions are true:
The directory has a known filename extension: .app, .bundle, .framework, .plugin, .kext, and so on.
The directory has an extension that some other application claims represents a package type; see “Document Packages.”
The directory has its package bit set.
The .myAppfoo showing as a bundle is done as a Document Package
精彩评论