project habittracker

Step 1: Starting

System Text-to-Speech Ready
Slide: 0:00 / 0:00
Slide 1 of 0Interactive Deck

Full Lesson Reference

Create your first iOS app project.

Where We Are

You have Xcode installed. Let's create an iOS app.

Create the Project

Open Xcode and create a new project:

  1. Open Xcode
  2. Click "Create New Project" (or File → New → Project)
  3. Select iOS at the top
  4. Choose App
  5. Click Next

Fill in the details:

  • Product Name: HabitTracker
  • Organization Identifier: com.yourname (use your name, no spaces)
  • Interface: SwiftUI
  • Language: Swift

Click Next, choose where to save it (Desktop is fine), and Create.

The Project Structure

Xcode shows you a lot. Here's what matters:

terminal
HabitTracker/
├── HabitTrackerApp.swift   ← App entry point
├── ContentView.swift       ← Main screen (we'll edit this)
├── Assets.xcassets         ← Images and colors
└── Preview Content/        ← Preview assets

Everything else is configuration. Ignore it for now.

Run in Simulator

Click the Play button (▶) at the top left, or press Cmd + R.

Xcode will build your app and launch a simulated iPhone.

You should see "Hello, world!" — the default SwiftUI template.

Start Claude Code

Open Terminal, navigate to your project folder:

terminal
cd ~/Desktop/HabitTracker   # or wherever you saved it
claude

Tell Claude about the project:

terminal
I'm building an iOS app called HabitTracker.
It's a simple app to track daily habits and streaks.

Here's the project structure: [Xcode created a basic SwiftUI project]

Let's start by replacing the default ContentView with a simple screen that has:
- A title "Habits" at the top
- A message "No habits yet" in the center
- An "Add Habit" button at the bottom

Create CLAUDE.md

Create a CLAUDE.md file for this iOS project with our goals and current state.

This helps Claude remember context between sessions.

Optional: For a more native-feeling result, add the Apple HIG skill file to your project and reference it from your CLAUDE.md. It teaches Claude iOS conventions like Dynamic Type, SF Symbols, and standard navigation patterns.

Checkpoint

By now you should have:

  • Xcode project created
  • App runs in simulator
  • Basic UI structure (title, message, button)
  • Claude Code connected to the project
  • CLAUDE.md created

What You Learned

  • Creating an Xcode project
  • Running in the simulator
  • SwiftUI projects have a simple structure
  • Claude can modify Xcode projects just like any other

Exercises

  1. Create the HabitTracker project in Xcode and run it in the simulator until you see "Hello, world!"
  2. Paste the "Start Claude Code" prompt to replace the default ContentView, then run again and confirm you see the title, message, and button.
  3. Generate a CLAUDE.md with the prompt above, then open it and add one line describing the three habits you want to track — Claude will carry that context forward.