What is NSBundle and mainBundle in Objective-C?

后端 未结 3 1510
逝去的感伤
逝去的感伤 2021-02-01 16:51

Regarding Objective-C on iOS application, I read some sample program in the Apple developer website and I found that almost all of the applications contains a word called \'NSBu

3条回答
  •  感情败类
    2021-02-01 17:03

    A bundle is a structure used for packaging software on Mac OS X. Applications, frameworks and plug-ins are all different kinds of bundles. Bundles may contain executable code, resources, header files and other stuff (including other bundles) if you so wish.

    Bundles are implemented as directory trees with a defined structure. Applications, frameworks and plug-ins each have their own variation on the structure of the tree. However, to the Finder, bundles look like single files.

    The main bundle is simply the bundle of the application that is running. So, for instance, the main bundle of the Apple mail program is /Applications/Mail.app.

提交回复
热议问题