Launch an app on a device

All iOS, tvOS, and watchOS apps must be code signed using a provisioning profile to launch on a device. macOS apps that use certain app services must be signed to launch too. If you use automatic signing (recommended), Xcode will create the necessary signing assets for you in your developer account. Xcode also registers the selected device as a development device. For macOS apps, Xcode registers the Mac running Xcode.

Before you begin, add your Apple ID account and assign the target to a team.

Launch the app on a device

  1. Connect the device to your Mac. For watchOS apps, connect an iPhone that is paired with an Apple Watch.

  2. In the toolbar, choose your device from the Scheme menu. For watchOS apps, choose the active Apple Watch from the menu.

    If this is the first time you are using a device for development, you may need to wait for Xcode to enable the device before it appears in the Scheme menu. In the Devices window, you can check the status of a connected device.

  3. If the device appears under Unavailable Device in the Scheme menu, hover the mouse over the device, read the reason, and fix the problem.

    For example, if the OS version is lower than the deployment target, upgrade the OS version on the device or choose the version you want to target from the Deployment Target pop-up menu located in the Deployment Info section in the General pane. Then select the device from the Scheme toolbar menu again.

  4. For iOS and watchOS apps, unlock the device screen.

  5. In the toolbar, click the Run button.

    Xcode installs and launches the app on the device.

  6. If instead a sheet appears asking if Xcode should register the device, click Register Device.

    You’re allowed to register a fixed number of devices per product family. If you don’t want to use the device for development, click Cancel.

SEE ALSOSigning workflowAdd your Apple ID accountAssign a project to a team