Skip to content

Commit 75dccac

Browse files
committed
updated documentation
1 parent c083e42 commit 75dccac

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build:
88

99
build-cover:
1010
go mod tidy
11-
CGO_ENABLED=0 go build -ldflags="-s -w" -cover -o mobilecli-cover
11+
CGO_ENABLED=0 go build -ldflags="-s -w" -cover
1212

1313
test:
1414
go test ./... -v -race

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ A universal command-line tool for managing iOS and Android devices, simulators,
3535
- **Multiple Output Formats**: Save screenshots as PNG or JPEG with quality control
3636
- **Screencapture video streaming**: Stream mjpeg/h264 video directly from device
3737
- **Device Control**: Reboot devices, tap screen coordinates, press hardware buttons
38-
- **App Management**: Launch app, terminate apps, install and uninstall
38+
- **App Management**: Launch, terminate, install, uninstall, list, and get foreground apps
3939

4040
### 🎯 Platform Support
4141

@@ -75,7 +75,7 @@ make build
7575

7676
Xcode is required. Make sure you have it installed with the runtimes relevant for you installed. You will have to create Simulators and have them booted before `mobilecli` can use them.
7777

78-
`mobilecli` will automatically install an agent on the device that is required for functionalities such as opening a url, tapping on buttons and streaming screen capture.
78+
`mobilecli` will automatically install an agent on the device that is required for functions such as tapping on elements, pressing buttons buttons and streaming screen capture.
7979

8080
#### 🤖 For Android Support
8181
```bash
@@ -186,6 +186,40 @@ mobilecli io text --device <device-id> 'hello world'
186186
- `VOLUME_UP`, `VOLUME_DOWN` - Volume up and down
187187
- `DPAD_UP`, `DPAD_DOWN`, `DPAD_LEFT`, `DPAD_RIGHT`, `DPAD_CENTER` - D-pad controls (Android only)
188188

189+
### App Management 📱
190+
191+
```bash
192+
# List installed apps on device
193+
mobilecli apps list --device <device-id>
194+
195+
# Get currently foreground app
196+
mobilecli apps foreground --device <device-id>
197+
198+
# Launch an app
199+
mobilecli apps launch <bundle-id> --device <device-id>
200+
201+
# Terminate an app
202+
mobilecli apps terminate <bundle-id> --device <device-id>
203+
204+
# Install an app (.apk for Android, .ipa for iOS, .zip for iOS Simulator)
205+
mobilecli apps install <path> --device <device-id>
206+
207+
# Uninstall an app
208+
mobilecli apps uninstall <bundle-id> --device <device-id>
209+
```
210+
211+
Example output for `apps foreground`:
212+
```json
213+
{
214+
"status": "ok",
215+
"data": {
216+
"packageName": "com.example.app",
217+
"appName": "Example App",
218+
"version": "1.0.0"
219+
}
220+
}
221+
```
222+
189223
## HTTP API 🔌
190224

191225
***mobilecli*** provides an http interface for all the functionality that is available through command line. As a matter of fact, it is preferable to

cli/root.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ APP MANAGEMENT:
5656
# List installed apps
5757
mobilecli apps list --device <device-id>
5858
59+
# Get currently foreground app
60+
mobilecli apps foreground --device <device-id>
61+
5962
# Install an app (.apk for Android, .ipa/.zip for iOS)
6063
mobilecli apps install --device <device-id> /path/to/app.apk
6164

0 commit comments

Comments
 (0)