mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-05 04:27:09 +00:00
feat(ios): resolve physical devices from devicectl
ResolveDevice parses xcrun devicectl list devices into Device{Name,
HardwareUDID, CoreDeviceID}: the hardware UDID feeds xcodebuild/iproxy
and the CoreDevice id feeds devicectl install. Matches by name or either
id; errors list candidates on none/ambiguous. Fixes the stale sidecar
comment on ResolveTarget.
This commit is contained in:
1 parent
99ae7c9294
commit
6a34ce52c0
3 files changed
+283
-2
No files matched your search
+2
-2
@@ -79,8 +79,8 @@ func BootedUDID(ctx context.Context) string {
|
||||
// available) resolves to that simulator. With no query, exactly one booted
|
||||
// simulator resolves to it; multiple booted simulators is an error that lists
|
||||
// them and asks the caller to pass --ios-device. A query that matches no
|
||||
// simulator resolves as a physical device (udid = query, simulator false) so
|
||||
// the sidecar path drives it.
|
||||
// simulator resolves as a physical device (udid = query, simulator false),
|
||||
// which the caller then resolves through ResolveDevice for the device driver.
|
||||
func ResolveTarget(ctx context.Context, query string) (udid string, isSimulator bool, err error) {
|
||||
if query != "" {
|
||||
booted, err := listBootedAll(ctx)
|
||||
|
||||
Reference in new issue
Block a user