When you create an Xcode project, you first choose a template for a common style of app or framework, then modify the project as you like. Xcode templates include essential project configuration and files that help you start developing your app quickly.
Launch Xcode, and in the “Welcome to Xcode” window, click “Create a new Xcode project.”
Alternatively, choose File > New > Project.
In the sheet that appears, select the target operating system or platform.
Under Application, select a template, then click Next.
For example, to create an iOS app with a single empty view, select Single View App. For macOS apps, select App. To create a watchOS app that runs without a companion iOS app, select Watch App.
In the sheet that appears, fill in the text fields and choose options from the pop-up menus to configure your project.
You must enter a product name and organization identifier to continue to the next sheet. You should also enter an organization name (if you don’t belong to an organization, enter your name). The bundle identifier (bundle ID), that appears below the organization identifier, is derived from the product name and organization identifier by default.
The following screenshot shows options for creating an iOS app.
From the Team pop-up menu, choose your team.
To add an account, click the “Add account” button if it appears. Optionally, skip this step and assign a team to your project later.
From the Language pop-up menu, choose a programming language.
From the User Interface pop-up menu, choose an interface option.
To use SwiftUI, first choose Swift as the programming language, then choose SwiftUI as the interface.
To add test targets to your project, check the Include Unit Tests and Include UI Tests boxes.
Click Next.
A sheet asks you where to save your project.
Specify a location for the project, optionally select “Create Git repository on my Mac” to use source control (recommended), then click Create.
The main window for your project appears.