← Build an iPhone app
Lesson 3 of 8

Install Xcode and make your first project

20 min Mac

Xcode is Apple’s free app for building iPhone, iPad and Mac apps. It’s large, so start the download and make a cup of coffee.

Install it

  1. Open the App Store on your Mac.
  2. Search for Xcode and click Get. It’s a big download, often 10 GB or more.
  3. Open Xcode when it finishes. It may ask to install extra components and which platforms you want. Choose iOS and let it finish.
  4. If it asks for your Apple Account, sign in with the one you already use for your iPhone. That’s free.

Create your first project

  1. In Xcode, choose Create New Project (or File › New › Project).
  2. Pick iOS, then App, then Next.
  3. For Product Name, type something like WalkLog. For Interface choose SwiftUI, and for Language choose Swift. Leave the rest as is.
  4. Choose where to save it (your Documents folder is fine) and click Create.

Run it

  1. At the top of the Xcode window, there’s a device menu. Choose an iPhone model, such as “iPhone 17.”
  2. Click the ▶ Run button (top left), or press Command-R.
  3. After a minute, a pretend iPhone, the Simulator, appears with “Hello, world!” on the screen.

That’s a real app, running. Every app you build starts like this.

Try it now. If anything didn’t match what you see, describe it to your AI assistant:

I’m new to Xcode. I’m trying to create a new iOS app project and run it in the simulator, but [describe what happened, and paste any error message]. What should I do?

Screens change with each Xcode version, so this is the fastest way to get unstuck.

The takeaway. You now have a working app project. Next, you’ll use AI to turn “Hello, world” into your idea.