Create a New Project
Xcode includes several built-in app templates for developing common
types of iOS apps, such as games, apps with tab-based navigation, and
table view-based apps. Most of these templates have preconfigured
interface and source code files. For this lesson, you’ll start with the
most basic template: Single View Application.
To create a new project
- Open Xcode from the
/Applications
directory.If this is the first time you’ve launched Xcode, it may ask you to agree to the user agreement and to download additional components. Follow the prompts through these screens until Xcode is completely set up and ready to launch.As soon as Xcode launches, the welcome window appears.If a project window appears instead of the welcome window, don’t worry—you probably created or opened a project in Xcode previously. Just use the menu item in the next step to create the project. - In the welcome window, click “Create a new Xcode project” (or choose File > New > Project).Xcode opens a new window and displays a dialog in which you choose a template.
- Select iOS at the top of the dialog.
- In the Application section, select Single View Application and then click Next.
- In the dialog that appears, use the following values to name your app and choose additional options for your project:
- Product Name:
FoodTracker
Xcode uses the product name you entered to name your project and the app. - Team: If this is not automatically filled in, set the team to None.
- Organization Name: The name of your organization or your own name. You can leave this blank.
- Organization Identifier: Your organization identifier, if you have one. If you don’t, use
com.example
. - Bundle Identifier: This value is automatically generated based on your product name and organization identifier.
- Language: Swift
- Devices: UniversalA Universal app is one that runs on both iPhone and iPad.
- Use Core Data: Unselected.
- Include Unit Tests: Selected.
- Include UI Tests: Unselected.
- Click Next.
- In the dialog that appears, select a location to save your project and click Create.Xcode opens your new project in the workspace window.
In the workspace window, you may or may not see an error icon with a
message that says “Signing for FoodTracker requires a development team.”
This warning means you haven’t set up Xcode for iOS development yet,
but don’t worry, you can complete these lessons without doing that. You
do not need a development team to run the app in the simulator.
Tidak ada komentar