Skip to content

fix(platform-apple): put --payload-url before the bundle ID on devicectl launch - #3017

Merged
thymikee merged 2 commits into
mainfrom
fix/ios-payload-url-order-2998
Sep 28, 2026
Merged

thymikee merged 2 commits into
mainfrom
fix/ios-payload-url-order-2998

Conversation

@thymikee

@thymikee thymikee commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Summary

devicectl device process launch treats every argument after the bundle
identifier as the target app's own argv, not as devicectl options. Putting
--payload-url <url> after the bundle ID (the previous order) meant the URL
was silently delivered to the app as a launch argument instead of being
opened as a deep link — physical-device open <bundle-id> <url> never
actually opened anything.

The fix moves --payload-url before the bundle ID in launchCoreDeviceApp,
matching how devicectl's Swift ArgumentParser expects flags to precede
positional arguments.

Closes #2998

Touched files: 3 (1 source, 2 tests).

Validation

Tested commit: f916874ed6 (branch fix/ios-payload-url-order-2998).

pnpm check:affected --run: all runnable checks passed — 428 test files,
3090 tests, 0 failures (one earlier run hit the known contention-flaky
runner-artifact-reuse.test.ts timeout; passes standalone and passed clean
on rerun).

Live device check — physical iPhone "thymikee-iphone"
(00008150-001849640CF8401C), driving com.apple.Preferences via a prefs
deep link (no other installed app exposed a safe URL-scheme target):

  • Baseline open com.apple.Preferences (no URL): Settings root list.
  • With the fix, open com.apple.Preferences "App-Prefs:root=General&path=About":
    lands on the "Apps" sub-screen, reachable only through the deep link.
  • Reverting the fix and rebuilding reproduced the bug exactly (deep link
    landed back on Settings root); restoring the fix returned to the "Apps"
    screen.

Targeted vitest: 47/47 passed with the fix; reverting only the source fix
fails 6 of them, confirming the tests catch the regression.

No unresolved risk: a 3-line argv reorder validated against devicectl's
ArgumentParser semantics, live device evidence, and unit tests.

Review in cubic

…ctl launch

devicectl treats everything after the bundle identifier as the app's own
argv, so --payload-url after it was silently delivered to the app as a
launch argument instead of being honored as a URL to open. Physical-device
`open <bundle-id> <url>` never actually opened the link.

Fixes #2998
The devicectl launch fix moved --payload-url ahead of the bundle ID;
this test still asserted the old (buggy) argv order.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.87 MB 4.87 MB -180 B
Package (unpacked) 4.87 MB 4.87 MB -180 B
Package (download) 1.46 MB 1.46 MB -84 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 28.7 ms 27.1 ms -1.7 ms
CLI --help 83.8 ms 81.3 ms -2.5 ms

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at f916874. The fix looks right: devicectl reads everything after the bundle ID as app arguments, and the new argv puts --payload-url before it. The tests pin that order. The PR body reports a physical-device run of open <bundle> <url> before and after the fix, which covers the changed path.

CI: Smoke Tests is still queued. Nothing has failed yet.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 28, 2026
@thymikee
thymikee merged commit d3c9d05 into main Sep 28, 2026
18 of 19 checks passed
@thymikee
thymikee deleted the fix/ios-payload-url-order-2998 branch September 28, 2026 11:59
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-28 12:01 UTC

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 devices: open <app> <url> never delivers the URL, --payload-url is passed after the bundle ID

1 participant