Back to course overview
Module 1Foundations: your AI-powered iOS toolkit 20 min

Lab: Set up Xcode and run your first app

Install Xcode, create the DayOne project, run it in the simulator, and make one AI-assisted change.

Outcome of this lab

A project called DayOne that builds and runs in the iOS Simulator, plus your first AI-assisted edit. This is the seed of everything you ship.

Step 1 — Install Xcode

  1. 1Open the App Store on your Mac and search for Xcode. Install it (it's large — plan for 30+ GB of free disk — so give it time).
  2. 2Launch Xcode once and accept the license and any additional component downloads.
  3. 3When prompted about platforms, make sure iOS is included.

Step 2 — Create the project

  1. 1In Xcode choose File ▸ New ▸ Project (or "Create New Project" on the welcome screen).
  2. 2Select iOS ▸ App, then Next.
  3. 3Product Name: DayOne. Interface: SwiftUI. Language: Swift. Storage: SwiftData (leave testing options on).
  4. 4In the save dialog, check Create Git repository. Git is a save-point system for your code — you'll commit a snapshot after each lab, so you can always roll back a bad change.
  5. 5Pick a folder to save it in. Xcode opens your new project.
Tip

The Organization Identifier (e.g. com.yourname) plus the product name becomes your Bundle ID (com.yourname.DayOne). This uniquely identifies your app to Apple forever — pick something you own, like a personal domain in reverse.

Step 3 — Run it

  1. 1At the top of Xcode, choose a simulator from the device menu (e.g. iPhone 15).
  2. 2Press the ▶ Run button (or ⌘R). The simulator boots and launches the default app.
  3. 3You should see a placeholder screen. Congratulations — you're running an iOS app.
First build is slow

The very first compile can take a minute or two while Xcode indexes everything. Subsequent runs are fast. If the simulator seems stuck on a black screen, give it a moment to finish booting.

Step 4 — Your first AI-assisted change

Open ContentView.swift. Ask your AI assistant, using the SCTB pattern from the last lesson:

Prompt to try

This is a new iOS 17+ SwiftUI app. Replace the body of `ContentView` so it shows a large title "DayOne" and a subtitle "Your day, in one line." centered vertically, using a VStack with padding. Public SwiftUI APIs only. Return the full file.

Paste the result over the file's contents, press ⌘R, and watch your change appear. You just completed the core loop of the entire course: describe intent → generate → run → verify. Everything else is variations on this.

Meet the Terminal

Terminal lives in Applications ▸ Utilities (or press ⌘-Space and type "Terminal"). It's where you'll paste the gray command blocks that appear throughout this course. Commands run inside your project folder — type cd (with a trailing space), drag your project folder onto the Terminal window, and press Return to set that up. Do that once each time you open a new Terminal window.

Commit your work

You checked Create Git repository back in Step 2, so your project already has version control. Commit now with a message like "Initial DayOne project." You'll thank yourself when an AI edit goes sideways and you want to roll back.