Skip to content

fix: capture ios device logs with devicectl console#1026

Open
thymikee wants to merge 6 commits into
mainfrom
fix/ios-device-logs-devicectl-1022
Open

fix: capture ios device logs with devicectl console#1026
thymikee wants to merge 6 commits into
mainfrom
fix/ios-device-logs-devicectl-1022

Conversation

@thymikee

@thymikee thymikee commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Capture iOS physical-device app output by launching the session app through xcrun devicectl device process launch --console --terminate-existing, avoiding the rejected device log stream --device path on devicectl 506.6.

Keep the clear unsupported fallback only for toolchains that do not expose console capture, and report that capability in logs doctor. logs path/logs doctor still surface failed startup state instead of letting marker-only logs look active.

Closes #1022

Validation

Passed local checks: pnpm exec vitest run src/daemon/__tests__/app-log.test.ts src/daemon/handlers/__tests__/session.test.ts src/utils/__tests__/args.test.ts --testNamePattern "logs clear --restart starts active|logs clear --restart requires|runAppLogDoctor|startIosDeviceAppLog|buildIosDeviceConsole|usageForCommand resolves debugging"; pnpm format; pnpm check:quick; pnpm check:fallow --base origin/main; pnpm check:unit; pnpm build.

Physical-device verification used thymikee-iphone / UDID 00008150-001849640CF8401C. I ran pnpm test-app:start -- --port 8081, kept Expo/Metro visible, then opened com.callstack.agentdevicelab with session issue-1022-console-logs. logs clear --restart, logs mark, logs path, and logs doctor showed an active ios-device backend with devicectlAvailable: true and devicectlConsoleCapture: true; the bounded app.log window contained real app output including the Metro bundle request and ReactInstance: evaluateJavaScript() with JS bundle, not only marker entries. snapshot -i on the same session showed the Agent Device Tester RN home screen.

Manual cleanup: closed issue-1022-console-logs and stopped the Expo process.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.5 MB 1.5 MB +2.9 kB
JS gzip 479.4 kB 480.3 kB +845 B
npm tarball 580.7 kB 581.6 kB +859 B
npm unpacked 2.0 MB 2.0 MB +2.9 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.1 ms 26.4 ms +0.3 ms
CLI --help 47.5 ms 47.2 ms -0.2 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/9722.js +2.1 kB +585 B
dist/src/session.js +722 B +248 B
dist/src/cli-help.js +41 B +12 B

@thymikee thymikee force-pushed the fix/ios-device-logs-devicectl-1022 branch from 2d6dfe0 to 5eda037 Compare July 2, 2026 12:47
@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 2, 2026
@thymikee thymikee changed the title fix: report unsupported ios device log streaming fix: capture ios device logs with devicectl console Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS physical device logs backend fails with devicectl 506.6: Unknown option '--device'

1 participant