You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add public --launch-args CLI flag for iOS open
main already has internal launchArgs support for iOS simulators (from
the Maestro work). This change makes it a first-class CLI flag and
fills in the gaps:
- Add `--launch-args <arg>` to the schema, allowed flags on `open`,
and the CLI handler. Mirrors `--header`'s shape (repeatable string
flag, parsed to `string[]`).
- Plumb `launchArgs` through `AppOpenOptions`, the client
normalizer, and the standalone `daemon-client.openApp` request
builder so programmatic callers see the same surface.
- Forward `launchArgs` to iOS device launches via
`launchIosDeviceProcess`, inserting an explicit `--` end-of-options
marker before the user's args so devicectl (Swift ArgumentParser)
can't reparse leading-dash launch args as its own options.
- Reject `launchArgs` explicitly on macOS rather than silently
dropping them through the existing macOS launch path.
- Reject `launchArgs` combined with an iOS simulator URL open (which
goes through `simctl openurl`, ignoring launch arguments) with an
INVALID_ARGS pointing the caller at the two-step flow.
Android remains explicitly rejected in dispatch.ts as already on main;
adding Android support is a separate decision and out of scope here.
Tests:
- `src/utils/__tests__/args.test.ts`: parser/help coverage for
`--launch-args` including `-FeatureFlag`-style values and
`--es KEY VALUE`-style values, plus the rejection on unrelated
commands.
- `src/platforms/ios/__tests__/index.test.ts`: device launch with
args, device deep-link launch with args (`--` separator after
`--payload-url`), simulator URL reject, macOS reject.
'--launch-args is not supported with iOS simulator URL opens (simctl openurl ignores launch args). Launch the app first with --launch-args, then issue the URL open in a separate call.';
72
+
constMACOS_LAUNCH_ARGS_UNSUPPORTED_MESSAGE=
73
+
'--launch-args is not supported on macOS; launch arguments are currently iOS-only.';
0 commit comments