Compiling your project in Xcode allows you to test your app on simulators or iOS devices.
Compiling your project in Xcode is simple. The options for compiling can be found in the
Product menu of Xcode.
Here you have multiple options. The most common one you’ll use is the Run option with the keyboard shortcut CMD + R.
You also have the Build option, keyboard shortcut CMD + B.
Choosing the run option will build your application before running it on a simulator or device. This is what you’ll use most often.
You can also run your application from the play button in the top left of Xcode.
Clicking the Play button will build and run your app.
If you hold down the play button, it will give you additional options:
The test option will run all of your unit tests.
The profile option will launch your application and Xcode instruments. This allows you to measure different aspects of your application such as the network connections, memory usage and more.
Analyze runs static code analysis.
That’s how you build and run your iOS app in Xcode.