Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A build only device cannot be used to run this target

Tags:

xcode

ios

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.

like image 645
yrpalnoob Avatar asked Nov 17 '15 01:11

yrpalnoob


People also ask

How do you choose a simulated device as a destination?

For iOS, tvOS, and watchOS apps, you can choose a simulated device, under [Platform] Simulators, from the run destination menu next to the scheme menu in the toolbar. To add additional simulators of a product family running older versions of the operating system, choose Add Additional Simulators.

How do I add capabilities in Xcode?

Before you begin, add your Apple ID account and assign the project to a team so that Xcode can provision your app. For iOS, tvOS, and watchOS apps, run your app on a device to register the device and create a development provisioning profile. Use the default automatic signing when you create a project from a template.

How do I add another simulator to Xcode?

If you require a different version of the iOS simulator than is provided by your Xcode installation, you can download additional simulators in Xcode. Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download.


1 Answers

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

like image 101
Quver Avatar answered Sep 17 '22 04:09

Quver