Build and Run Your Xcode Application - dummies

By Neal Goldstein, Dave Wilson

The Xcode toolbar, as shown in the figure, is where you do things like run your application. The Flow controls are for defining, choosing, running, and stopping projects.


They consist of the following:

  • Run button: Clicking the Run button builds and runs the targets — a target is a product to build and the instructions for building the product from a set of files in a project or workspace for the currently selected scheme. Pressing and holding the mouse button opens a menu — also available in the Product menu — that allows you to run, test, profile, or analyze your application.

    Holding various modifier keys while clicking the Run button allows you to select these other run options:

    • Control key: Run without building.

    • Shift key: Build without running.

    • Option key: Edit the scheme and run.

  • Stop button: Terminates your (executing) application in the Simulator or the device.

  • Scheme menu: A scheme defines characteristics such as build targets, build configurations, and the executable environment for the product to be built. The scheme menu lets you select which scheme and which build destination you want to use.

  • Breakpoints button: Activates or deactivates all breakpoints. The Breakpoints button turns breakpoints on and off. (A breakpoint tells Xcode to stop execution at a point in the code.

The Activity viewer shows the progress of tasks currently executing by displaying status messages, build progress, and other information about your project. For example, when you’re building your project, Xcode updates the Activity viewer to show where you are in the process — and whether or not the process completed successfully.

If an Issues icon appears in the Activity viewer, click it to open the Issues navigator and look there for messages about your project. (None exist yet in the figure, so you won’t see an Issues icon there.)

The Workspace configuration includes the Editor and View controls, as well as the Organizer window button.