Running the app in the Simulator

The Simulator gives you an idea of how your app would look and behave if it were running on a device. It can model a number of different types of hardware—all the screen sizes and resolutions for both iPad and iPhone—so you can simulate your app on every device you're developing for.

To run the app in the Simulator, perform the following steps:

  1. Click the Scheme menu in the toolbar and you will see a list of Simulators. Choose iPhone 11 from this menu:

  1. Click the Play button to install and run your app on the currently selected Simulator. You can also use the command + R keyboard shortcut.
  2. If you see the Developer Tools Access dialog box, enter the Mac's admin Username and Password and click Continue:

  1. The Simulator app will launch and show a representation of an iPhone 11. Your app displays a white screen, as you have not yet added anything to your project:

  1. Switch back to Xcode and click on the Stop button (or type Command - .) to stop the currently running project.

You have just created and run your first iOS app in the Simulator! Great job!

If you look at the Scheme menu, you may be wondering about what the No Device and Build Only Device menu items are for. Let's take a look at them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.191.86