Link: developer.apple.com/library/arc…
A bundle is a directory in a file system that puts executable code together with related resources, such as images and sounds. In iOS and OS X, applications, frameworks, plug-ins, and other types of software are bundles. A bundle is a directory with a standardized hierarchy that holds executable code and the resources used by that code. Foundation and Core Foundation include tools for locating and loading code and resources in bundles.
Note: Apps are the only type of bundle that third-party developers can create on iOS.
The bundle brings some benefits to users and developers. Applications or other software can be easily installed or repositioned by simply moving them from one location to another. Bundles are also an important factor in internationalization. You store localized resources in a specific named subdirectory of the bundle; Programming tools look for localized resources in locations corresponding to user language preferences.
Most types of Xcode projects create a bundle when they build the executable. Therefore, you rarely need to manually construct a bundle. Still, it’s important to understand their structure and how to access the code and resources in them.
Structure and Content of Bundles
A bundle can contain executable code, images, sounds, NIB files, private Frameworks and libraries, plug-ins, loadable bundles, Or any other type of code or resource. It also contains a run-time configuration file called infomation Property List (info.plist). These items have their proper place in the bundle structure. Resources such as images, sounds, and NIb Files are placed in the Resources subdirectory. They can be local or global. Localization files (including string files, which are collections of localized strings) are placed in subdirectories of Resources with the extension Lproj and names corresponding to a language, possibly a locale.
Accessing Bundle Resources
Each application has a main bundle, which contains the application code. When a user starts an application, it finds the code and resources it immediately needs in the Main bundle and loads them into memory. After that, applications can dynamically (and lazily) load code and resources from the main bundle or dependent bundle as needed.
The NSBundle class and (for procedural code) the Core Foundation opaque type CFBundleRef provide applications with methods to locate resources in bundles. In Objective-C, you first have to get an NSBundle instance that corresponds to the physical bundle. To get the main bundle for your application, call the class method mainBundle. Given a filename, extension, and (optionally) a bundle subdirectory, other NSBundle methods return the path to the bundle resource. Once you have the path to the resource, you can load it into memory using the appropriate classes.
Loadable Bundles
Like application bundles, loadable bundles package executable code and associated resources, but you load these bundles explicitly at run time. You can use loadable bundles to design highly modular, customizable, and extensible applications. Each loadable bundle has a Principal class, which is the entry point of the bundle; When you load the bundle, you must ask NSBundle for the Principal class and use the returned class object to create an instance of the class.
The new words
Explicitly [ˈ SPL ɪ k ɪ s ɪ tli] adv. Clearly; clearly
Correspond [ˌ k ɔ ː r goes ˈ sp ɑ ː nd] vi. 2. accord with The corresponding; communication
Procedural [pr goes ˈ si ː d ʒ goes r goes l] adj. procedural
Subordinate [s goes’ b ɔ : dineit] adj. 2. Of or belonging to; secondary
例 句 : Thereafter [ˈ ˈ ˈ s ɪ l ɪ l]; thereafter [ˈ ˈ s ɪ l ɪ l] Ever since then
Immediately [ɪ ˈ mi ː di goes tli] adv. 2. at once directly
Proper [ˈ ː ː l ə ː l] n. Itself; The unique; decent
[fə’sɪ tɪz] n. Tools, equipment
Rarely [ˈ ˈ s ɪ t]; rarely A rare; A rare
The answer is, of course, curliest, curliest, curliest, curliest