Because bundles are simply file and directory hierarchies in the file system, it is possible to construct them by hand by placing files manually using the organization specified in “Anatomy of a Modern Bundle.” It is far easier, however, to let Xcode take care of the bundle structure for you. When building a bundle project type, Xcode performs the following default operations to create your bundle:
Copies the contents of the Resources group into your bundle’s Resources
directory
Creates an information property list (Info.plist
) file from information you provide in the Inspector window of your target
Copies any compiled code into the platform-specific subdirectory of the Contents
directory
Xcode currently supports the creation of modern and versioned bundles, either of which can be accessed from your code using CFBundle
or NSBundle
. However, if you have bundles left over from development on the NeXT operating system, you can convert those bundles to the modern structure using the command-line utility/Developer/Makefiles/pb_makefiles/convertBundle
.
If your application requires localization, you can create strings files using the genstrings
development tool. This tool parses your source files looking for occurrences of specific macro and function calls and uses them to create annotated entries in a strings file. After translation, the strings files are then placed into the appropriate .lproj
directories. See Internationalization Programming Topics for more information on preparing and loading strings.
The final step is for you to localize, and if necessary, create platform-specific versions of your other application resources and place them in the language-specific .lproj
directories of your bundle.
© 2003, 2005 Apple Computer, Inc. All Rights Reserved. (Last updated: 2005-11-09)