Skip to content

feat: physical device support — iproxy + code signing for USB-connected iOS devices #46

Description

@SyncTekLLC

Problem

SpecterQA's MCP session only targets iOS Simulators. The session manager uses xcrun simctl for device management and xcodebuild test-without-building -destination 'platform=iOS Simulator' for runner deployment.

Agents using SpecterQA cannot test on physical devices, which means:

  • No real-world performance data (thermal throttling, actual memory limits)
  • No testing against real network conditions
  • No testing on specific device hardware (A15 vs A17 vs M-series)

Proposed solution

  1. Device discovery: xcrun xctrace list devices or xcrun devicectl list devices to find USB-connected devices
  2. Port forwarding: iproxy 8222 8222 <DEVICE_UDID> to forward the runner's HTTP port
  3. Code signing: Auto-detect provisioning profile or use CODE_SIGN_IDENTITY env var
  4. Runner deployment: xcodebuild test-without-building -destination 'platform=iOS,id=<DEVICE_UDID>'
  5. MCP tool: ios_start_session(device_type="physical") or auto-detect when a USB device is connected and no simulator is booted

For now: xctrace for physical device profiling

Until MCP physical device support ships, agents should use xctrace directly for Instruments-grade profiling:

xcrun xctrace record --device <UDID> --template 'Leaks' --attach <PID> --time-limit 30s --output /tmp/profile.trace
xcrun xctrace export --input /tmp/profile.trace --xpath '/trace-toc/run/data/table'

This gives allocation graphs, leak detection, and CPU flame graphs that ios_perf snapshots can't match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions