isSimulatorLaunchFBSError (core/launch-diagnostics.ts)

agent-device · packages/platform-apple/src/core/launch-diagnostics.ts · typescript · MIT
infra, tag:knn-classified

Diagnoses simulator launch errors, probes app installation and binary compatibility, and offers user-friendly hints.

// Source: https://github.com/callstack/agent-device | License: MIT | Copyright 2026 Callstack
// Provided via justclaw.it.com; keep this notice with the code.
import { AppError } from '@agent-device/kernel/errors';
import type { DeviceInfo } from '@agent-device/kernel/device';
import { buildSimctlArgsForDevice } from './simctl.ts';
import { runAppleToolCommand, runXcrun } from './tool-provider.ts';

export type LaunchFailureReason =
  | 'ARCH_MISMATCH'
  | 'APP_NOT_INSTALLED'
  | 'PERSISTENT_LAUNCH_FAIL'
  | 'UNKNOWN';

type LaunchProbeResult = {
  installed: boolean;
  simulatorCompatible?: boolean;
};

export function isSimulatorLaunchFBSError(error: unknown): boolean {
  if (!(error instanceof AppError)) return false;
  if (error.code !== 'COMMAND_FAILED') return false;

  const detail

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key