Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild can't build when no physical iOS

Tags:

xcodebuild

xcodebuild manual:

Some actions (such as building) may be performed without an actual device present. To build against a platform generically instead of a specific device, the destination specifier may be prefixed with the optional string "generic/", indicating that the platform should be targeted generically. An example of a generic destination is the "iOS Device" destination displayed in Xcode's UI when no physical iOS device is present.

try it:

xcodebuild -scheme Test -destination "platform=iOS,name=generic/iOS"
xcodebuild: error: Was unable to find a destination matching the arguments to the -destination flag:
The requested device could not be found because no available devices matched the request.

like image 389
William Zhao Avatar asked Sep 05 '14 03:09

William Zhao


1 Answers

According to the examples on the xcodebuild man page, the correct way to specify a generic iOS destination is:

xcodebuild -destination generic/platform=iOS ...

(The wording of the description for this is definitely ambiguous or misleading. I wouldn't have figured this out without the example.)

like image 165
Wes Campaigne Avatar answered Oct 13 '22 14:10

Wes Campaigne