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

Choosing your AI coding assistant

The landscape of AI pair-programmers for Swift, and how to set up a workflow that actually saves time.

There is no single "correct" AI assistant — but the workflow matters more than the tool. You want the model as close to your code as possible so it can see context and you can apply changes in one click.

The main options

  • A chat model in the browser (e.g. Claude) — zero setup, great for planning, explaining errors, and generating whole files you paste in. The friction is copy-paste and the model can't see your project.
  • An AI-native editor (e.g. Cursor, which is a fork of VS Code) — the model sees your whole project, edits files directly, and can run terminal commands. You still compile and run in Xcode, but write in the editor. This is the most productive setup for most people.
  • Xcode's built-in coding assistance — Apple ships predictive completion and, on recent versions, a model-backed assistant right inside Xcode. Convenient, no context switch, improving fast.
Recommended starting workflow

Use an AI-native editor (or Xcode's assistant) for day-to-day edits, and keep a browser chat open for the big stuff: "design the data model," "explain this crash," "review this whole file for bugs." You'll switch between them naturally.

The one habit that separates good results from bad

Give the model context, then constrain it. A vague prompt ("make a journal app") produces generic, often broken code. A good prompt states the framework, the versions, the file you're editing, and the exact outcome. Compare:

Prompt to try

Write me a journaling app in Swift.

Too vague — you'll get an inconsistent pile of code that may target an old framework.

Prompt to try

I'm building an iOS 17+ app in SwiftUI with SwiftData. Create a `View` called `EntryEditor` with a multiline `TextEditor` bound to a `@State var text` and a Save button that's disabled when the text is empty. Use only public SwiftUI APIs. Return just the Swift file.

Specific framework, version, file name, exact widgets, and an explicit constraint. This is the difference.

A prompt pattern you'll reuse all course

State the stack (iOS 17+, SwiftUI, SwiftData), the target (file or function name), the behavior (what it does, edge cases), and a constraint ("public APIs only," "no third-party packages"). We'll call this the SCTB pattern.

If you're not sure, start here

  1. 1Go to claude.ai and create a free account.
  2. 2Don't pay for anything yet — the free tier is fine for the first few modules.
  3. 3Keep it open in a browser tab right next to Xcode. You'll paste prompts in and Swift code out constantly; that two-window setup is the workflow.