MCPcopy Index your code
hub / github.com/callstack/agent-device / matchesExplicitDeviceSelector

Function matchesExplicitDeviceSelector

src/kernel/device.ts:306–320  ·  view source on GitHub ↗
(device: DeviceInfo, selector: DeviceSelector)

Source from the content-addressed store, hash-verified

304}
305
306function matchesExplicitDeviceSelector(device: DeviceInfo, selector: DeviceSelector): boolean {
307 if (selector.udid && !(device.id === selector.udid && isApplePlatform(device.platform))) {
308 return false;
309 }
310 if (selector.serial && !(device.id === selector.serial && device.platform === 'android')) {
311 return false;
312 }
313 if (
314 selector.deviceName &&
315 normalizeDeviceName(device.name) !== normalizeDeviceName(selector.deviceName)
316 ) {
317 return false;
318 }
319 return true;
320}
321
322function throwNoDevicesFound(selector: DeviceSelector, context: DeviceSelectionContext): never {
323 const simulatorSetPath = context.simulatorSetPath;

Callers 1

matchesDeviceSelectorFunction · 0.85

Calls 2

isApplePlatformFunction · 0.85
normalizeDeviceNameFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…