当使用 Xamarin 运行 calabash-ios 时无法指定设备

Cannot specified a device when running calabash-ios with Xamarin

我有一个问题出现在一台计算机上,但在另一台计算机上运行正常。

我使用 Xamarin 运行 calabash-ios 并得到错误:

`No device_target was specified and did not detect a connected device. Set a device_target option in the relaunch method. (RuntimeError)
/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.14.0/lib/calabash-cucumber/launcher.rb:683:in default_uia_strategy'
/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.14.0/lib/calabash-cucumber/launcher.rb:626:in relaunch'`

我 运行 xcrun instruments -s devices 得到以下列表:

`…
iPhone 6 (9.0) [9E580CB5-8F55-43B5-AC50-05C6C38BC4E0]
iPhone 6 (9.0) + Apple Watch - 38mm (2.0) [C1326499-01E6-4EC5-9AF5-477A745C0089]
iPhone 6 Plus (8.3) [8BFA71F1-65B2-43C3-BDC6-7EF255C000F8]
…`

然后:

`APP_BUNDLE_PATH=”<project path>/<file>.app”`

然后:

`DEVICE_TARGET="iPhone 6 (9.0)" cucumber`

在一台计算机上它启动了模拟器和 运行 应用程序,但在另一台计算机上出现上述错误。

知道我错过了什么以及从哪里开始寻找吗?

您应该将您的 Test Cloud Agent 更新到至少与 iOS 9 和 Xcode 7 兼容的 0.16.2。我认为这是错误的原因。

我相信即将发布 0.16.4 TCA,0.17.0 也不远了。

re: capital letters.

我想我现在明白问题了。

$ MY_VAR="Hey!"
$ echo $MY_VAR
"" <== the empty string

$ MY_VAR="Hey!" echo $MY_VAR
Hey!

$ export MY_VAR="Hey!"
$ echo $MY_VAR
Hey!

$ APP=/path/to/Your.app DEVICE_TARGET="iPhone 6 (9.0)" cucumber

A​​PP和APP_BUNDLE_PATH是等价的。