You cannot use a device built only for assembly to launch this goal.

I get this error when I try to test the application.

You cannot use the device for assembly only to run this goal.

No supported iOS devices. Connect the device to launch the application or select the simulated device as the destination.

+68
ios xcode
Nov 17 '15 at 1:50
source share
18 answers

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

+70
Apr 6 '16 at 22:41
source share

Perhaps the circuit switched to a universal device. Try selecting the connected device again in the Scheme menu:

Menu Image

+35
Dec 24 '16 at 23:34
source share

Below is my way

Choose a project → General → Deployment Information → Deployment Goal → select a lower version enter image description here

+13
Aug 16 '16 at 1:31 on
source share

I am responding to a problem that only the “Generic iOS Device” can be selected. and when I start, it says "It’s impossible to use the build device to only launch this target. There are no iOS devices available. Connect the device to run your application or select the simulated device as the destination"

and my solution to the problem is to choose build settings ---> Deployment -----> IOS Deployment Purpose ----> select a lower version, for example, 8.0,

and I found that the simulator came out and can be selected.

+6
Apr 01 '16 at 3:45
source share

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

List of Destination Commands

 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 colony for equal characters, remove spaces, Ignore identifier

Therefore, if you want to use this assignment:

 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 identifier so you get this line:

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

Then the whole team will be:

 xcodebuild test -destination 'platform=iOS Simulator,OS=11.1,name=iPad Pro (12.9-inch) (2nd generation)' -workspace Register.xcworkspace -scheme ThatTestTarget 
+6
Nov 20 '17 at 21:15
source share

You create an “Build Only Device” for Xcode that compiles the application. for the ARM processor (whereas the compilation for the simulator is aimed at the Intel processor on your Mac.)

Connect the device and select it from the pop-up window of the active circuit or select one of the simulators, and you should be good to go.

+4
Nov 17 '15 at 1:56
source share

With Xcode 8.3.2, I received this error message after I tried to run the application on a locked device. I unlocked and reconnected, as requested, but you can’t use "Assembly-only device" to run this goal. a message appeared.

I just changed the target to a simulator and changed it - it solved my problem.

+3
May 8 '17 at 8:41
source share

Modification to @Quver's answer. With the latest version of Xcode (8.3), the parameters of the destination command must be specified in double quotes. Single quotes didn't work for me

add -destination "platform=iOS Simulator,name=iPhone 7" to xcodebuild

I did not mention the OS version in the above command, because when a newer version of iOS is released, this command will report through an error that this device was not found. Therefore, it is better not to specify the OS version

+1
Apr 6 '17 at 12:55 on
source share
  • I applied the new AppleID and added it to "Xcode-> Preferences-> Account" to solve this problem. (Xcode 7.3)
  • At the same time, I deleted the original AppleID in "Xcode-> Preferences-> Account" because it was no longer a paid account and could not add new devices.
0
Jun 01 '16 at 15:59
source share

xcodebuild things did not work in my case.

Here is what I decided.

I deleted my Apple account and reset (login) to xcode preference, and this was resolved.

ps. on iphone 10.1 I needed to click the Trust button on General> Device Management> account info> Trust App

0
Nov 13 '16 at 20:24
source share

What is it worth if you get the error message A build only device cannot be used to run this target and see this text in the problems navigator:

Projectname
Target Integrity:
The goal of deploying iOS "XX.X" is newer than the "iOS YY.Y" SDK in
target ProjectName

then the problem is that the project requires an iOS SDK, which is newer than the version of your version of Xcode. You will find this problem, for example, in projects using the new / beta iOS SDK features such as ARKit.

The solution is to download the latest beta version of Xcode , which should support the non-publicly released iOS SDK that the application requires. If you have the latest Xcode, try finding the target iOS in Preferences -> Components -> Simulators .

0
Aug 31 '17 at 4:28
source share

I fixed this problem for the emulator,

First check the list of emulators

Window> Devices and Simulators

after selecting any device and click "Check OS Version"

If you only have Apple Watch OS, you should download the new iOS Simulator

and click download more time for the simulator.

select the correct iOS Simulator and download it.

0
Feb 16 '18 at 13:55
source share

I just have this problem with Xcode v10.1 using the Unity 2018 211f1 iosBuild ARkit plugin.

After execution:

Product / Analysis

I have about 700 warnings, mainly due to outdated code.

0
Dec 04 '18 at 10:12
source share

I fixed this problem by going into the project settings, and in the "Goals" section I had to set the "Tests" goal for the correct team.

0
Apr 29 '19 at 8:08
source share

Well, if you want to get a list of available destinations, then call xcodebuild and pass the -showdestinations command-line -showdestinations , and it will print out valid options for selection:

 xcodebuild -showdestinations -workspace Register.xcworkspace -scheme ThatTestTarget 
0
Jul 09 '19 at 21:39
source share

I tried almost all of the above, including restarting Xcode, none of them worked for me. I solved this problem by simply restarting my Mac . Yes, a classic solution.

Note: this problem occurred with my Xcode after it requested my Mac password from me, probably after an automatic update.

0
Jul 23 '19 at 23:15
source share

I had a completely different problem. For some reason, my Devices app was set up on Universal , not on iPhone . When I switched it to the iPhone, everything worked. No additional settings needed.

-one
Aug 27 '17 at 16:04 on
source share

It worked for me.

You are trying to start the device when you have already created it for another circuit. Go to

Product> Clear.

Then create your device selected from the active circuits.

-2
Jun 03 '16 at 21:37
source share



All Articles