Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Xcode will not run the app because the destination is build only

ErrorA build only device cannot be used to run this target

Short answer

Xcode shows this when the run destination in the toolbar is a placeholder it can build for but cannot launch on, such as Any iOS Device. Pick a simulator or a paired physical device. If none is listed, the scheme may not match the platform, or the platform support is not installed yet.

  • Applies to Xcode 26, iOS 26, macOS 26
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    List the destinations Xcode can run this scheme on. If your device or a simulator is missing here, it is missing from the toolbar too.

    xcodebuild -scheme YourScheme -showdestinations
  2. 2Match what you see, then jump to its fix

    1. 1The toolbar shows Any iOS Device (or similar) as the run destination.A generic destination is selected instead of a simulator or deviceFix
    2. 2Your iPhone or simulator is missing from the menu, but other devices show.The scheme does not match the platform you want to runFix
    3. 3A Get button sits next to the Any [Platform] Device destination.Platform support is not installedFix

What does the error look like?

  • A build only device cannot be used to run this target
  • Any iOS Device

Cause 1 of 3

A generic destination is selected instead of a simulator or device

1Check

Apple's guide says to choose a simulated or physical device from the run destination menu before you click Run. A generic destination is for building, not launching.

xcrun simctl list devices available

2Fix

Open the run destination menu in the toolbar and choose an iPhone simulator, or a physical device that you paired in Device Hub.

# Toolbar: scheme menu > run destination menu > pick a simulator or your device
# command line equivalent for a simulator:
xcodebuild -scheme YourScheme -destination 'platform=iOS Simulator,name=iPhone 17' build

3Verify

Product > Run launches the app on the chosen device.

xcrun simctl list devices booted

Confirmed by developer.apple.com

Did this fix it?

Cause 2 of 3

The scheme does not match the platform you want to run

1Check

Xcode fills the run destination menu from the selected scheme. A scheme that contains only a watchOS app lists only watchOS devices, for example.

xcodebuild -list

2Fix

Choose the scheme whose target is your iOS app, then open the run destination menu again.

# Toolbar: scheme pop-up (left of the run destination) > pick the iOS app scheme
xcodebuild -scheme YourIOSAppScheme -showdestinations

3Verify

The iPhone or simulator you expect now appears in the destination list.

xcodebuild -scheme YourIOSAppScheme -showdestinations | grep -i iphone

Confirmed by developer.apple.com

Did this fix it?

Cause 3 of 3

Platform support is not installed

1Check

Without platform support for the target, Xcode cannot build and run on a device. The Components settings pane lists what is installed.

xcodebuild -showsdks

2Fix

Click Get next to the destination, or install the platform in Xcode > Settings > Components. From the terminal you can download a platform's simulator runtime.

xcodebuild -downloadPlatform iOS

3Verify

After the download finishes, the run destination menu lists simulators for the platform.

xcrun simctl list runtimes

Confirmed by developer.apple.com

Did this fix it?

How do I stop it coming back?

  • Pick a concrete simulator or device before you press Run; keep generic destinations for archiving.
  • Name your schemes after the platform so the right one is easy to spot.
  • Install the platform support you need right after each Xcode update.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Mobile apps

App record creation fails because you lack permission

You cannot add a new app in App Store Connect as a Developer or limited user

Only the Account Holder, an Admin or an App Manager can create an app record, and Apple blocks it until the Account Holder has signed the latest agreement.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.