A build only device cannot be used to run this target

xcode no simulators
xcodebuild
please select a run destination which supports the tests that you wish to perform
xcode only generic ios device
xcode run on device
xcodebuild run tests on device
xcode no simulators in scheme
xcode simulator list empty

I get this error when I trying to test an app.

A build only device cannot be used to run this target.

No supported iOS devices are available. Connect a device to run your application or choose a simulated device as the destination.

add -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' to your xcodebuild

A build only device cannot be used to run this target, [errors] A build only device cannot be used to run this target. Solution: ProgjectName/ Targets / Deployment Info/ Deployment Target / iOS  and when i run ,it says “A build only device cannot be used to run this target.No supported iOS devices are available. Connect a device to run your application or choose a simulated device as the destination “ and my solution for the problem is selecting Build Settings —> Deployment —–>IOS Deployment Target—->choose a lower version like 8.0, and i found the simulator come out and can be chosen.

Maybe the Scheme has switched to a Generic device. Try to choose again the connected device from the Scheme menu:

[errors] A build only device cannot be used to run this target, In this video I will show you how to fix the "build only device cannot be used to run this target Duration: 0:43 Posted: Apr 26, 2019 Reason: A build only device cannot be used to run this target - Mobile - CircleCI Discuss. This is a really obscure error thrown by xcodebuild if the incorrect space (as in you pressing the spacebar) in between the -destination flag and the actual destination is used. Example: This will not build: set -…

Below is my way

Select project -> General -> Deployment Info -> Deployment Target -> choose a lower version

Easily fix "build only device cannot be used to run this target , I was using the “Generic iOS Device” from the simulator/device drop down list. In order to fix this issue all one needs to do is to switch to a proper  A build only device cannot be used to run this target. No supported iOS devices are available. Connect a device to run your application or choose a simulated device as the destination. Below is my way. Select project -> General -> Deployment Info -> Deployment Target -> choose a lower version.

You need to get a list of valid destinations. To do this, specify an erroneous key-value pair and xcodebuild will spit out the combinations that work:

List Destinations Command

xcodebuild test -destination 'platform=iOS Simulator' -workspace Register.xcworkspace -scheme ThatTestTarget

Output Example

Available destinations for the "ThatTestTarget" scheme:
    { platform:iOS Simulator, id:145A9B7E-B336-4819-8059-2FFEC408E05E, OS:11.1, name:iPad (5th generation) }
    { platform:iOS Simulator, id:69ABAF6F-ADA3-4E38-AC97-D71001447663, OS:9.3, name:iPad 2 }
    { platform:iOS Simulator, id:550E2F18-406D-4586-84BB-E48F1D704F27, OS:10.3.1, name:iPad Air }
    { platform:iOS Simulator, id:94734F1C-775F-40FA-9015-8196C08805EF, OS:11.1, name:iPad Air }
    { platform:iOS Simulator, id:1DB953DD-CD97-4EC7-8006-BCF01DF3E63F, OS:11.1, name:iPad Air 2 }
    { platform:iOS Simulator, id:DE3072DA-2E31-423D-9D77-220626F8B90A, OS:11.1, name:iPad Pro (9.7-inch) }
    { platform:iOS Simulator, id:3B5D18DB-13B5-4F28-B654-7D2ECDD1F6F0, OS:11.1, name:iPad Pro (10.5-inch) }
    { platform:iOS Simulator, id:A4225E3A-512C-4F42-ADD9-1E7E448C4D27, OS:11.1, name:iPad Pro (12.9-inch) }
    { platform:iOS Simulator, id:684FF1BA-8784-4B7C-B4E5-5231772F0FAC, OS:11.1, name:iPad Pro (12.9-inch) (2nd generation) }

Change Colons for Equals Signs, Remove Spaces, Ignore the ID

So if you want to use this destination:

platform:iOS Simulator, id:684FF1BA-8784-4B7C-B4E5-5231772F0FAC, OS:11.1, name:iPad Pro (12.9-inch) (2nd generation)

Change the colons for commas, remove the spaces, remove the ID, so you get this string:

platform=iOS Simulator,OS=11.1,name=iPad Pro (12.9-inch) (2nd generation)

Then the entire command would be:

xcodebuild test -destination 'platform=iOS Simulator,OS=11.1,name=iPad Pro (12.9-inch) (2nd generation)' -workspace Register.xcworkspace -scheme ThatTestTarget

Easily fix "build only device cannot be used to run this target", This is a really obscure error thrown by xcodebuild if the incorrect space (as in you pressing the spacebar) in between the -destination flag and  The Visual Studio profiling tools allow you to analyze your app's performance and resource use. This includes tools to optimize CPU, memory, graphics, and network use. See Run diagnostic tools without debugging on MSDN for full details. To Start the Profiling Tools with HoloLens. Follow the instructions above to target a device or emulator

i meet a problem that only "Generic iOS Device" can be choosed. and when i run ,it says "A build only device cannot be used to run this target.No supported iOS devices are available. Connect a device to run your application or choose a simulated device as the destination "

and my solution for the problem is selecting Build Settings ---> Deployment ----->IOS Deployment Target---->choose a lower version like 8.0,

and i found the simulator come out and can be chosen.

Reason: A build only device cannot be used to run this target , A build only device cannot be used to run this target. No supported iOS devices are available. Connect a device to run your application or choose a simulated  Shop Target online and in-store for everything from groceries and essentials to clothing and electronics. Save 5% every day with your Target RedCard.

I can't run the RestaurantFinder app in the simulator in Xcode , A build only device cannot be used to run this target. No supported iOS devices are available. Connect a device to run your application or  Some of these changes only apply to apps that explicitly declare support through their targetSdkVersion manifest attribute (also known as the target API level). Configuring your app to target a recent API level ensures that users can benefit from these improvements, while still allowing it to run on older Android versions.

A build only device cannot be used to run this target, A build only device cannot be used to run this target. Please select an available device or choose a simulated device as the destination.

xcode only shows generic ios device xcodebuild xcode run on device choose a simulated device as the destination xcode xcode show as run destination not 

Comments
  • If you use a device and you have your apple developer account, please delete the app from your device, and then run it.
  • Explanation: Xcode tries to build with the Generic iOS Device but the test have to be build at the simulator.
  • A complete and working command: xcodebuild test -project YourProject.xcodeproj -scheme YourProject -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3'
  • /usr/bin/xcodebuild is a binary file. You should probably not modify it.
  • Why do you want to modify it?
  • You don't need to add this into xcodebuild. All you need is to run this command with parameters
  • This case is useful when you import a project with deployment target higher than your local deployment target, lowering it can resolve the issue
  • Do you have simulators with newer OS version installed? Goto Xcode -> Preferences -> Downloads to see the list of compatible legacy simulator runtimes.
  • I don't call myself a rook because I'm good at this stuff... Thank you 2 hours wasted ha....