Documentation Archive


Xcode Overview

On This Page

Running in Simulator

Simulator enables you to simulate multiple iOS and watchOS devices running current and some legacy operating systems. You interact with Simulator by using the keyboard and trackpad to emulate taps, device rotation, and other actions. For example, you can use the Hardware menu in Simulator to:

  • Rotate an iPhone or iPad to the left and right

  • Simulate a user shaking an iPhone or iPad

  • Send the frontmost app a simulated low-memory warning

  • Use tools to to examine graphics rendering, simulate Touch ID, and more

  • Simulate the force of a touch on a pressure sensitive display

image: ../art/AdventureLaunchediPhone.pdf

As a preliminary tool for use before testing your app on devices, Simulator allows you to prototype and test builds of your apps during the development process. Although you can test your app’s basic behavior in Simulator, the simulator is limited as a test platform. While developing your app, it is essential that you run and test it on connected devices.

For more detail on using the simulator, see Simulator User Guide.

Create Custom Simulator Configurations

Choose Window > Devices to open the Devices organizer. Click the Add button (+) in the bottom left of the organizer window. In the dialog that appears, type a name for your custom simulator configuration, choose a device type, and then choose an iOS version. If this is for a watchOS app, add a paired Apple Watch by choosing one from the menu. Click Create and your new custom simulator configuration is added to the Simulator list. By default, the new configuration appears in the Run Destinations menu.

image: ../Art/XC_O_devices_add_2x.png

Show Simulators or Devices in the Run Destinations Menu

Choose Window > Devices. In the Devices organizer, select the item you want to add or remove from the target menu. Click the Configuration button (image: ../art/XC_O_devices_window_config_button_2x.png) in the bottom left of the organizer window. Choose Show in Run Destinations Menu. A checkmark next to that menu item indicates that the simulator or device will be shown in the Run Destinations menu.

image: ../Art/XC_O_devices_menu_2x.png