Information Technology Reference
In-Depth Information
Note that some of the templates have multiple versions; for example, the Cocoa Application template is really a
group of six different templates with optional Core Data, Document, and Spotlight features. You can ignore the
templates you never use. But understand that if you change one template, the others aren't updated automatic-
ally. To create a complete set of modified templates, you must add the changes to every template you plan to
use.
NOTE
Each group of templates, such as Cocoa Application, includes a TemplateChooser.plist file. If you're comfort-
able with plists and Cocoa dictionaries, you can open this file to explore how the different options are organized
and selected, and how the plist controls the options that appear in Xcode's templates pane.
Customizing the template files
When Xcode uses the files to build a template, the filenames with their underscores are interpreted as macros
and replaced with the Save-As name you choose. But if you open the project directly, as shown in Figure 3.21,
you can edit the files as if they were a standard project. You also can build and run them. This means you can
modify any template as if it were a standard project and save it in the usual way. The next time you use that
template, it loads with all your changes.
FIGURE 3.21
Modifying an OS X template. This trivial change adds a comment, but you have complete freedom to change each
file in a template to suit your needs.
Search WWH ::




Custom Search