Adding a New File

    Steps
  1. In the project navigator, select the project or group to which you want to add the file.

  2. Choose File > New > New File.

  3. Select the file template for your iOS or OS X product, and click Next.

  4. Specify any options your file requires, and click Next.

  5. Name the file, specify its location in your file system, and click Save.



image: ../art/adding_a_new_file.png

Add a new file to a project or workspace. This process places the new file at a particular location in your file system and creates a reference to it from a workspace or a project.

The New File dialog, which appears first, lets you choose the file template Xcode will use to generate the file.

These are the types of files you can create:

Source: Includes header files and implementation files for C, C++, and Objective-C.

User interface: Includes storyboard, view, window, and application documents.

Core Data: Includes data and mapping model files, and subclasses of NSManagedObject.

Resource: Includes GPX, settings bundle, property list, rich text, and strings files.

Other: Includes empty files, assembly-language and shell-script files, and files with configuration settings, resource rules, or exports.

The video illustrates the process of adding an Objective-C–class from a template to a project.