1. Xcode adds files to a project

There are two ways:

Method 1: Press Command + N. The dialog box for adding files is displayed. Method 2: Right-click the project directory to which files are to be added and choose New File… .

Xcode will pop up the following dialog:

On the left is the classification of project categories using Xcode. We select “OS X”. In this directory, there are all files that can be added. Cocoa Class — Create a Class file for the project, Objecive -c file — Add a. M file Header file — Add a. H file C file — Add a. C and. H file C++ file to the project — Add ++.cpp and.hpp files in “Resource” : Property List — Add ++.cpp and.hpp files in “Other” : After selecting the File type, select “Next” and a dialog box will be displayed asking you to fill in the details of the File to be added, or the location of the File to be stored. This is usually the default.