开发者

Creating bundles in Cocoa

开发者 https://www.devze.com 2023-02-20 06:16 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消