Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/cli/commands/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ npx cap run [options] <platform>
- `--target <id>`: Run on a specific target device
- `--target-name <name>`: Run on a specific target device by its name (ex: "iPhone 17 Pro", "John's iPhone")
- `--target-name-sdk-version <version>`: Run on a target device by name with a specific sdk version when using --target-name, (ex: "26.0" for iOS 26 or "35" for Android API 35). Useful for targets that have the same name but have different OS / SDK versions
- `--live-reload`: Enable Live Reload
- `--live-reload`: Set live-reload URL via CLI (uses defaults, overrides `server.url` config)
- `-l`: Shorthand for `--live-reload`
- `--host <host>`: Live Reload by loading the web view from the specified host
- `--port <port>`: Live Reload by loading the web view from the specified port
- `--host <host>`: Configure host for live-reload URL (used with `--live-reload`)
- `--port <port>`: Configure port for live-reload URL (used with `--live-reload`)
- `--https`: Use https:// instead of http:// for live-reload URL (used with `--live-reload`)
- `--forwardPorts <port1:port2>`: Automatically run "adb reverse" for better live-reloading support

6 changes: 6 additions & 0 deletions docs/main/guides/live-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ npx cap open android
Finally, click the Run button to launch the app and start using Live Reload.

> Be careful not to commit the server config to source control.

Alternatively to setting `url` in `capacitor.config.json`, you can set the live reload url directly from the CLI when running the app from the command line:

```bash
npx cap run --live-reload --port 8100
```
7 changes: 4 additions & 3 deletions versioned_docs/version-v7/cli/commands/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ npx cap run [options] <platform>
- `--scheme <schemeName>`: set the scheme of the iOS project
- `--configuration <name>`: Configuration name of the iOS Scheme
- `--target <id>`: Run on a specific target device
- `--live-reload`: Enable Live Reload
- `--live-reload`: Set live-reload URL via CLI (uses defaults, overrides `server.url` config)
- `-l`: Shorthand for `--live-reload`
- `--host <host>`: Live Reload by loading the web view from the specified host
- `--port <port>`: Live Reload by loading the web view from the specified port
- `--host <host>`: Configure host for live-reload URL (used with `--live-reload`)
- `--port <port>`: Configure port for live-reload URL (used with `--live-reload`)
- `--https`: Use https:// instead of http:// for live-reload URL (used with `--live-reload`)
- `--forwardPorts <port1:port2>`: Automatically run "adb reverse" for better live-reloading support

6 changes: 6 additions & 0 deletions versioned_docs/version-v7/main/guides/live-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ npx cap open android
Finally, click the Run button to launch the app and start using Live Reload.

> Be careful not to commit the server config to source control.

Alternatively to setting `url` in `capacitor.config.json`, you can set the live reload url directly from the CLI when running the app from the command line:

```bash
npx cap run --live-reload --port 8100
```