First App.
Your learning space A little progress, every day
CHAPTER 04Lesson 13 of 36

Run the virtual iPhone

The simulator is a virtual iPhone on your Mac. It lets you try the app before using your real phone.

In Xcode6 min read & do
By the end of this lesson

Open and use the app in an iPhone simulator.

First builds and the first simulator launch can take several minutes.

Let’s do this

  1. 1
    In Xcode

    Choose an iPhone destination

    Look in the Xcode toolbar beside the app’s name. Open the run destination menu and choose a named iPhone simulator whose iOS version is installed. “Any iOS Device” is for making an upload build, not for running a simulator.

  2. 2
    In Xcode

    Install a missing simulator if needed

    If no suitable iPhone appears, install iOS simulator support from Xcode Settings, under Components or Platforms. Let the download complete, then choose the simulator again.

  3. 3
    In Xcode

    Press the triangle Run button

    Click the Play-shaped Run button in Xcode, or choose Product, Run. Xcode builds the app and opens the simulator. The first launch may take longer while the virtual device starts.

  4. 4
    In Xcode

    Try it like a phone

    Click where you would tap. Check that the app’s title and main screen match your idea. Use Xcode’s Stop button to end the run. After a code change, press Run again to test the new version.

Device Hub window showing an iPhone simulator running Apple’s Landmarks app in landscape.View larger
Apple’s example of an app in the simulator. The guide illustrates iOS 27; use the current stable simulator you installed, which may look different.Screenshot source (opens a new tab)

A message for Codex

Help me run my first iPhone app in an installed iPhone simulator. Check the project’s runnable app target and supported iOS version. Use an actual simulator destination, not a generic archive destination. If the build fails, fix the first real error, run the build again and explain the result. Tell me which Xcode button or menu to use.

What you should see

An iPhone simulator opens with your app running. You can see the first screen and try its controls.

A couple of words, explained

Run destination
The iPhone that Xcode will send your app to. It can be a virtual one or your real phone.
Scheme
Xcode’s saved recipe for which app to build and how to run it. Your project comes with one, named after your app.

If you get stuck

Go at your own pace. There is no test to pass.

Checked 7 September 2026. Screens can change; the official guides below have the latest steps.

Run on a simulator or deviceXcode system requirements