Figure 1-1 Simulated iPhone running the HelloWorld app Xcode builds your project and then launches the most recent version of your app running in Simulator on your Mac screen, as shown in Figure 1-1. To run your app in Simulator, choose an iOS simulator-for example, iPhone 6 Plus, iPad Air, or iPhone 6 + Apple Watch - 38mm-from the Xcode scheme pop-up menu, and click Run. When testing an app in Simulator, it is easiest to launch and run your app in Simulator directly from your Xcode project. The first way is to run your app in Simulator, and the second way is to launch Simulator without running an app. There are two different ways to access Simulator through Xcode. For more detailed information on interacting with Simulator and using it to test and debug your apps, refer to the later chapters in this guide.
You can perform these steps using your own iOS app or, if you do not have an app to use, with the HelloWorld sample code. The chapter presents the basics of using Simulator. You interact with Simulator by using the keyboard and the mouse to emulate taps, device rotation, and other user actions. Simulator app, available within Xcode, presents the iPhone, iPad, or Apple Watch user interface in a window on your Mac computer. For Xcode 9 and later, see Simulator Help by choosing Help > Simulator Help in Simulator. The information in this document is deprecated in Xcode 9.