Adding a New File

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.

To add a new file
  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 the options your file requires, and click Next.

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

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 app 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.