Skip to content

Add --host flag support to run:ios and run:android commands#682

Merged
thymikee merged 3 commits intocallstackincubator:mainfrom
JakubKorytko:korytko/add-dev-server-host-cli-argument
Feb 3, 2026
Merged

Add --host flag support to run:ios and run:android commands#682
thymikee merged 3 commits intocallstackincubator:mainfrom
JakubKorytko:korytko/add-dev-server-host-cli-argument

Conversation

@JakubKorytko
Copy link
Contributor

Overview

Fixes: #681

This PR adds support for the --host flag in run:ios and run:android commands, allowing users to specify a custom host for the Metro development server when using the --dev-server flag. This brings feature parity with the existing rock start --host command.

Changes

Android (packages/platform-android/src/lib/commands/runAndroid/runAndroid.ts)

  • Added host?: string to Flags interface
  • Pass host: args.host to dev server initialization
  • Added --host <string> option to runOptions

iOS (packages/platform-apple-helpers/src/lib/commands/run/)

  • Added host?: string to RunFlags interface in runOptions.ts
  • Pass host: args.host to dev server initialization in createRun.ts
  • Added --host <string> option to getRunOptions in runOptions.ts

Documentation (website/src/docs/cli/introduction.md)

  • Updated run:ios options table to include --host flag
  • Updated run:android options table to include --host flag

Testing

The implementation follows the existing --port flag pattern for consistency. Users can now:

# Start iOS app with custom dev server host
rock run:ios --dev-server --host 0.0.0.0

# Start Android app with custom dev server host
rock run:android --dev-server --host 192.168.1.100

@vercel
Copy link

vercel bot commented Feb 3, 2026

@JakubKorytko is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@thymikee
Copy link
Contributor

thymikee commented Feb 3, 2026

There's also a bunch of other options that we could pass to Metro, which will pollute the API, but for now this works 👍🏼

@thymikee
Copy link
Contributor

thymikee commented Feb 3, 2026

ming adding a changeset with npx @changesets/cli?

@JakubKorytko
Copy link
Contributor Author

sure, on it

@thymikee thymikee merged commit 562051e into callstackincubator:main Feb 3, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing --host flag in run:ios and run:android commands

2 participants