PC パソコン

How to Fix “A Build Only Device Cannot Be Used to Run This Target” in Xcode

When Xcode says “A build only device cannot be used to run this target. Please select an available device or choose a simulated device as the destination,” the selected Run Destination is either a generic build-only destination or Xcode cannot treat any concrete simulator or physical device as runnable for the current scheme. This guide separates ordinary configuration mistakes from Xcode destination-resolution problems and fixes them in a safe order.

Quick fix: select an app scheme and a concrete device

Open the scheme and destination picker in Xcode’s toolbar. Select the scheme that builds your runnable app, then choose a named simulator or connected device, such as “iPhone 17 Pro (iOS 27.0).” Do not choose Any iOS Device (arm64) or Any iOS Simulator Device when using Product > Run.

Key distinction: an “Any … Device” destination is useful for building or archiving across a device class, but it is not an actual device on which Xcode can launch an app. Apple’s Xcode documentation instructs you to select a scheme and then a specific simulated or physical device before running.

Causes and when they apply

  • A generic build-only destination is selected: this is the most common cause. Build and Archive may work while Run cannot.
  • The selected scheme is not runnable: a framework, static library, package, or some test targets do not provide a standalone app executable.
  • The simulator runtime is missing: no concrete destination is available while the required platform or runtime is absent, disabled, still downloading, or damaged.
  • The deployment settings do not match: a device running an OS older than the app’s minimum deployment version is not eligible. Supported Platforms and device-family restrictions can have the same effect.
  • A physical device is not ready: pairing, Developer Mode, signing, device registration, or Xcode/OS compatibility may be incomplete.
  • Xcode misclassifies the destination: in less common cases, Xcode rejects a named, otherwise valid simulator as build-only.

Recommended resolution steps

1. Reselect the app scheme and a named destination

  1. In Xcode’s toolbar, select the scheme for the app you want to launch.
  2. In the Run Destination menu, select a simulator with a model and OS version, or a connected physical device.
  3. Choose Product > Run or press Command-R.

If the app scheme is missing, open Product > Scheme > Manage Schemes and enable or recreate it. In Edit Scheme, verify that the Run action’s Executable is the intended app rather than a library or the wrong product.

2. Check the destinations Xcode considers eligible

Use Terminal to compare the scheme’s eligible destinations with the installed simulators. Replace the sample project and scheme names.

xcodebuild -project MyApp.xcodeproj   -scheme MyApp   -showdestinations

xcrun simctl list devices available

If the desired device is absent from -showdestinations, check the scheme, Supported Platforms, deployment target, and installed runtime. For a workspace-based project, use -workspace MyApp.xcworkspace instead of -project.

3. Install or repair the required simulator runtime

Open Xcode > Settings > Components and install the runtime for the target platform. Apple also documents this command-line method:

xcodebuild -downloadPlatform iOS

After installation finishes, create or select a concrete simulator in Device Hub or Window > Devices and Simulators. Xcode cannot build or run for a platform while its component download is still in progress.

4. Match the deployment target to the destination

Check the app target’s General > Minimum Deployments or the corresponding Deployment Target build setting. For example, an app requiring iOS 27.0 cannot run on an iOS 26.x simulator. Lower the minimum only if the APIs your app uses are available on that OS.

In a multi-target project, do not confuse settings for the app, extensions, and dependent frameworks. The selected Run scheme must contain a runnable app target that supports the destination’s platform.

5. Prepare a physical device correctly

Unlock the device and, for initial troubleshooting, connect it by USB to complete pairing. Enable Developer Mode and verify the Team and automatic signing settings under Signing & Capabilities. Apple’s guide explains that selecting the physical device as the Run Destination lets automatic signing register it and create the development provisioning profile when necessary.

6. Recover when a named simulator is still rejected

  1. Quit and reopen Xcode and Device Hub/Simulator.
  2. Try another simulator and another installed runtime.
  3. Delete and recreate only the affected simulator.
  4. Update to the latest stable Xcode compatible with the project, and verify which Developer Directory is active if multiple Xcode installations exist.
xcode-select -p
xcodebuild -version
xcrun simctl shutdown all

Deleting DerivedData can help with stale build products, but it is not the first fix for a destination-selection error. Start with Product > Clean Build Folder only when the evidence points to cached build state.

The Xcode 26.3 report

A report on Apple Developer Forums describes Xcode 26.3 rejecting every named simulator as a build-only destination. In that environment, Command-B succeeded, Command-R failed immediately, and command-line building, installation, and launch still worked. Recreating schemes and deleting DerivedData did not resolve the UI behavior.

This is a user report, not an Apple release-note entry that confirms a known defect or a fixed version. As of September 17, 2026, Apple has not publicly identified a specific maintenance release as the fix for that report. Treat it as a diagnostic clue only after ruling out normal scheme, runtime, and deployment-setting problems. If you update, use the latest stable Xcode that is compatible with your project.

Alternative workaround

If only Xcode’s Run UI is failing and xcodebuild -showdestinations

xcodebuild -project MyApp.xcodeproj   -scheme MyApp   -destination 'platform=iOS Simulator,name=iPhone 17 Pro'   build

xcrun simctl boot 'iPhone 17 Pro'
xcrun simctl install booted /path/to/MyApp.app
xcrun simctl launch booted com.example.MyApp

Adjust the product path and bundle identifier for your app. This is a temporary diagnostic or workaround, not a substitute for correcting an ineligible destination.

How to verify the fix

  • The toolbar shows a specific model and OS version rather than an “Any” destination.
  • The selected scheme builds a runnable app.
  • The device appears in xcodebuild -showdestinations.
  • The simulator is marked available by xcrun simctl list devices available.
  • Product > Run builds, installs, and launches the app.

Important cautions

  • Do not remove generic destinations; simply switch to a concrete device for Run.
  • Do not lower the deployment target blindly, because older systems may lack APIs the app requires.
  • Erasing simulators or reinstalling runtimes removes data, so use those steps only after checking the destination and settings.
  • Keep a forum reproduction report separate from an officially documented known issue or confirmed fix.

Summary

“A build only device cannot be used to run this target” usually means that an “Any … Device” destination or a non-runnable scheme is selected. Choose the app scheme and a named simulator or physical device first. Then verify the runtime, deployment target, and device preparation. If a concrete destination is still rejected, compare -showdestinations with simctl, try another runtime, and test with the latest stable compatible Xcode.

Official references