fix(apple): exclude app extensions from iOS device perf targets

Closed
MI
4d ago
+507-125

Fixes #5155.

Summary

  • Filter
    esolveIosDevicePerfTarget in packages/platform-apple/src/core/perf-target.ts to top-level app bundle binaries (direct children of ppBundleUrl), excluding nested .appex extensions (PlugIns/.appex/, Extensions/.appex/) and sub-bundles while keeping root helper binaries.
  • Throw COMMAND_FAILED (No running process found for ) if only extension processes are active.
  • Prefer CoreDevice PID matches in summarizeIosDeviceMemorySnapshot (packages/platform-apple/src/core/perf.ts) before falling back to executable names so another installed build with the same binary name is not swept in.
  • Route CoreDevice ile:// URLs through
    eadIosDeviceProcessName / decodeIosDeviceFileUrl so POSIX iOS bundle URLs decode consistently across platforms without changing Linux/macOS ileURLToPath behavior.

Before / after

Before: resolveAppProcesses returned .../App.app/App and .../App.app/PlugIns/*.appex/* -> xctrace --attach targeted extension pids and memory sample reported extension processes alongside the app.
After:  resolveIosDevicePerfTarget returns top-level app binaries only; memory sampling prefers exact CoreDevice PIDs.

Validation

oxfmt --check (7 files): ok
vitest run perf-target/perf/perf-xctrace/perf-process-identity/devicectl/app-launch-close: 6 files, 50 passed (mocked xcrun/devicectl/xctrace; no live macOS/iOS hardware run on Windows)
tsc -b tsconfig.typecheck.json examples/sdk/tsconfig.json: ok
layering/check.ts (2045 files): ok
oxlint . --deny-warnings (5439 files): 0 warnings, 0 errors
fallow audit & tsdown --config-loader native: ok

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.