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

Function throwNoDevicesFound

src/kernel/device.ts:322–332  ·  view source on GitHub ↗
(selector: DeviceSelector, context: DeviceSelectionContext)

Source from the content-addressed store, hash-verified

320}
321
322function throwNoDevicesFound(selector: DeviceSelector, context: DeviceSelectionContext): never {
323 const simulatorSetPath = context.simulatorSetPath;
324 if (simulatorSetPath && supportsAppleSimulatorSelection(selector.platform)) {
325 throw new AppError('DEVICE_NOT_FOUND', 'No devices found in the scoped simulator set', {
326 simulatorSetPath,
327 hint: `The simulator set at "${simulatorSetPath}" appears to be empty. Create a compatible simulator first with xcrun simctl --set "${simulatorSetPath}" create, or remove the scoped simulator set.`,
328 selector,
329 });
330 }
331 throw new AppError('DEVICE_NOT_FOUND', 'No devices found', { selector });
332}
333
334function normalizeDeviceName(value: string): string {
335 return value.toLowerCase().replace(/_/g, ' ').replace(/\s+/g, ' ').trim();

Callers 1

resolveDeviceFunction · 0.85

Calls 1

Tested by

no test coverage detected