1.26. Creating Bundles
Problem
You want to group your resources into hierarchical structures and be able to access those resources at runtime with ease.
Solution
Follow these steps to successfully create a bundle:
Create a root folder on your disk that will later become your bundle. For instance, let’s give this folder the name Resources.
Under the Resources folder, create three more folders named Images, Videos, and Sounds.
Under the three aforementioned folders, place related resources. For instance, place one or more images in the Images folder and one or more video files under the Videos folder and so on.
Once you are done, rename your Resources folder to Resources.bundle. Once you add this extension to your folder name, OS X will ask for your confirmation and a dialog similar to that shown in Figure 1-33 will appear on the screen. Press Add on the dialog to add the .bundle extension to the Resources folder.

Figure 1-33. Adding a .bundle extension to a folder name in order to turn it into a bundle
Discussion
Bundles are simple folders with a .bundle extension. They have two main distinctions from regular folders:
Cocoa Touch provides an interface through which you can access bundles and their resources really easily.
If a bundle is added to the Navigator on the lefthand side of Xcode, any files added to or removed from the bundle outside Xcode will, respectively, appear in or disappear immediately ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access