Chapter 3: Building Applications from Templates
Assembling an application from scratch isn’t a trivial process in Xcode. It’s faster and simpler to start from a ready-made template and extend it as needed. Xcode includes templates for different types of iOS and OS X applications. The template list includes some plug-in types and other special projects for OS X developers.
Getting started with a template is easy. All templates include a bare skeleton of essential code and are guaranteed to build and run successfully. You simply select a template when you create a new project, and Xcode automatically writes the files to a new folder.
Note that Xcode does not support custom templates, so you cannot add your own projects to the template list. Expert developers can hand-edit and extend the template files built into the Xcode package, but this takes some skill and experience. The process is neither simple nor convenient, and the templates have to be re-created every time you update Xcode.
However, workarounds are possible. The simplest is to manually duplicate a starting project folder in Finder. You need to make sure the project groups and files are set up correctly, and you must change a few of the settings to give your project a new name. But you can use this system ...
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